Page MenuHomePhabricator

MediaWiki installer appears unstyled
Closed, DeclinedPublic

Description

The URI http://localhost:8888/w/mw-config/index.php?css=1
fails with stack trace

[80ba4ffea71b48ea32ce81d5] /w/mw-config/index.php?css=1 RuntimeException from line 358 of /Users/jrobson/git/core/includes/resourceloader/ResourceLoaderSkinModule.php: The key `1x` is required for wgLogos or wgLogo must be defined.

Backtrace:

#0 /Users/jrobson/git/core/includes/resourceloader/ResourceLoaderSkinModule.php(427): ResourceLoaderSkinModule::getAvailableLogos(MultiConfig)
#1 /Users/jrobson/git/core/includes/resourceloader/ResourceLoaderFileModule.php(1077): ResourceLoaderSkinModule->getLessVars(ResourceLoaderContext)
#2 /Users/jrobson/git/core/includes/resourceloader/ResourceLoaderFileModule.php(976): ResourceLoaderFileModule->compileLessString(string, string, ResourceLoaderContext)
#3 /Users/jrobson/git/core/includes/resourceloader/ResourceLoaderFileModule.php(952): ResourceLoaderFileModule->processStyle(string, string, ResourceLoaderFilePath, ResourceLoaderContext)
#4 /Users/jrobson/git/core/includes/resourceloader/ResourceLoaderFileModule.php(929): ResourceLoaderFileModule->readStyleFile(ResourceLoaderFilePath, ResourceLoaderContext)
#5 /Users/jrobson/git/core/includes/installer/WebInstallerOutput.php(160): ResourceLoaderFileModule->readStyleFiles(array, ResourceLoaderContext)
#6 /Users/jrobson/git/core/includes/installer/WebInstaller.php(1246): WebInstallerOutput->getCSS()
#7 /Users/jrobson/git/core/includes/installer/WebInstaller.php(178): WebInstaller->outputCss()
#8 /Users/jrobson/git/core/mw-config/index.php(82): WebInstaller->execute(array)
#9 /Users/jrobson/git/core/mw-config/index.php(40): wfInstallerMain()
#10 {main}

This leads to the installer being unstyled.

Seems pretty important to have this figured out before the release :)

Related Objects

Event Timeline

Change 612427 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/core@master] Don't load mediawiki.skinning.interface on installer

https://gerrit.wikimedia.org/r/612427

@Legoktm this might be a dumb question but do you have a LocalSettings.php in your install folder with wgLogo or wgLogos set? (I don't know enough about the installer to know if that's possible)

I get this issue whenever I rename LocalSettings.php

Also: Is there any way I might be caching some invalid value for wgLogo/wgLogos somewhere based on previous installs?

Jdlrobson lowered the priority of this task from High to Medium.Jul 14 2020, 5:36 PM

I cannot reproduce this morning so that is interesting... :)
Is there any session caching going on here?

I was testing with no LocalSettings.php, so a fresh install.

I just now tested it (with the newest master) using the upgrader workflow (LocalSettings.php exists and you type in the upgrader key) and it works fine.

I have the default $wgLogo set, so:

$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";

Should I try testing with a different value?

Also: Is there any way I might be caching some invalid value for wgLogo/wgLogos somewhere based on previous installs?

I don't think so, but the installer is weird...

In theory this would only happen on a fresh install - when wgLogo or wgLogos is not set. Looking at the code it seems we provide default values for these, so my guess at this point is that it was somehow caching an empty or false value - how I have no idea at this point :(.

Aside: We probably want to drop mediawiki.skin.interface per https://gerrit.wikimedia.org/r/c/612427 regardless - it doesn't look like any of the CSS rules there are ever used by the installer.

Krinkle removed a project: MW-1.35-release.
Krinkle subscribed.

Fixing the error is T247790 (no styles is just what happens when the browser response is killed half-way by the server). If there's a styling issue, please re-open or file a new task.

Change 612427 abandoned by Jdlrobson:
[mediawiki/core@master] Don't load mediawiki.skinning.interface on installer

Reason:
I was only one able to replicate.

https://gerrit.wikimedia.org/r/612427