Last modified: 2012-07-24 15:43:25 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 T40165, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38165 - Case mismatch in <query-continue> while listing categories starting with "EN:"
Case mismatch in <query-continue> while listing categories starting with "EN:"
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.20.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-04 15:16 UTC by Malafaya
Modified: 2012-07-24 15:43 UTC (History)
8 users (show)

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


Attachments

Description Malafaya 2012-07-04 15:16:54 UTC
When listing categories via API (such as the Pywikipediabot does), the query-continue acfrom output is not correct (changed in case) when the next category starts with "EN:"

Please check the following URL:

https://es.wiktionary.org/w/api.php?action=query&list=allcategories&format=xml&acfrom=EN&aclimit=10

I'm asking for categories starting at EN, but acfrom returned is:

<query-continue>
    <allcategories acfrom="en:Adjectivos" />
</query-continue>

As you can see, the capital "EN" became a lower case "en". The correct result would be "EN:Adjectivos".

This will cause a "jump" in the categories iteration, skipping results from "EN:" to "en:".

As far as I can tell, this seems to happen only for categories starting with "EN:", and not "DE:" or "BG:", for example.

Thanks.
Comment 1 Liangent 2012-07-04 15:28:58 UTC
Cause:

The API module calls ->keyToTitle( 'EN:Adjectivos' ) and Title::newFromDBKey( 'EN:Adjectivos' ) reads it as an interwiki link, so the interwiki prefix is normalized when output back.

Maybe we want to fix keyToTitle to use Title::makeTitle? The titleToKey function may need fixing too.
Comment 2 Liangent 2012-07-04 15:29:25 UTC
(In reply to comment #0)
> As far as I can tell, this seems to happen only for categories starting with
> "EN:", and not "DE:" or "BG:", for example.

DE is broken too: https://es.wiktionary.org/w/api.php?action=query&list=allcategories&format=xml&acfrom=DE&aclimit=60
Comment 3 Umherirrender 2012-07-05 16:09:03 UTC
That is the same problem like bug 25702, bug 36400, bug 36987 and maybe more. The continue param needs not keyToTitle and titleToKey conversion.
Comment 4 Liangent 2012-07-05 19:11:08 UTC
(In reply to comment #3)
> That is the same problem like bug 25702, bug 36400, bug 36987 and maybe more.
> The continue param needs not keyToTitle and titleToKey conversion.

Dupe most of them then.
Comment 5 Umherirrender 2012-07-18 17:51:52 UTC
Should be fixed by Gerrit change #8407

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


Navigation
Links