touch.py makes empty edits on ProofreadPage pages
Open, Needs TriagePublic

Description

Wikisource is needing to touch 000000s of files across multiple languages. The edit message currently is in English alone (as I understand it); and it was commented to e that it should be possible for the edit summary to be in the language of the wiki, ie. the -lang setting.

I could of course be missing something within the manual if I am meant to be implementing something when I am running the scripts.

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptJul 8 2018, 5:28 AM
Dvorapa added a subscriber: Dvorapa.EditedJul 8 2018, 7:53 AM

touch.py should never edit the page, so it should never use the summary. Only old pages (last time edited before 2007) can sometimes be edited as they can contain newlines at the end, which touch.py removes. BTW you can probably use -summary:"Something" parameter if you really need to

Dvorapa closed this task as Declined.Jul 8 2018, 7:56 AM

If you find out some page touch.py edits and uses that summary, please fill in a new task as it should never happen

touch is an edit, and as there has been underlying change in the schema that WS pages it will in essence be an edit. FWIW the interaction of ProofreadPage and Mediawiki has had changes in the page interaction. Also Wikisource transcription processes will often have pages not edited for that many years, so please not be hasty about the age of a page, there are more uses than just Wikipedias.

Billinghurst reopened this task as Open.Jul 8 2018, 7:59 AM

ahem. You may not wish to do the task, that does not make it unnecessary or yours to close. Thanks for that unilateral decision.

Please see T198470 for the task being managed

https://en.wikisource.org/w/index.php?title=Special:Contributions/Wikisource-bot&offset=20180708054415&target=Wikisource-bot
for examples of edits.
(change visibility) 05:43, 8 July 2018 (diff | hist) . . (-118)‎ . . Page:A Book of Dartmoor.djvu/56 ‎ (Pywikibot touch edit) (current) [rollback 1 edit]
(change visibility) 05:43, 8 July 2018 (diff | hist) . . (0)‎ . . Page:A History of Italian Literature - Garnett (1898).djvu/3 ‎ (Pywikibot touch edit) (current) [rollback 1 edit]
(change visibility) 05:43, 8 July 2018 (diff | hist) . . (0)‎ . . Page:A Book of Dartmoor.djvu/55 ‎ (Pywikibot touch edit) (current) [rollback 1 edit]
(change visibility) 05:43, 8 July 2018 (diff | hist) . . (0)‎ . . Page:A History of Italian Literature - Garnett (1898).djvu/2 ‎ (Pywikibot touch edit) (current) [rollback 1 edit]
(change visibility) 05:42, 8 July 2018 (diff | hist) . . (0)‎ . . Page:A Book of Dartmoor.djvu/54 ‎ (Pywikibot touch edit) (current) [rollback 1 edit]
(change visibility) 05:42, 8 July 2018 (diff | hist) . . (0)‎ . . Page:A History of Italian Literature - Garnett (1898).djvu/1 ‎ (Pywikibot touch edit) (current) [rollback 1 edit]

https://sv.wikisource.org/w/index.php?title=Special:Bidrag/Wikisource-bot&offset=20180708054415&target=Wikisource-bot
for examples of edits.
(change visibility) 05:43, 8 July 2018 (diff | hist) . . (0)‎ . . Sida:NicodemusTessin dy dagbok 1688.djvu/103 ‎ (Pywikibot touch edit) (current) [rollback 1 edit]
(change visibility) 05:43, 8 July 2018 (diff | hist) . . (-124)‎ . . Sida:Danska och norska läsestycken.djvu/143 ‎ (Pywikibot touch edit) (current) [rollback 1 edit]
(change visibility) 05:43, 8 July 2018 (diff | hist) . . (-118)‎ . . Sida:Myrberg GT t2.png ‎ (Pywikibot touch edit) (current) [rollback 1 edit]
(change visibility) 05:42, 8 July 2018 (diff | hist) . . (-124)‎ . . Sida:Danska och norska läsestycken.djvu/142 ‎ (Pywikibot touch edit) (current) [rollback 1 edit]
(change visibility) 05:42, 8 July 2018 (diff | hist) . . (-118)‎ . . Sida:Myrberg GT 307.png ‎ (Pywikibot touch edit) (current) [rollback 1 edit]

Is -summary global? It is not listed at https://www.mediawiki.org/wiki/Manual:Pywikibot/Global_Options How does one know which of the options are global? I will try that, thanks.

This is weird, the change has removed 122 bytes, but the diff is empty

Dvorapa renamed this task from i18n of message in touch.py to touch.py makes empty edits on ProofreadPage pages.Jul 8 2018, 8:30 AM
Dvorapa edited projects, added Pywikibot, Pywikibot-Other-scripts; removed Pywikibot-i18n.

No i18n, the touch.py bot should never make edits like this, it should be fixed directly in the code and by adding workarounds like i18n. Thank you for the examples of edits

Ankry added a subscriber: Ankry.Jul 8 2018, 9:16 AM

This is weird, the change has removed 122 bytes, but the diff is empty

Actually, only the byte counter was updated: it current version the hidden page haeder size is not conted. Only the size of the visible/editable data is reported for the proofread-page content model pages. And this change is an edit as it creates a new revision to store the updated value. I do not think such database update can be made directly in code. There are also changes in other tables related to this edit.

And yes, this is a case similar to the trailing spaces/newlines stripping by a nul-edit.

There are several cases where touch.py actually edits the page, which sounds like it’s way easier to fix it on Pywikibot side. For example, I have encountered such when editing outdated translated pages (MediaWiki-extensions-Translate), apart from the above cases. I don’t understand what downsides it has. Too much work for developers to put the translation in the code? Doesn’t look so, but I can claim it. Too much complexity? The interwiki bot already has i18n, and it can still be used widely. Too much work for the translators? Nothing must be translated, it can be left out if the translators don’t want to do it.

Mpaa added a subscriber: Mpaa.Aug 9 2018, 3:34 PM

I do not see any downside. If you would like to take the task, no issues on my side.