As of (I think) the MediaWiki train deployment today, the liststudents API doesn't return valid XML: http://en.wikipedia.org/w/api.php?action=liststudents&courseids=481&format=xml&group
Description
Details
Related Objects
- Mentioned In
- rMWc30336bc2d33: API: Also mangle indexed tag names in format=xml
rMW4bbd86a85939: API: Also mangle indexed tag names in format=xml
rEEDU4765f342e647: ApiListStudents: Use XML-friendly tag names
rMWcb9434caf95b: Updated mediawiki/core Project: mediawiki/extensions/EducationProgram…
rEEDU18778cfea417: ApiListStudents: Use XML-friendly tag names
rEEDU087993f2f96b: ApiListStudents: Use XML-friendly tag names
rMEXTaccac52911ef: Updated mediawiki/extensions Project: mediawiki/extensions/EducationProgram…
Event Timeline
If you look at the JSON output , the trouble is with the keys that include spaces, "online volunteers" and "campus volunteers". The XML container tag name is mangled to "online.20.volunteers", but the entity records have an illegal tag name, "<online volunteer username...".
Looks like funky character handling needs to be fixed in the MediaWiki API.
Meanwhile, if this is a problem for the WikiEd dashboard or other consumers, can they be rewritten to hit the json endpoint? @Ragesoss, please let us know if there any consumers, so we can adjust the priority.
@awight: Yes, the dashboard uses xml at present. The mediawiki gem we use for API calls just uses xml, so it won't be trivial to switch that out. We definitely want to switch to json soon, but we'd rather have a little more time.
(I'm seeing if can work around it for just this broken endpoint. One hitch is that the json doesn't include some of the information that the xml includes: when there is a duplicated xml tag, it appears as a number in the json version. So the "course" and "reviewer" tags become integers.)
Change 207723 had a related patch set uploaded (by AndyRussG):
ApiListStudents: Use XML-friendly tag names
Change 207766 had a related patch set uploaded (by Anomie):
API: Also mangle indexed tag names in format=xml
Change 207778 had a related patch set uploaded (by AndyRussG):
ApiListStudents: Use XML-friendly tag names
Change 207779 had a related patch set uploaded (by AndyRussG):
ApiListStudents: Use XML-friendly tag names
Change 207766 merged by jenkins-bot:
API: Also mangle indexed tag names in format=xml
Change 207809 had a related patch set uploaded (by Legoktm):
API: Also mangle indexed tag names in format=xml
Change 207809 merged by jenkins-bot:
API: Also mangle indexed tag names in format=xml
Thank you @Ragesoss for the extra info. <3
Thank you @awight @AndyRussG @Anomie @Legoktm for your help. <3
You guys are superheroes. <3
If that's actually a loss of information rather than just an irritating cosmetic difference, then the extension's output format is very poorly designed. The "indexed tag name" shouldn't carry any information, it's supposed to just be there as a container.
@Anomie I can take credit for that, as I pretty much blundered my way through creating the liststudents api. :-/
@Anomie: After looking it over yesterday, though, I don't think it actually loses any necessary information, as long as any consumer understands the format, and that "course" and "reviewers" will be implicit in json.