Page MenuHomePhabricator

Message variables substituted at install time
Closed, ResolvedPublic

Description

Author: timwi

Description:
BUG MIGRATED FROM SOURCEFORGE
http://sourceforge.net/tracker/index.php?func=detail&aid=948139&group_id=34373&atid=411192
Originally submitted by Sean Proctor (sproctor)<a href="/help/icon_legend.php?context=user_wantsdonations&amp;user_id=43755&amp;return_to=%2F"><IMG src="http://images.sourceforge.net/images/icons/donate.png" alt="Accepting Donations" border="0" width="16" height="16"></a> 2004-05-05 03:26

My wiki is behind a proxy server. I have $wgServer set
properly. the rest of the links follow that, but the
links to change the messages on this page do not. they
all include the port that the proxy server is sending
on. I've tried to fix this myself, but
InitialiseMessages.inc seems to be the file that
affects this, but it doesn't seem to actually do anything.

  • Additional comments ------------------------

Date: 2004-05-05 03:37
Sender: SF user vibber

You can edit that page and do a global search-and-replace to
the correct
URL. (Also you can regenerate messages using maintenance/
rebuildMessages.php but currently this requires some adjustments
to
LocalSettings.php to run cleanly; make sure it can't be run from
the
web!)

The problem is that the auto-detected $wgServer is put into those
links
when the page is generated at install time, so before you've
had a
chance to customize it.

I'm changing the summary of this bug report to reflect that we
should
make this more flexible.


Version: 1.4.x
Severity: normal

Details

Reference
bz296

Revisions and Commits

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 6:53 PM
bzimport set Reference to bz296.
bzimport added a subscriber: Unknown Object (MLST).

timwi wrote:

*** Bug 315 has been marked as a duplicate of this bug. ***

This bug causes FAQ issues, so really should get fixed for 1.4.

The first step was adding enough {{}} variables to cover the relevant stuff instead of interpolating PHP variables in the string literals,
but they're still being substituted at MediaWiki:-namespace initialization time.

I ran into the same problem under 1.4 shortly: in Languages.php I needed to use
{{SERVER}} in a message text XYZ to generate MediaWiki:XYZ page.

However:
wfMsg('XYZ') and MediaWiki:XYZ did not show "http://myserver" but showed
"http://localhost" as substitute.

Solution as suggested by Brion (luckily enough, I found it by myself):

If you need the server's name at installation or rebuildmessage.php time use
{{{{SERVER}}}} . All other variables are not affected, thus normal variable
quoting {{ ... }} appears to be sufficient.

If this information doubles Brion's, then please delete it. I just wanted to
confirm the findings and the ad-hoc solution.

  • Bug 2260 has been marked as a duplicate of this bug. ***
epriestley added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:14 AM
epriestley added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:19 AM