Page MenuHomePhabricator

reflinks.py work with duplicate references
Closed, ResolvedPublic

Description

Example of the diff is here.

The bot correctly identified that ref name="medium 2012" is being used twice in the article.

Unfortunately, references could be defined not only in the article itself, but in the final reference template. I personally don't like putting all references in the end but, as I checked, the same behaviour exists not only in ru.wiki, but en.wiki, too.

I suggest adding an additional check, whether <ref></ref> is inside of template or not and fixing the reference that is outside of the template.

Event Timeline

Change 636454 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] Ingnore duplication replacements inside templates

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

@Rubin16: are you able to check this patch?

@Rubin16: are you able to check this patch?

I will try to check tomorrow, thanks

I have made the wrong merge of the patch: checked it now and it works correctly.
https://ru.wikipedia.org/w/index.php?title=Участник:Rubin16/test1&diff=110165789&oldid=110165781&diffmode=source

we can close it here, thanks a lot.

Change 636454 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Ignore duplication replacements inside templates

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

Thanks for reviewing