Topic on Project:Support desk/Flow

issue with upgrade to 1.35

10
151.210.138.204 (talkcontribs)

I get the following error when executing php update.php from the maintenance folder:

PHP Fatal error:  Uncaught Exception: Unable to open file /skins/MonoBook/skin.json: filemtime(): stat failed for /skins/MonoBook/skin.json in /home/<user>/webapps/<site>/includes/registration/ExtensionRegistry.php:177

Stack trace:

#0 /home/<user>/webapps/<site>/includes/GlobalFunctions.php(88): ExtensionRegistry->queue('/skins/MonoBook...')

#1 /home/<user>/webapps/<site>/LocalSettings.php(137): wfLoadSkin('MonoBook')

#2 /home/<user>/webapps/<site>/includes/Setup.php(143): require_once('/home/mercuryin...')

#3 /home/<user>/webapps/<site>/maintenance/doMaintenance.php(91): require_once('/home/mercuryin...')

#4 /home/<user>/webapps/<site>/maintenance/update.php(253): require_once('/home/mercuryin...')

#5 {main}

  thrown in /home/<user>/webapps/<site>/includes/registration/ExtensionRegistry.php on line 177


Any help appreciated!

Bawolff (talkcontribs)

Are you missing monobook skin?

151.210.138.204 (talkcontribs)

Well... the 1.35 package expands to give a /skins folder with /MonoBook in it and skin.json so I can't see an issue there.

As suggested I have added the skin to the LocalSettings.php file using wfLoadSkin('MonoBook'). Perhaps it's not necessary to declare this if it's a default skin?

Bawolff (talkcontribs)

Huh, the paths look weird there in the error message. What is $wgStyleDirectory set to? Has it been changed from default?

151.210.138.204 (talkcontribs)

(I have replaced the actual user and site with <user> and <site> in the URL's for privacy when posting.)

The location of the skins directory was set thus:

$wgStyleDirectory   = "$IP/skins";

$IP = $_SERVER['DOCUMENT_ROOT'];

...so I have used a more absolute entry for $IP.


Rerunning update.php is successful, however, I have a subsequent error at this point:

Beginning migration of revision.rev_user and revision.rev_user_text to revision_actor_temp.revactor_actor

... rev_id=100

... rev_id=200

... rev_id=300

... rev_id=400

... rev_id=500

... rev_id=600

... rev_id=700

... rev_id=800

... rev_id=900

... rev_id=1000

... rev_id=1100

... rev_id=1200

MediaWiki\Revision\RevisionAccessException from line 1296 of /home/<user>/webapps/<site>/includes/Revision/RevisionStore.php: Main slot of revision not found in database. See T212428.


I can see T212428 refers to a previous bug/revision but I can't find a way through this error.

Any suggestions?

Bawolff (talkcontribs)

If therr was an error in your $IP = $_SERVER['DOCUMENT_ROOT']; line (and $IP was null), it might cause the error you described. I would double check $IP 's value.

151.210.138.204 (talkcontribs)

I'm assuming $IP's value is correct. After giving it a hard URL the update.php script was able to find the /skins directory.

So to confirm - I've commented out the $IP = $_SERVER['DOCUMENT_ROOT']; line and replaced it with:

$IP = "/home/<user>/webapps/<site>";

Bawolff (talkcontribs)

That probably makes sense because the cli has no document root.


T212428 means phab:T212428

151.210.138.204 (talkcontribs)

I understand. I've set $_SERVER['DOCUMENT_ROOT'] manually at the top of includes/Revision/RevisionStore.php:

$_SERVER['DOCUMENT_ROOT'] = "/home/<user>/webapps/<site>";


Running maintenance/update.php again results in what looks like the same error?:

Creating actor entries for all registered users

... 1 - 1

Completed actor creation, added 0 new actor(s)

Beginning migration of revision.rev_user and revision.rev_user_text to revision_actor_temp.revactor_actor

MediaWiki\Revision\RevisionAccessException from line 1299 of /home/mercuryinretrograde/webapps/mercuryinretrograde_org/includes/Revision/RevisionStore.php: Main slot of revision not found in database. See T212428.


Any suggestions?

Is there a better place to set $_SERVER['DOCUMENT_ROOT']?

Lordgilman (talkcontribs)

This is coming back with the update to MediaWiki 1.39. The solution for being unable to load both skins and extensions was to remove the

require_once( "includes/DefaultSettings.php" );

from LocalSettings.php. It is cruft from old installers and is no longer necessary. There was no need to patch IP or the $wgStyleDirectory.

Reply to "issue with upgrade to 1.35"