Page MenuHomePhabricator does not recognize nested templates
Closed, ResolvedPublic


When using (compat) on Wikimedia Labs to remove a template from a list of articles using the command:

python "Persondata" -remove

I noticed that the template (ar:Template:Persondata) gets removed only partially if one of the template parameters is another template.

I used the compat version of Didn't test the core version of the script.

Event Timeline

Meno25 raised the priority of this task from to Needs Triage.
Meno25 updated the task description. (Show Details)
Meno25 added a project: Pywikibot-compat.
Meno25 added a subscriber: Meno25.
Xqt added a subscriber: Xqt.

Won't fix in compat. Try core and file a new bug when it's failing.

Xqt triaged this task as High priority.
Xqt added projects: Pywikibot, Pywikibot-tests.

Reopened due to the bug also exists in core. Refer

Xqt added a subscriber: jayvdb.

Looks like the textlib._MultiTemplateMatchBuilder does not recognize nested templates.

Xqt renamed this task from (compat) removes template partially if one of template parameters contains another template to does not recognize nested templates.Apr 8 2016, 7:47 AM

Correct. There are three TODOs in that cls iirc.

Change 770956 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] Enable nested templates with MultiTemplateMatchBuilder

Change 770956 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] Enable nested templates with MultiTemplateMatchBuilder