WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 7 years ago

Last modified 7 years ago

#1452 closed defect (bug) (worksforme)

Trackback not working with XML-RPC

Reported by: pombsd Owned by: 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 9 years ago.
Patch for both bugs mentioned

Download all attachments as: .zip

Change History (9)

pombsd9 years ago

Patch for both bugs mentioned

comment:1 pombsd9 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.

comment:2 ryan9 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.

comment:3 ryan9 years ago

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

comment:4 pombsd9 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.

comment:5 matt8 years ago

  • Milestone changed from 2.0 to 2.1

comment:6 rgovostes8 years ago

  • Keywords has-patch added

comment:7 matt7 years ago

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

comment:8 Nazgul7 years ago

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