Page MenuHomePhabricator

Undefined property and missing lock reason if wiki is r/o
Closed, ResolvedPublic

Description

During the latest breakdown of the WMF servers I found a bug:

  1. Trying to _edit_ in r/o mode results in an error message w/o lock reason:

    The administrator who locked it offered this explanation: $1

Trying to _delete_ a page results in an error message with lock reason:

The administrator who locked it offered this explanation: Emergency maintenance, should be back in a few minutes
  1. Investigating this bug in my local wiki (based on r25292) I found another bug:

<b>Notice</b>: Undefined property: EditPage::$edit in <b>F:\xampp\htdocs\wikitest\includes\EditPage.php</b> on line <b>335</b><br />

Adding

			$this->edit      = false;

near line 550 of EditPage.php fixes the notice but not the bug mentioned in 1.


Version: 1.11.x
Severity: normal

Details

Reference
bz11114

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:52 PM
bzimport set Reference to bz11114.

Regression caused by the new permissions error reporting system.
For read-only case, the read-only text didn't get passed back with the message from Title::getUserPermissionsErrors().
The text is either originally set in $wgReadOnly or gets loaded into it from $wgReadOnlyFile during wfReadOnly(), so pulling that it now gets passed back as expected.
Other functions using $wgOut->readOnlyPage() would have still got the original, still working, behavior.

Fixed in r25293