Substitution fails if template is inside <pagelist /> tag


Article Images

Create Task

Maniphest T151940

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

Mpaa created this task.Nov 29 2016, 8:49 PM

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptNov 29 2016, 8:49 PM

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.

Mpaa added a comment.Mar 12 2017, 2:44 PM

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

Mpaa closed this task as Invalid.Mar 12 2017, 2:44 PM

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 reopened this task as Open.Mar 12 2017, 2:54 PM

Reopened.

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 closed this task as Resolved.Mar 13 2017, 3:31 PM

Xqt claimed this task.

Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL · Credits