Last modified: 2014-05-19 17:17:11 UTC
Example: https://en.wikipedia.org/w/api.php?action=mobileview&page=User%3APurplebackpack89%2FC&redirects=yes&prop=sections%7Ctext§ions=§ionprop=level%7Cline&noheadings=yes&format=json returns {"servedby":"mw1125","error":{"code":"internal_api_error_MWException","info":"Exception Caught: Invalid or virtual namespace -1 given.","*":""}} because the page in question, https://en.wikipedia.org/wiki/User:Purplebackpack89/C , is a redirect to Special:Contributions/Purplebackpack89. Suggestions what to return in such cases are welcome.
Prioritization and scheduling of this bug is tracked on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/mobile/cards/1959
<YuviPanda> MaxSem: ah, right. redirect: "Special:Contributions/something", special: true <YuviPanda> ? <YuviPanda> MaxSem: similar to mainpage: "" <YuviPanda> MaxSem: in fact a general "specialpage": "" would be useful as well, I think
Max, not sure what are the steps to reproduce the bug. If I go to the mobile version of https://en.wikipedia.org/wiki/User:Purplebackpack89/C everything seems to be fine.
Max it would be great if the api could return a link to the special page or even better return something akin to { redirect: 'Special:X' } so the caller can take care of it. From mobile web perspective it's not a big deal - any requests for pages that return errors will be redirected to via the address bar so you probably at very least want to stop the exception being thrown! :) Juliusz: the error is in the API response not the web page.
Change 133866 had a related patch set uploaded by MaxSem: mobileview: handle pages redirecting to special/media https://gerrit.wikimedia.org/r/133866
Change 133866 merged by jenkins-bot: mobileview: handle pages redirecting to special/media https://gerrit.wikimedia.org/r/133866