Page MenuHomePhabricator

mobileview fails on content pages redirecting to special pages
Closed, ResolvedPublic

Description

Example: https://en.wikipedia.org/w/api.php?action=mobileview&page=User%3APurplebackpack89%2FC&redirects=yes&prop=sections%7Ctext&sections=&sectionprop=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.


Version: unspecified
Severity: normal

Details

Reference
bz64305

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:13 AM
bzimport set Reference to bz64305.
bzimport added a subscriber: Unknown Object (MLST).
MaxSem created this task.Apr 23 2014, 6:55 PM

bingle-admin wrote:

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

jgonera wrote:

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