Last modified: 2014-08-27 13:51:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T45917, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43917 - Delete all redundant "MediaWiki" pages for system messages
Delete all redundant "MediaWiki" pages for system messages
Status: ASSIGNED
Product: Wikimedia
Classification: Unclassified
Site requests (Other open bugs)
wmf-deployment
All All
: Normal normal (vote)
: ---
Assigned To: Krinkle
: shell
Depends on: 43915 48050
Blocks: 16660 29782
  Show dependency treegraph
 
Reported: 2013-01-13 01:14 UTC by Krinkle
Modified: 2014-08-27 13:51 UTC (History)
16 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2013-01-13 01:14:19 UTC
I encountered many times now on wikis (usually the small wikis) that there are 100s of local MediaWiki pages with translations from before translatewiki.net covered that language.

And even after twn covered it, there may have been local improvements that over time make it into twn, but then the local page stales.

To avoid translations from going out of sync (the longer we wait with this, the harder it is to clean them up as the difference between an override and an outdated translation becomes harder to tell), and also to avoid migration issues when messages change.

Lets run this asap.
Comment 1 Nemo 2013-01-13 01:46:21 UTC
This is a subset of the general task "clean-up local messages".
What we have now:
[[mw:Localisation#Old_local_translation_system]]
https://toolserver.org/~robin/?tool=cleanuplocalmsgs
Comment 2 MA 2013-01-21 00:44:14 UTC
Can the old [[User:MediaWiki default]] be used for this task? (Please note that since it does not run since 2006 it has been deflagged from the bot group from some projects).

I understand this is going to affect messages pre-betawiki. However I wonder what would happen with messages that we decided to customize localy. Those should not be deleted as they're likely going to be recreated later... Only a minor issue, though.
Comment 3 Krinkle 2013-01-22 22:57:57 UTC
(In reply to comment #2)
> Can the old [[User:MediaWiki default]] be used for this task?

The script I wrote uses that user and ensures it is in the bot group  (that is, add if not present) before it runs.

(In reply to comment #2)
> I understand this is going to affect messages pre-betawiki.

No, it is not.

(In reply to comment #2)
> However I  what would happen with messages that we decided to customize

Nothing.
Comment 4 Krinkle 2013-01-22 22:58:18 UTC
See bug 43915.
Comment 5 Thehelpfulone 2013-02-28 07:53:30 UTC
Any progress on running this?
Comment 6 Krinkle 2013-03-05 19:38:14 UTC
I could run it, but I'd like to not execute my own request without a little more consensus from people.

They aren't permanent or hidden actions in any way (regular wiki deletions, it's a bot basically), but they would be a horror to undo.

I wouldn't know why someone would disagree, but then again, there've only been a few people involved so far that all agreed.
Comment 7 Thehelpfulone 2013-03-05 20:53:56 UTC
(In reply to comment #6)
> I could run it, but I'd like to not execute my own request without a little
> more consensus from people.
> 
> They aren't permanent or hidden actions in any way (regular wiki deletions,
> it's a bot basically), but they would be a horror to undo.
> 

Can you dry run it and make a list of the pages that will be deleted so they can be reviewed before deletion?
Comment 8 Krinkle 2013-04-11 20:34:27 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > I could run it, but I'd like to not execute my own request without a little
> > more consensus from people.
> > 
> > They aren't permanent or hidden actions in any way (regular wiki deletions,
> > it's a bot basically), but they would be a horror to undo.
> > 
> 
> Can you dry run it and make a list of the pages that will be deleted so they
> can be reviewed before deletion?

I'm not sure what there is to review regarding individual pages. They all follow the same description, whatever reasoning one would use about them doesn't specify for any particular page:

 Pages in the MediaWiki namespace that exist and override a system message
 of which the wiki page contents are equal to the system message of the site
 language (in other words, there is no longer a reason fo the override page
 to exist).

Deleting these pages has no visible effect as the effective value of the interface message will still be the same.

The advantage is saving maintenance work later on by not having to update these messages when the software upgrades, and for consistency across wikis.

A common scenario is the following:
* 3 wikis in language x
* 1 of the wikis overrides a message (making an improvement)
* the message is fixed in translatewiki
* the message update is deployed
* users of all 800 wikis using language x now see the new version of the message
* another update is made to the message and deployed
* all wikis use it, except the wiki where the first change came from which is now out of sync without it being intentionally so.


Alright, I'm biased as it was my own idea. But that doesn't mean the script itself has to be controversial. I'll run this next week if no objections are raised before then.
Comment 9 Gerrit Notification Bot 2013-05-03 15:56:39 UTC
Related URL: https://gerrit.wikimedia.org/r/62159 (Gerrit Change I2680413c276365a44c935a6f6fdd740daa86341e)
Comment 10 Gerrit Notification Bot 2013-05-22 23:14:53 UTC
Related URL: https://gerrit.wikimedia.org/r/64991 (Gerrit Change I2680413c276365a44c935a6f6fdd740daa86341e)
Comment 11 Nemo 2013-06-20 19:43:19 UTC
(In reply to comment #10)
> Related URL: https://gerrit.wikimedia.org/r/64991 (Gerrit Change
> I2680413c276365a44c935a6f6fdd740daa86341e)

Merged a month ago.

Given bug 14176 (bug 49793), the script should also delete blank messages and be run as soon as possible; unless a separate script is prepared and run for that only.
Comment 12 Krinkle 2013-06-20 20:09:44 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > Related URL: https://gerrit.wikimedia.org/r/64991 (Gerrit Change
> > I2680413c276365a44c935a6f6fdd740daa86341e)
> 
> Merged a month ago.
> 
> Given bug 14176 (bug 49793), the script should also delete blank messages and
> be run as soon as possible; unless a separate script is prepared and run for
> that only.

Since blank messages no longer mean showing the default, deleting them seems inappropriate.

Yes, there are likely some pages out there that are blank and currently causing bugs due the message being empty instead of the default. However it would be a mistake to unconditionally delete all blank pages in the MediaWiki namespace.

For maintenance scripts like deleteEqualMessages it is important that they do not affect the interface. It should only delete things that are non-controversial.

If a script to delete empty messages existed in the past, we could've run it once globally after we reverted the feature to have blank messages mean default. But it has been to long to do this now. And one could also argue that it was dangerous even then because there might be existing pages that are blank for other reasons.
Comment 13 Nemo 2013-06-20 20:43:58 UTC
(In reply to comment #12)
> If a script to delete empty messages existed in the past, we could've run it
> once globally after we reverted the feature to have blank messages mean
> default. But it has been to long to do this now.

What do you mean too long? It's been today for Wikipedias (1.22wmf7). Blank message has always meant "equal to default", so it doesn't seem out of scope for the script, which should be run by third parties before upgrading to MediaWiki 1.22.
If you consider it out of scope I'd file a bug for another script to be created, but nobody would be working on it so it would become too late so I'll just add a warning on [[MediaWiki 1.22]] and let sysops sort it out manually.
Comment 14 MZMcBride 2013-06-21 01:26:56 UTC
(In reply to comment #13)
> (In reply to comment #12)
>> If a script to delete empty messages existed in the past, we could've run it
>> once globally after we reverted the feature to have blank messages mean
>> default. But it has been to long to do this now.
> 
> What do you mean too long? It's been today for Wikipedias (1.22wmf7). Blank
> message has always meant "equal to default", so it doesn't seem out of scope
> for the script, which should be run by third parties before upgrading to
> MediaWiki 1.22.

Not always. The behavior has switched a few times now.

There's no good answer here. It's impossible to determine intent simply by page_len being equal to 0. I tend to agree with Krinkle that it's better to be cautious here.

Even the "redundant" messages getting deleted makes me a little sad, given how useful some of that page history can be (including being linked from active bug reports). But I understand that it's better future-proofing. Alas.

> [...] [[MediaWiki 1.22]] [...]

You mean [[mw:MediaWiki 1.22]], of course.
Comment 15 Krinkle 2013-10-09 18:57:34 UTC
I've run this on a single wiki where I'm also a local sysop (nlwiki) and noticed the script has a minor flaw.

It incorrectly deleted MediaWiki:Sitenotice (if it is empty), which is undesirable. So we should probably change the script to make an exception for empty messages.

Those are most unlikely to change anyway because there is no message content to update or change, it is empty.
Comment 16 Platonides 2013-10-09 19:02:13 UTC
> Even the "redundant" messages getting deleted makes me a little sad, given
> how useful some of that page history can be (including being linked from active
> bug reports). But I understand that it's better future-proofing. Alas.

I remember blanking some MediaWiki messages precisely to use the default but keep the history.
Maybe the script should edit the messages to whatever is used now to mean "use the default" ("-" ?) when there are several edits to the page.
Comment 17 Krinkle 2013-10-09 19:08:57 UTC
(In reply to comment #15)
> I've run this on a single wiki where I'm also a local sysop (nlwiki) and
> noticed the script has a minor flaw.
> 
> It incorrectly deleted MediaWiki:Sitenotice.

Fixed in I5b416cda25a3641862df9919c46ae59ad5d5d6e0.
Comment 18 Krinkle 2013-10-09 19:10:58 UTC
(In reply to comment #16)
> > Even the "redundant" messages getting deleted makes me a little sad, given
> > how useful some of that page history can be (including being linked from active
> > bug reports). But I understand that it's better future-proofing. Alas.
> 
> I remember blanking some MediaWiki messages precisely to use the default but
> keep the history.
> Maybe the script should edit the messages to whatever is used now to mean
> "use
> the default" ("-" ?) when there are several edits to the page.

Sometimes '', sometimes '-' (handled by Message:isBlank and Message::isDisabled) however those are not generic APIs. The message system does not use these methods. They are available for local code to use if they want to.

So there's no way of knowing whether an individual message "supports" that behaviour, and even then we currently have some use '' and some use '-' ('' is a safe bet for both).
Comment 19 Platonides 2013-10-09 19:25:22 UTC
I'm confused by comment #12 and #13 then, I understood from them that '' no longer meant default.
Comment 20 Nemo 2013-10-09 20:09:08 UTC
Blanking a message no longer disables it (bug 14176), so all pre-12.06.2013 blankings should be transformed in deletions.
Comment 21 Krinkle 2013-10-09 22:48:45 UTC
The short version of the long story (that is partially outlined in previous comments by all of you) is that it:

* Was never consistent to be begin with.
* It has changed over time.
  So we can't reliably know now what to do with a message. You'd have to account
  for deployment dates for different wikis and assume a community member
  intentionally left a message override untouched knowing the new behaviour.
  More likely it was forgotten about and is actually still assuming the old logic. 
* It can vary by message whether it is blankable or disableable.

If the code calls isBlank first (like Sitenotice) then it can be blanked with '' without leaving a gap in the interface because the feature checks it first.

If the code calls isDisabled first, and then falls back or something, then it can be blanked with '' or '-' and it will use the default.

However by far the default behaviour for the majority of messages is that if you create a local page, it replaces the message with that page. And if you put '' or '-' in it, it will appear as a gap in the interface.

Either way, those pages are there with empty content for a reason, so it doesn't make sense to delete them en mass as part of this maintenance script.
Comment 22 Nemo 2014-03-19 09:57:05 UTC
Krinkle, are you still planning to work on this?
Comment 24 Krinkle 2014-03-21 17:25:02 UTC
Done!

$ mwscript deleteEqualMessages.php --wiki wuuwiki --delete

Checking for pages with default message...
... fetching message info for content language
352 pages in the MediaWiki namespace override messages.
110 pages are equal to the default message (+ 0 talk pages).

...deleting equal messages (this may take a long time!)...
* [[MediaWiki:Sitematrix]]
* [[MediaWiki:Cite]]
* [[MediaWiki:Searchfulltext]]
* [[MediaWiki:Createarticle]]
* [[MediaWiki:Categorytree-mode-categories]]
* [[MediaWiki:Categorytree-expand]]
* [[MediaWiki:Categorytree-no-pages]]
* [[MediaWiki:Sitesupport]]
* [[MediaWiki:Fri]]
* [[MediaWiki:January-gen]]
* [[MediaWiki:March-gen]]
* [[MediaWiki:May-gen]]
* [[MediaWiki:September-gen]]
* [[MediaWiki:October-gen]]
* [[MediaWiki:November-gen]]
* [[MediaWiki:Mypage]]
* [[MediaWiki:History short]]
* [[MediaWiki:Print]]
* [[MediaWiki:Mainpage]]
* [[MediaWiki:Nstab-template]]
* [[MediaWiki:Logout]]
* [[MediaWiki:Userlogout]]
* [[MediaWiki:Notloggedin]]
* [[MediaWiki:Loginerror]]
* [[MediaWiki:Loginsuccesstitle]]
* [[MediaWiki:Wrongpassword]]
* [[MediaWiki:Bold sample]]
* [[MediaWiki:Bold tip]]
* [[MediaWiki:Savearticle]]
* [[MediaWiki:Loginreqtitle]]
* [[MediaWiki:Loginreqlink]]
* [[MediaWiki:Yourdiff]]
* [[MediaWiki:Nohistory]]
* [[MediaWiki:Nextrevision]]
* [[MediaWiki:Rev-delundel]]
* [[MediaWiki:Prevn]]
* [[MediaWiki:Prefs-personal]]
* [[MediaWiki:Prefs-rc]]
* [[MediaWiki:Prefs-watchlist]]
* [[MediaWiki:Prefs-watchlist-days]]
* [[MediaWiki:Prefs-watchlist-edits]]
* [[MediaWiki:Saveprefs]]
* [[MediaWiki:Searchresultshead]]
* [[MediaWiki:Savedprefs]]
* [[MediaWiki:Yourlanguage]]
* [[MediaWiki:Badsig]]
* [[MediaWiki:Userrights-user-editname]]
* [[MediaWiki:Rclistfrom]]
* [[MediaWiki:Diff]]
* [[MediaWiki:Hist]]
* [[MediaWiki:Show]]
* [[MediaWiki:Minoreditletter]]
* [[MediaWiki:Newpageletter]]
* [[MediaWiki:Uploadbtn]]
* [[MediaWiki:Uploadnologin]]
* [[MediaWiki:Uploaderror]]
* [[MediaWiki:Uploadlog]]
* [[MediaWiki:Uploadlogpagetext]]
* [[MediaWiki:Filedesc]]
* [[MediaWiki:Uploadedfiles]]
* [[MediaWiki:Uploadwarning]]
* [[MediaWiki:Savefile]]
* [[MediaWiki:Destfilename]]
* [[MediaWiki:Uploadnewversion-linktext]]
* [[MediaWiki:Download]]
* [[MediaWiki:Listredirects]]
* [[MediaWiki:Randompage]]
* [[MediaWiki:Statistics]]
* [[MediaWiki:Brokenredirects]]
* [[MediaWiki:Popularpages]]
* [[MediaWiki:Mostlinked]]
* [[MediaWiki:Mostlinkedcategories]]
* [[MediaWiki:Mostimages]]
* [[MediaWiki:Shortpages]]
* [[MediaWiki:Longpages]]
* [[MediaWiki:Listusers]]
* [[MediaWiki:Newpages-username]]
* [[MediaWiki:Log]]
* [[MediaWiki:Emailsend]]
* [[MediaWiki:Emailsent]]
* [[MediaWiki:Emailsenttext]]
* [[MediaWiki:Watchthispage]]
* [[MediaWiki:Unwatchthispage]]
* [[MediaWiki:Created]]
* [[MediaWiki:Confirm]]
* [[MediaWiki:Deletionlog]]
* [[MediaWiki:Rollback]]
* [[MediaWiki:Rollback short]]
* [[MediaWiki:Rollbackfailed]]
* [[MediaWiki:Protectlogpage]]
* [[MediaWiki:Restriction-edit]]
* [[MediaWiki:Restriction-move]]
* [[MediaWiki:Undeletepage]]
* [[MediaWiki:Mycontris]]
* [[MediaWiki:Blocklink]]
* [[MediaWiki:Blocklogpage]]
* [[MediaWiki:Movepagebtn]]
* [[MediaWiki:Cantmove-titleprotected]]
* [[MediaWiki:Thumbnail-more]]
* [[MediaWiki:Newimages]]
* [[MediaWiki:Variantname-zh-tw]]
* [[MediaWiki:Watchlistall2]]
* [[MediaWiki:Namespacesall]]
* [[MediaWiki:Descending abbrev]]
* [[MediaWiki:Table pager next]]
* [[MediaWiki:Table pager prev]]
* [[MediaWiki:Table pager first]]
* [[MediaWiki:Table pager limit]]
* [[MediaWiki:Autoredircomment]]
* [[MediaWiki:Version]]

done!
Comment 25 Krinkle 2014-04-23 19:35:29 UTC
Ran mwscript deleteEqualMessages.php --delete --delete-talk on the following wikis:

* afwiki
* amwiki
* brwiki
* euwiktionary
* gvwiki
* hrwiki
* hrwiktionary
* iawiki
* miwiki
* mlwiki
Comment 26 Nemo 2014-04-23 19:42:53 UTC
Thanks! I'd suggest to avoid touching talk pages, so that the operation is truly no-op. Those talk pages are unlikely to exist but wikis have different policies on the matter.
Comment 27 Krinkle 2014-04-23 20:12:05 UTC
(In reply to Nemo from comment #26)
> Thanks! I'd suggest to avoid touching talk pages, so that the operation is
> truly no-op. Those talk pages are unlikely to exist but wikis have different
> policies on the matter.

Good point. We have orphan tools to detect those and are indeed not always trivial/uncontroversial. Will keep them from now on.
Comment 28 Krinkle 2014-05-06 00:46:42 UTC
Spread over the past two weeks, mwscript deleteEqualMessages.php was ran[1] on the following wikis while performing other routine maintenance and interface fixes:

abwiki
afwiki
afwikiquote
alswiki
bat-smgwiki
bpywiki
cswiki
cswikiversity
cswiktionary
cvwiki
lnwiki
nahwiktionary
newwiki
nlwiki
rowiktionary
simplewiki
sqwiki
suwiki
tlwiki

[1] https://wikitech.wikimedia.org/wiki/Server_admin_log
Comment 29 Krinkle 2014-08-27 13:51:19 UTC
Ran for commonswiki per my own request there as sysop (could've deleted them by hand):


> 279 pages in the MediaWiki namespace override messages.
> 1 pages are equal to the default message (+ 0 talk pages).
> 
> List:
> * [[MediaWiki:Visualeditor-ca-editsource]]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links