Page MenuHomePhabricator

cosmetic_Changes replaces {{PAGENAME}} in <noinclude> with "API"
Closed, ResolvedPublic

Event Timeline

JAnD raised the priority of this task from to Needs Triage.
JAnD updated the task description. (Show Details)
JAnD subscribed.
JAnD triaged this task as Low priority.Aug 16 2015, 9:59 AM
JAnD updated the task description. (Show Details)
JAnD set Security to None.
JAnD raised the priority of this task from Low to Medium.Sep 9 2015, 5:42 AM
jayvdb subscribed.

Can you confirm that this is pywikibot-core ? It doesnt feel like a pywikibot-core bug - I cant recall any recent change which might have caused it.

yes, pywikibot core
interwiki.py with cosmetic_changes enabled

pwb.py cosmetic_changes.py -family:wiktionary -prefixindex:category:Údržba:Doplnit_h -lang:cs

ATTENTION: You can run this script as a stand-alone for testing purposes.
However, the changes that are made are only minor, and other users
might get angry if you fill the version histories and watchlists with such
irrelevant changes. Some wikis prohibit stand-alone running.
Do you really want to continue? ([y]es, [N]o): y
Logging in to wiktionary:cs as JAnDbot
Retrieving 22 pages from wiktionary:cs.


>>> Kategorie:Údržba:Doplnit hodnotu parametru "význam" v šabloně Překlady <<<
No changes were needed on [[Kategorie:Údržba:Doplnit hodnotu parametru "význam"
v šabloně Překlady]]


>>> Kategorie:Údržba:Doplnit hodnotu parametru v šabloně SSČ <<<
@@ -4 +4 @@
- [[Kategorie:Údržba:Zkontrolovat vložení šablony SSČ| {{PAGENAME}}]]
+ [[Kategorie:Údržba:Zkontrolovat vložení šablony SSČ| API]]

Edit summary: Robot: kosmetické úpravy
Do you want to accept these changes? ([y]es, [N]o, [a]ll, [q]uit):

standardizePageFooter() -> textlib.getCategoryLinks(text, site=self.site) -> rest = site.expand_text(match.group('rest'))
action expandtemplates replaces {{PAGENAME}} with API.

e.g. https://en.wikisource.org/w/api.php?action=expandtemplates&text=Category:Tables%20templates|+{{PAGENAME}}&prop=wikitext&maxlag=5&format=json

jayvdb raised the priority of this task from Medium to High.Sep 9 2015, 10:50 PM

Thanks for finding that @Mpaa.

I havent tested this, but a quick fix could be to disable cosmetic_changes on wiktionary using config.cosmetic_changes_enable or config.cosmetic_changes_disable ?

i.e. put in your user-config.py something like

cosmetic_changes_enable['wiktionary'] = []

(which I hope would disable it on all languages)

There is also per-lang disable:

cosmetic_changes_disable['wiktionary'] = ['cs']

Or with a bit of code, we could disable standardizePageFooter until this bug is fixed. Maybe only on wiktionary?

It might also make sense to disable cosmetic_changes for interwiki.py

cosmetic_changes_deny_script.append('interwiki')

disabling cosmetic changes is not solution, because after manual edits there is often different order of interwiki or missing EOLs.

jayvdb raised the priority of this task from High to Unbreak Now!.Oct 14 2015, 4:47 AM

This is a regression introduced in {666364ca4}, which is described as a '[FIX]', but doesnt list a bug number. :/ From the comments, it appears it was a private request on IRC, and no task was created as far as I can see.

Options: should Magicwords be blacklisted or should we introduce a check if a template is actually a template page?

Can someone reply to the last comment? Are there any news / progress to share?
Is the current priority correct (does not seem so)?
Thanks!

Can someone reply to the last comment? Are there any news / progress to share?
Is the current priority correct (does not seem so)?
Thanks!

Can someone reply to the last comment? Are there any news / progress to share?
Is the current priority correct (does not seem so)?
Thanks!

"Severity" high, so caled "priority unknown"

Change 258782 had a related patch set uploaded (by John Vandenberg):
Do not expand text by default in getCategoryLinks

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

Note this also occurs in v 2.0, so a fix needs to be backported.

Change 258782 merged by jenkins-bot:
Do not expand text by default in getCategoryLinks

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

Change 260905 had a related patch set uploaded (by John Vandenberg):
Do not expand text by default in getCategoryLinks

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

Change 260905 merged by jenkins-bot:
Do not expand text by default in getCategoryLinks

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

jayvdb claimed this task.