Page MenuHomePhabricator

Logo not displayed after using the installer
Closed, ResolvedPublic

Description

Generated LocalSettings.php include:

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

but $wgResourceBasePath is not defined anywhere. I think https://gerrit.wikimedia.org/r/#/c/235263 might have broken this.

Event Timeline

saper raised the priority of this task from to Needs Triage.
saper updated the task description. (Show Details)
saper added a project: MediaWiki-Installer.
saper added subscribers: saper, Krinkle.

Change 248321 had a related patch set uploaded (by saper):
Define $wgResourceBasePath in LocalSettings.php

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

saper renamed this task from Logo not displayed after using command-line installer to Logo not displayed after using the installer.Oct 23 2015, 12:45 PM
saper updated the task description. (Show Details)
saper set Security to None.

Confirmed with both web and the command line installers.

This comment was removed by saper.

This should not be needed.

  • $wgResourceBasePath is null in DefaultSettings.
  • $wgResourceBasePath is initialised in Setup.php.
  • $wgLogo is false in DefaultSettings.
  • $wgLogo is initialised in Setup.php, after $wgResourceBasePath.

The installer shouldn't export default values. If it does, it should export a default value of false (which is the real default settings value), not {$wgResourceBasePath}/resources/assets/wiki.png.

My rule is "never assume anything" :)
I am not sure where the bug is, but it just generates a wrong URL in the end.

  1. $wgResourceBasePath is null in DefaultSettings.php
  2. $wgResourceBasePath (null at the time) gets used in LocalSettings.php to define $wgLogo
  3. Setup.php initialized $wgResourceBasePath to $wgScriptPath, but $wgLogo is already set.

As you say, probably LocalSettings.php generator shouldn't set $wgLogo to anything related to $wgResourceBasePath, but this was changed in I6f18895f3caa50871327eec108fc7d70c1077f1e (a fix for T75031).

WebInstaller offers $wgResourceBasePath/resources/asset value as the default for the user in the input box as well.

We have traditionally have given a path to the image in $wgLogo. I think this might be easier this way for the total beginners to change their logo (the first customization undertaken probably).

Change 248321 merged by jenkins-bot:
installer: Define $wgResourceBasePath in LocalSettings.php

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

saper claimed this task.

Change 250286 had a related patch set uploaded (by Krinkle):
installer: Define $wgResourceBasePath in LocalSettings.php

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

Change 250286 merged by jenkins-bot:
installer: Define $wgResourceBasePath in LocalSettings.php

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

Krinkle changed the task status from Duplicate to Resolved.May 4 2018, 4:16 PM