Last modified: 2014-04-10 13:06:11 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 T63868, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61868 - action=mobileview shouldn't return sections when the range of sections asked for is out of range
action=mobileview shouldn't return sections when the range of sections asked ...
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
Feature requests (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 62721
  Show dependency treegraph
 
Reported: 2014-02-24 20:05 UTC by Yuvi Panda
Modified: 2014-04-10 13:06 UTC (History)
7 users (show)

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


Attachments
Effects of this bug on the Android app (90.54 KB, image/png)
2014-03-25 22:24 UTC, Yuvi Panda
Details

Description Yuvi Panda 2014-02-24 20:05:50 UTC
https://en.wikipedia.org/w/api.php?action=mobileview&format=json&page=10_dollar_note&sections=2-&prop=text should return zero sections, since I am asking for sections '2-' and there is only a section 0 on that page. Instead I get all sections + 2 empty sections
Comment 1 Bingle 2014-02-26 18:02:27 UTC
Prioritization and scheduling of this bug is tracked on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/mobile/cards/1727
Comment 2 Jon 2014-02-27 01:41:27 UTC
It seems like this should throw an error saying invalid arguments (sections should either be a number of the keyword all)

I'd say this is super super low priority - a good patch for a new developer to MobileFrontend to take care of?
Comment 3 Yuvi Panda 2014-02-27 06:59:43 UTC
It actually affects the app - since we don't know clientside how many sections there are, I can't just not send the second request. So this should either send an error message or no sections, rather than false data.
Comment 4 Jon 2014-02-27 16:49:56 UTC
It seems we are saying the same thing? I'm suggesting error message. Why are you not using sections=all any reason?
Comment 5 Yuvi Panda 2014-03-25 22:21:02 UTC
Not using section=all because reduces data transfer? And it's not super duper low priority since  all pages with only one section produce errenous data and the app displays those as it is supposed to (see attachment). Hence this is something I'd like Max (or myself? :P) to fix ASAP, not 'super low priority bug for volunteer months from now'

(OT: Would an 'API' component make sense for MF?)
Comment 6 Yuvi Panda 2014-03-25 22:24:15 UTC
Created attachment 14906 [details]
Effects of this bug on the Android app
Comment 7 Yuvi Panda 2014-03-25 22:26:06 UTC
(In reply to Jon from comment #2)
> It seems like this should throw an error saying invalid arguments (sections
> should either be a number of the keyword all)

action=mobileview has been accepting ranges for a few months now in sections= :)
Comment 8 Jon 2014-03-25 22:38:23 UTC
Data transfer vs number of http requests. With Gzip encoding is amount of dat really an issue? Have you benchmarked this?

If this is accepting ranges it is not well documented. The documentation says this which is not clear at all how this is expected to work - is this all except the last section or something else?:

                         Ranges without second number, e.g. '1-' means get all until the end.
Comment 9 Gerrit Notification Bot 2014-03-27 17:13:26 UTC
Change 121410 had a related patch set uploaded by MaxSem:
mobileview: handle requested sections outside of range

https://gerrit.wikimedia.org/r/121410
Comment 10 Gerrit Notification Bot 2014-03-27 18:14:44 UTC
Change 121410 merged by jenkins-bot:
mobileview: handle requested sections outside of range

https://gerrit.wikimedia.org/r/121410

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


Navigation
Links