Page MenuHomePhabricator

wgGroupPermissions setting causes Vector.php error
Closed, ResolvedPublic


Author: wade.penner

My LocalSettings.php are as follows:

$wgGroupPermissions['*']['read'] = false;
$wgDefaultSkin = 'vector';

When not logged in get the following error when clicking on 'Talk:Main Page'

Fatal error: Call to a member function isCurrent() on a non-object in /home/XXXXX/w/skins/Vector.php on line 143

Changing $wgDefaultSkin to standard, nostalgia, cologneblue, or monobook I do not get the error. When logged in I do not get the error.

Version: 1.16.x
Severity: normal
OS: Linux



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:16 PM
bzimport set Reference to bz25488.

Are you sure this is caused by your $wgGroupPermissions setting? If you comment out or remove the ['*']['read'] = false; line, does the error go away?

For other commenters' convenience, line 143 is:
if ( ( $isTalk && $wgArticle->isCurrent() ) || ( $wgOut->showNewSectionLink() ) ) {

So this seems to point to $wgArticle not being set right, which is strange.

wade.penner wrote:

Commenting out '$wgGroupPermissions['*']['createaccount'] = false;' makes the error go away.

However that also allow anonymous edits. The expected behavior is that get the following message.

"Login required

You must log in to view other pages."

Using the other skins, I get that message. Using Vector, I get the fatal error.

wade.penner wrote:

Just to be clear this issue only effects the talk page, not the 'Main Page' or 'Log in'.

Fixed in r76239. This doesn't occur in other skins because SkinTemplate.php line 733 checks for $wgArticle.