#1668 closed defect (bug) (fixed)
pingback xml format is false
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 1.5.2 |
| Component: | XML-RPC | Keywords: | pingback bg|has-patch bg|dev-feedback bg|commit bg|squashed |
| Focuses: | Cc: |
Description
In /wp-includes/comment-functions.php you send a pingback this way:
$client->query('pingback.ping', array($pagelinkedfrom, $pagelinkedto) )
so it becomes:
<?xml version="1.0"?> <methodCall> <methodName>pingback.ping</methodName> <params> <param><value><array><data> <value><string>http://example.org/test.html</string></value> <value><string>http://example.org/2005/09/hallo</string></value> </data></array></value></param> </params> </methodCall>
The pingback specifications http://www.hixie.ch/specs/pingback/pingback says that we need such XML for a valid pingback:
<?xml version="1.0"?> <methodCall> <methodName>pingback.ping</methodName> <params> <param><value><string>http://jlog.dev/test.html</string></value></param> <param><value><string>http://jlog.dev/2005/09/hallo</string></value></param> </params> </methodCall>
If you call the method this way:
$client->query('pingback.ping', $pagelinkedfrom, $pagelinkedto)
without the array, it'll send the right XML format.
Attachments (1)
Change History (7)
#2
@
20 years ago
- Keywords bg|has-patch bg|dev-feedback added
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
I know nothing of the issue, but the patch I uploaded makes the change.
#3
@
20 years ago
- Keywords bg|commit bg|squashed added
I'll chime in and say that this is the proper fix, last arg being an array causes IXR_Value to go recursive and output the <array> and such tags. http://www.hixie.ch/specs/pingback/pingback-1.0#send is the important bit of the Pingback specification, it expects two args, and instead WP would be passing 1 arg as an array with the 2 args it should be sending seperately
Note: See
TracTickets for help on using
tickets.
Patch for latest WP 1.6 SVN