Make WordPress Core

Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#3721 closed defect (bug) (fixed)

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

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

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 20 years ago.
xmlrpc diff

Download all attachments as: .zip

Change History (10)

#1 @markjaquith
20 years ago

Better:

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

#2 @bafonso
20 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
20 years ago

That's already fixed.

#4 @Nazgul
20 years ago

  • Milestone 2.1.1 → 2.1.2

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

@bafonso
20 years ago

xmlrpc diff

#5 @bafonso
20 years ago

Is this diff ok?

#6 @ryan
20 years ago

  • Resolution → fixed
  • Status new → closed

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

#7 @ryan
20 years ago

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

#8 @ryan
20 years ago

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

#9 @ryan
20 years ago

  • Milestone 2.1.2 → 2.0.10
Note: See TracTickets for help on using tickets.