Page MenuHomePhabricator

Notice: Use of undefined constant NS_MODULE - assumed 'NS_MODULE' in /srv/mediawiki/wmf-config/CommonSettings.php on line 3099
Closed, ResolvedPublic


Error exploded when I moved to wmf.9

FWIW, the constant does seem to be defined:

hphpd> var_dump(constant('NS_MODULE'));                                                                                                                                  

Not sure what's happening, needs more investigation.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 11 2017, 8:04 PM

+MediaWiki-extensions-TemplateSandbox since that's the line line that seems problematic in CommonSettings.php

Reedy added a subscriber: Reedy.Jul 11 2017, 8:06 PM

Easy to fix

Problem is swap to Extension Registration, it gets defined later on

		$wgTemplateSandboxEditNamespaces[] = NS_MODULE;

Needs to become

		$wgTemplateSandboxEditNamespaces[] = 828; // NS_MODULE
thcipriani triaged this task as Unbreak Now! priority.Jul 11 2017, 8:06 PM

UBN -- added as train blocker

Restricted Application added subscribers: Jay8g, TerraCodes. · View Herald TranscriptJul 11 2017, 8:06 PM

Change 364516 had a related patch set uploaded (by Reedy; owner: Reedy):
[operations/mediawiki-config@master] Can't use NS_MODULE constant

Change 364522 had a related patch set uploaded (by Thcipriani; owner: Thcipriani):
[operations/mediawiki-config@master] Remove use of NS_MODULE in CommonSettings

Change 364522 abandoned by Thcipriani:
Remove use of NS_MODULE in CommonSettings

Change 364516 merged by jenkins-bot:
[operations/mediawiki-config@master] Can't use NS_MODULE constant

Mentioned in SAL (#wikimedia-operations) [2017-07-11T20:23:24Z] <thcipriani@tin> Synchronized wmf-config/CommonSettings.php: [[gerrit:364516|Can't use NS_MODULE constant]] T170317 (duration: 00m 43s)

thcipriani closed this task as Resolved.Jul 11 2017, 8:26 PM
thcipriani assigned this task to Reedy.

rolled group0 forward and error has subsided.

For the record, I pointed this out to @Legoktm on July 2. He tried to fix it with rETSA841397f1b7ca: Allow extensions to register additional namespaces in extension.json, rELUAab9ae6efe041: Set "TemplateSandboxEditNamespaces" in extension.json, and rOMWC211621b61395: Check that NS_MODULE is defined before using it rather than the simple fix done here, but the last of those apparently didn't get merged.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:10 PM