#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)
Change History (9)
#1
@
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
@
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
@
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
Patch for both bugs mentioned