Page MenuHomePhabricator

[[Category:Foo|{{PAGENAME}}]] does not roundtrip through category.py move -keepsorkey properly (replaced with sort key of "API")
Closed, DuplicatePublic

Description

See https://www.mediawiki.org/w/index.php?title=Manual:Dynamic_dates&diff=prev&oldid=1914439 for example.

Culprit is in textlib.py's getCategoryLinks function:

if '{{' in match.group('rest'):
    rest = site.expand_text(match.group('rest'))

Because no title is passed to expand_text, it uses the default of "API".

Event Timeline

Legoktm created this task.Oct 13 2015, 7:15 PM
Legoktm raised the priority of this task from to Needs Triage.
Legoktm updated the task description. (Show Details)
Legoktm added a project: Pywikibot-category.py.
Legoktm added subscribers: Legoktm, XZise.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptOct 13 2015, 7:15 PM
Mpaa added a subscriber: Mpaa.Oct 13 2015, 9:11 PM

Duplicate of T109213

jayvdb added a subscriber: jayvdb.Oct 14 2015, 4:39 AM

Hmm. The API should add a warning when it does this.