Page MenuHomePhabricator

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

Event Timeline

JAnD created this task.Aug 16 2015, 9:58 AM
JAnD raised the priority of this task from to Needs Triage.
JAnD updated the task description. (Show Details)
JAnD added a subscriber: JAnD.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 16 2015, 9:58 AM
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.
Restricted Application added a subscriber: pywikibot-bugs-list. · View Herald TranscriptAug 16 2015, 9:59 AM
JAnD raised the priority of this task from Low to Normal.Sep 9 2015, 5:42 AM
jayvdb added a subscriber: jayvdb.

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.

JAnD added a comment.Sep 9 2015, 6:16 PM

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):
Mpaa added a subscriber: Mpaa.Sep 9 2015, 9:52 PM

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 Normal 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')
JAnD added a comment.Sep 10 2015, 5:41 AM

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 rPWBC666364ca4efd: [FIX] Textlib: Expand category if necessary, 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.

Mpaa added a comment.Oct 27 2015, 8:19 PM

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!

JAnD added a comment.Dec 13 2015, 12:49 PM

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 closed this task as Resolved.Dec 24 2015, 11:56 AM
jayvdb claimed this task.