WordPress Trac: Ticket #3994: MetaWeblog metaWeblog.getCategories problemhttps://core.trac.wordpress.org/ticket/3994
<p>
As stated in the "standard" at <a class="ext-link" href="http://www.xmlrpc.com/metaWeblogApi"><span class="icon">​</span>xmlrpc.com</a> the server should respond with a struct of structs instead of a data array of structs, as wordpress does.
</p>
<p>
"The struct returned contains one struct for each category, containing the following elements: description, htmlUrl and rssUrl."
</p>
en-usWordPress Trachttps://core.trac.wordpress.org/chrome/site/your_project_logo.pnghttps://core.trac.wordpress.org/ticket/3994
Trac 1.0.1foolswisdomSun, 18 Mar 2007 20:35:09 GMThttps://core.trac.wordpress.org/ticket/3994#comment:1
https://core.trac.wordpress.org/ticket/3994#comment:1
<p>
Does this problem exist in other versions of WordPress? What makes the severity critical? What scenario did you discover the problem in? Thank you!
</p>
TicketwestiSun, 18 Mar 2007 22:30:59 GMTseverity changed; version set; milestone deletedhttps://core.trac.wordpress.org/ticket/3994#comment:2
https://core.trac.wordpress.org/ticket/3994#comment:2
<ul>
<li><strong>version</strong>
set to <em>2.2</em>
</li>
<li><strong>severity</strong>
changed from <em>critical</em> to <em>normal</em>
</li>
<li><strong>milestone</strong>
<em>2.0.10</em> deleted
</li>
</ul>
<p>
I can reproduce this - The code in class-IXR that determines what type to return for this call and any other similar call to which we return and anonymous array or arrays will result in an XMLRPC response containing an array of structs.
</p>
<p>
However, I am not convinced this is a bug as the original metaweblog spec as linked is not very detailed and other implementations appear to return an array of structs e.g. <a class="ext-link" href="http://msdn2.microsoft.com/en-us/library/aa905667.aspx"><span class="icon">​</span>http://msdn2.microsoft.com/en-us/library/aa905667.aspx</a>
</p>
TicketwhiloWed, 21 Mar 2007 19:25:37 GMThttps://core.trac.wordpress.org/ticket/3994#comment:3
https://core.trac.wordpress.org/ticket/3994#comment:3
<p>
Sure it is not very precise, but it says a struct of structs. This is still not an array. Either it is standard or it is not. In my opinion it is very important to keep as close as possible to a standard, even if it is not a good one. It makes using the interface much more frustrating, if serverside software works different with the same standard.
</p>
TicketOtto42Thu, 22 Mar 2007 14:47:09 GMThttps://core.trac.wordpress.org/ticket/3994#comment:4
https://core.trac.wordpress.org/ticket/3994#comment:4
<p>
Standards are important, but so is compatibility. Can you point to other implementations that do actually return a struct of structs?
</p>
TicketNazgulSun, 15 Jul 2007 18:26:48 GMTmilestone sethttps://core.trac.wordpress.org/ticket/3994#comment:5
https://core.trac.wordpress.org/ticket/3994#comment:5
<ul>
<li><strong>milestone</strong>
set to <em>2.4 (future)</em>
</li>
</ul>
TicketjosephscottWed, 26 Sep 2007 16:36:47 GMTcc sethttps://core.trac.wordpress.org/ticket/3994#comment:6
https://core.trac.wordpress.org/ticket/3994#comment:6
<ul>
<li><strong>cc</strong>
<em>josephscott</em> added
</li>
</ul>
TicketdougalFri, 09 Nov 2007 15:56:25 GMTkeywords sethttps://core.trac.wordpress.org/ticket/3994#comment:7
https://core.trac.wordpress.org/ticket/3994#comment:7
<ul>
<li><strong>keywords</strong>
<em>xmlrpc</em> <em>compliance</em> <em>specs</em> <em>clients</em> <em>metaweblog</em> <em>categories</em> added
</li>
</ul>
<p>
This mis-implementation has been out there for several years now, so the major clients are either explicitly or implicitly working around it. We need to test the clients against a 'fixed' version of the method and make sure nothing breaks. If the major clients don't break with the change, we can get a fix committed. Otherwise, we might need to coordinate with the client authors to see how we can smooth out a more gradual migration to spec compliance.
</p>
<p>
The spec is vague. One must assume that the category name is what should be used as the 'name' portion of the parent struct, though the category slug might be a good candidate, as well. The use of an array probably stemmed from the fact that the category portion of a post struct is implemented as an array in the spec.
</p>
TicketjosephscottFri, 09 Nov 2007 17:25:10 GMThttps://core.trac.wordpress.org/ticket/3994#comment:8
https://core.trac.wordpress.org/ticket/3994#comment:8
<p>
Just as a note to whilo and others who might be following this, there is discussion on the <a class="ext-link" href="http://lists.automattic.com/mailman/listinfo/wp-xmlrpc"><span class="icon">​</span>http://lists.automattic.com/mailman/listinfo/wp-xmlrpc</a> list about this issue.
</p>
TicketredsweaterFri, 09 Nov 2007 18:06:32 GMThttps://core.trac.wordpress.org/ticket/3994#comment:9
https://core.trac.wordpress.org/ticket/3994#comment:9
<p>
foolswisdom said it best at the outset. Unless there's a clear scenario where not fixing this is causing harm, it shouldn't be considered. The MetaWeblog spec is not clear enough or widely enough followed to have fixes done "just to be in compliance."
</p>
<p>
Also, MetaWeblog API per se is rather uncommonly used these days as most clients will prefer the MovableType or WordPress supersets, in which case the mt.getCategoryList method would be used instead.
</p>
<p>
I don't think you guys should waste your time trying to fix or compromise for this issue. It would be change for change's sake, and a waste of time when real problems need fixing.
</p>
<p>
Daniel
</p>
TicketjosephscottFri, 30 Nov 2007 19:27:11 GMTstatus changed; resolution sethttps://core.trac.wordpress.org/ticket/3994#comment:10
https://core.trac.wordpress.org/ticket/3994#comment:10
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>wontfix</em>
</li>
</ul>
<p>
As others have noted, the spec if vague on what exactly the returning data structure looks like, most others seem to have implemented it the same way WordPress has, clients have long since adapted to the way WordPress is returning this data.
</p>
<p>
There doesn't appear to be a compelling reason to change at this point, so I'm closing this as wontfix.
</p>
TicketlloydbuddFri, 30 Nov 2007 20:47:33 GMTmilestone deletedhttps://core.trac.wordpress.org/ticket/3994#comment:11
https://core.trac.wordpress.org/ticket/3994#comment:11
<ul>
<li><strong>milestone</strong>
<em>2.4</em> deleted
</li>
</ul>
Ticket