Ticket #3721 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Trackback submission using xmlrpc.php on wordpress 2.1 (using ecto)

Reported by: bafonso Assigned to: anonymous
Priority: normal Milestone: 2.0.10
Component: XML-RPC Version: 2.1
Severity: normal Keywords: trackback ecto xml-rpc xmlrpc
Cc:

Description

Using ecto to submit a new post with trackbacks on wordpress 2.1, one finds that they get inserted as "Array". Anyway, currently wordpress’ xmlrpc.php file is not working correctly if you want to publish trackbacks from Ecto, and probably from other weblog clients. Here’s the fix! There are two lines in xmlrpc.php at the root of your wordpress blog that have:

$to_ping = $content_struct['mt_tb_ping_urls'] 

Replace both of them with:

$to_ping_input = $content_struct['mt_tb_ping_urls'];
$to_ping = “” ;
if (is_array($to_ping_input)) {
foreach ($to_ping_input as $ping_url) {
$to_ping = $to_ping . $ping_url . “ ”;
}
} 

Attachments

xmlrpc.diff (0.9 kB) - added by bafonso on 02/21/07 18:18:08.
xmlrpc diff

Change History

01/31/07 03:07:55 changed by markjaquith

Better:

$to_ping = $content_struct['mt_tb_ping_urls'];
if ( is_array($to_ping) )
	$to_ping = implode(' ', $to_ping);

01/31/07 05:00:38 changed by bafonso

Even better!

Please, someone implement this before 2.1.1. Also, the xmlrpc bug in categories being sent as integers instead of strings.

01/31/07 06:53:39 changed by ryan

That's already fixed.

02/21/07 15:37:00 changed by Nazgul

  • milestone changed from 2.1.1 to 2.1.2.

Markjaquith's code snippet needs to be coverted to a patch.

02/21/07 18:18:08 changed by bafonso

  • attachment xmlrpc.diff added.

xmlrpc diff

02/21/07 18:19:10 changed by bafonso

Is this diff ok?

02/22/07 01:34:08 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [4905]) Handle array of mt_tb_ping_urls. Props bafonso. fixes #3721

02/22/07 01:34:33 changed by ryan

(In [4906]) Handle array of mt_tb_ping_urls. Props bafonso. fixes #3721

02/22/07 01:34:58 changed by ryan

(In [4907]) Handle array of mt_tb_ping_urls. Props bafonso. fixes #3721

02/22/07 01:35:11 changed by ryan

  • milestone changed from 2.1.2 to 2.0.10.