WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3721 closed defect (bug) (fixed)

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

Reported by: bafonso Owned by:
Milestone: 2.0.10 Priority: normal
Severity: normal Version: 2.1
Component: XML-RPC Keywords: trackback ecto xml-rpc xmlrpc
Focuses: 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 (1)

xmlrpc.diff (940 bytes) - added by bafonso 9 years ago.
xmlrpc diff

Download all attachments as: .zip

Change History (10)

#1 @markjaquith
9 years ago

Better:

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

#2 @bafonso
9 years ago

Even better!

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

#3 @ryan
9 years ago

That's already fixed.

#4 @Nazgul
9 years ago

  • Milestone changed from 2.1.1 to 2.1.2

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

@bafonso
9 years ago

xmlrpc diff

#5 @bafonso
9 years ago

Is this diff ok?

#6 @ryan
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

#7 @ryan
9 years ago

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

#8 @ryan
9 years ago

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

#9 @ryan
9 years ago

  • Milestone changed from 2.1.2 to 2.0.10
Note: See TracTickets for help on using tickets.