Last modified: 2014-01-29 05:22:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52953, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50953 - API: "action=ask&format=xml" isn't well-formed XML if a page is a subpage
API: "action=ask&format=xml" isn't well-formed XML if a page is a subpage
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-08 16:19 UTC by Tim Landscheidt
Modified: 2014-01-29 05:22 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Snapshot of not well-formed API response. (774 bytes, application/octet-stream)
2013-07-08 16:19 UTC, Tim Landscheidt
Details

Description Tim Landscheidt 2013-07-08 16:19:30 UTC
Created attachment 12787 [details]
Snapshot of not well-formed API response.

https://wikitech.wikimedia.org/w/api.php?action=ask&query=%5b%5bCategory%3aTools%20Access%20Requests%5d%5d%20%5b%5bIs%20Completed%3a%3aNo%5d%5d%7c%3fUser%20Name&format=xml does not produce valid XML.

It has elements with the name "Nova_Resource:Tools/Access_Request/Marian_520219" which xmllint rejects with "parser error : error parsing attribute name".  This stems from the slashes ("/") in the element name which aren't allowed in XML names (cf. http://www.w3.org/TR/REC-xml/#NT-NameStartChar).

After escaping those, xmllint still complains about the perceived, but undeclared XML namespace "Nova_Resource".

The result is attached as the query is volatile.
Comment 1 MWJames 2013-07-08 16:26:27 UTC
See Bug 44696. 

I guess wikitech is not running the latests SMW 1.9 master. Bug 44696 is only deployed with SMW 1.9
Comment 2 Tim Landscheidt 2014-01-29 05:22:17 UTC
Hello future me!  I stumbled over this again yesterday and found that the format "wddx" is a suitable work-around; it makes the XML a bit clumsy, but parsable.  So if you encounter this bug again in a year, you know what to do.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links