Last modified: 2014-08-19 13:14:24 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 T71640, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69640 - Ordering of levels in $wgRestrictionLevels causes bad ordering on protection form
Ordering of levels in $wgRestrictionLevels causes bad ordering on protection ...
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Site requests (Other open bugs)
wmf-deployment
All All
: High normal (vote)
: ---
Assigned To: Brad Jorsch
:
: 69464 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-16 02:21 UTC by Brad Jorsch
Modified: 2014-08-19 13:14 UTC (History)
11 users (show)

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


Attachments

Description Brad Jorsch 2014-08-16 02:21:24 UTC
Reported on enwiki at https://en.wikipedia.org/wiki/MediaWiki_talk:Protect-text#Confirm_protection_dropdowns

Gerrit change #153302 inadvertently changed the ordering of the levels in $wgRestrictionLevels for wikis not using the default levels. For example, on enwiki the array was coming out as

 array(5) {
   [0]=>
   string(14) "templateeditor"
   [1]=>
   string(0) ""
   [2]=>
   string(13) "autoconfirmed"
   [3]=>
   string(5) "sysop"
   [4]=>
   string(12) "superprotect"
 }

The protection form displays the protection levels in the same order, while admins on-wiki would expect to see "Allow all users" ('') first and "Allow only template editors and admins" ('templateeditor') third.

To get the proper ordering, it looks like we'll have to specify the entire array rather than using the '+' syntax in InitialiseSettings.php.
Comment 1 Gerrit Notification Bot 2014-08-16 02:26:55 UTC
Change 154376 had a related patch set uploaded by Anomie:
Fix $wgRestrictionLevels ordering

https://gerrit.wikimedia.org/r/154376
Comment 2 Andre Klapper 2014-08-16 10:51:06 UTC
*** Bug 69464 has been marked as a duplicate of this bug. ***
Comment 3 Helder 2014-08-16 12:55:39 UTC
Also affects Portuguese Wikipedia, where the order of the options on
https://pt.wikipedia.org/w/index.php?title=Example&action=protect&uselang=en
changed from
1. Default
2. Allow only autoconfirmed users
3. Allow only autoreviewer users
4. Allow only administrators
to
3. Allow only autoreviewer users
1. Default
2. Allow only autoconfirmed users
4. Allow only administrators
Comment 4 Brad Jorsch 2014-08-16 13:02:54 UTC
(In reply to Helder from comment #3)
> Also affects Portuguese Wikipedia

True, thanks. Also arwiki, ckbwiki, hewiki, plwiki, rowiki, and testwiki.
Comment 5 Antoine "hashar" Musso (WMF) 2014-08-16 20:35:18 UTC
Brad proposed change https://gerrit.wikimedia.org/r/154376 will fix the issue.  It is too late for me (10pm) to deploy it right now, so I guess it will be deployed on Monday. Sorry for the delay, I am too paranoid / tired to risk causing some havoc on the cluster =]
Comment 6 Gerrit Notification Bot 2014-08-19 13:10:59 UTC
Change 154376 merged by jenkins-bot:
Fix $wgRestrictionLevels ordering

https://gerrit.wikimedia.org/r/154376
Comment 7 Antoine "hashar" Musso (WMF) 2014-08-19 13:14:24 UTC
I have deployed the change:

$ sync-file wmf-config/InitialiseSettings.php 'Fix $wgRestrictionLevels ordering {{bug|69640}}'
No syntax errors detected in /a/common/wmf-config/InitialiseSettings.php
13:12:34 Started sync-proxies
sync-proxies: 100% (ok: 4; fail: 0; left: 0)                                    
13:12:34 Finished sync-proxies (duration: 00m 00s)
13:12:34 Started sync-apaches
sync-common: 100% (ok: 227; fail: 0; left: 0)                                   
13:12:38 Finished sync-apaches (duration: 00m 03s)
13:12:38 Synchronized wmf-config/InitialiseSettings.php: Fix $wgRestrictionLevels ordering {{bug|69640}} (duration: 00m 04s)


Thank you for the report and thank you Brad for the patch!

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


Navigation
Links