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 created this task.Oct 23 2015, 12:20 PM
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.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 23 2015, 12:20 PM

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.

saper added a comment.Oct 23 2015, 7:32 PM

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 moved this task from In progress to Backport 1.26? on the MediaWiki-Installer board.
saper closed this task as Resolved.Oct 27 2015, 5:50 PM
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

Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptFeb 13 2016, 11:41 AM
Krinkle changed the task status from Duplicate to Resolved.May 4 2018, 4:16 PM