Page MenuHomePhabricator

template.py: Substitution fails if template is inside <pagelist /> tag
Closed, ResolvedPublic

Description

on en.wikisource.org
python scripts/template.py -pt:0 mdash -subst -ns:106 -summary:"Substituting {{Mdash}} with —"

{{Mdash}} redirects to {{--}} but the final template is not substituted.

See https://en.wikisource.org/w/index.php?title=Index%3ALife_and_journals_of_Kah-ke-wa-quo-na-by.djvu&type=revision&diff=6538350&oldid=6131242

Event Timeline

Change 342314 had a related patch set uploaded (by Mpaa):
[pywikibot/core] template.py: substitution fails if template is a redirect

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

I am wondering. subst on a redirect template DB works for me on testwiki as well as for de-wikisource.

You're right. It failed because it was inside <pagelist .../> tag.

Change 342314 abandoned by Mpaa:
template.py: substitution fails if template is a redirect

Reason:
Invalid bug

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

Change 342314 restored by Mpaa:
template.py: substitution fails if template is a redirect

Reason:
behavior can be improved

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

Mpaa renamed this task from template.py: Substitution fails if template is a redirect to another template to template.py: Substitution fails if template is inside <pagelist /> tag.Mar 12 2017, 3:13 PM

Change 342314 merged by jenkins-bot:
[pywikibot/core] template.py: substitution fails if template is inside pagelist tag

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

Change 342333 had a related patch set uploaded (by Mpaa):
[pywikibot/core] template.py: improve doc

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

Change 342333 merged by jenkins-bot:
[pywikibot/core] template.py: improve doc

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

Xqt claimed this task.