Make WordPress Core

Opened 19 years ago

Closed 17 years ago

Last modified 17 years ago

#1452 closed defect (bug) (worksforme)

Trackback not working with XML-RPC

Reported by: pombsd's profile pombsd Owned by: ryan's profile ryan
Milestone: Priority: normal
Severity: normal Version: 1.5.1.2
Component: XML-RPC Keywords: trackback xmlrpc has-patch
Focuses: Cc:

Description

Using WordPress 1.5.1.2 for testing purposes I discovered that outgoing trackbacks are not correctly handled by the XML-RPC interface. I'm using MarsEdit to edit my posts.

MarsEdit sends its list of trackback URIs as an array following the form:
<value>
<array>
<data>
<value><string>http://my.trackback.url</string></value>
</data>
</array>
</value>
Now WordPress seems to expect a comma-separated list of URIs. I don't know which one is the preferred behaviour here, but I do know that WordPress does only save a string named "Array" as a single URI. This happens, when I add new and edit existing posts (mw_newPost() and mw_editPost() in xmlrpc.php).

The second issue is that when editing a post (method mw_editPost() in xmlrpc.php), the ID gets lost. It magically reverts back to 1 during the update (line 617 in xmlrpc.php), but is still used for sending out trackback URIs later on.

Attachments (1)

xmlrpc.php.patch (1.6 KB) - added by pombsd 19 years ago.
Patch for both bugs mentioned

Download all attachments as: .zip

Change History (9)

@pombsd
19 years ago

Patch for both bugs mentioned

#1 @pombsd
19 years ago

The attached patch fixes both bugs in the simplest way I could come up with. Trackbacks work with MarsEdit now, but should also the way intended (?) with a comma-separated list of trackback URIs. The ID doesn't get lost anymore, as well.

#2 @ryan
19 years ago

Your solution works, although I fixed it a bit differently in [2653]. I passed the space separated trackback list to wp_insert_post() and wp_update_post() in the to_ping argument instead of to trackback_url_list(). insert and update know what to do with the trackbacks.

#3 @ryan
19 years ago

  • Milestone set to 1.6
  • Owner changed from anonymous to ryan
  • Version changed from 1.5.2 to 1.5.1.2

#4 @pombsd
19 years ago

Just wanted to note that this still does not work in 1.5.1.3, although your bugfix seems to be included. Seems to me as if trackback URLs coming in as arrays still aren't handled correctly.

#5 @matt
18 years ago

  • Milestone changed from 2.0 to 2.1

#6 @rgovostes
18 years ago

  • Keywords has-patch added

#7 @matt
17 years ago

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

#8 @Nazgul
17 years ago

  • Milestone 2.1 deleted
Note: See TracTickets for help on using tickets.