#7772 closed defect (bug) (fixed)
XMLRPC interface doesn't reflect enclosures back as <enclosure> attributes
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | XML-RPC | Keywords: | |
Focuses: | Cc: |
Description ¶
The new enclosure support in WP 2.6 accepts an enclosure specified as an <enclosure> element on a submitted post, but doesn't advertise the presence of that enclosure as an <enclosure> element on get requests.
Instead, the enclosures are represented as custom field attributes, which is probably fine, but which doesn't provide a valid way for a basic XMLRPC MetaWeblog client to get at the existing enclosure value on a given post.
I am not sure whether only the first enclosure should be exhibited as an <enclosure> element, or whether all of them should be. But the <enclosure> element should be used to convey an existing enclosure item to XMLRPC MetaWeblog clients.
Daniel
Pull Requests
- Loading…
Change History (10)
#2
@ Emeritus Committer
17 years ago
One question about the patch, what happens if there's more than one enclosure for the post?
#3
follow-up:
↓ 4
@
17 years ago
This patch only gets the first one. Notice the "break 2;" line to stop once it gets one.
#4
in reply to:
↑ 3
@ Emeritus Committer
17 years ago
Replying to Otto42:
This patch only gets the first one. Notice the "break 2;" line to stop once it gets one.
That was my point :-)
Do clients (and the API for that matter) expect there to only ever be one enclosure per post?
#5
@
17 years ago
I was only going by what the original request in the ticket was. If we want it to have more than one enclosure, then we need to know what clients expect as far as that goes.
#6
@ Emeritus Committer
17 years ago
Good point, seems like limiting it to one is the right thing to do at this point.
Attached a patch that I think will do the job, but I don't know any easy way to test it. Do you know of a client that works well with enclosures like this?