#1452 closed defect (bug) (worksforme)
Trackback not working with XML-RPC
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | XML-RPC | Version: | 1.5.1.2 |
| Severity: | normal | Keywords: | trackback xmlrpc has-patch |
| 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)
Change History (9)
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.
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.
- Milestone set to 1.6
- Owner changed from anonymous to ryan
- Version changed from 1.5.2 to 1.5.1.2
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.

Patch for both bugs mentioned