Last modified: 2013-04-22 16:14:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T48295, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46295 - Initialization of GlobalConfiguration encounters error parsing InitialiseSettings.php
Initialization of GlobalConfiguration encounters error parsing InitialiseSett...
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
lucene-search-2 (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-18 19:36 UTC by Munagala Ramanath (Ram)
Modified: 2013-04-22 16:14 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Munagala Ramanath (Ram) 2013-03-18 19:36:55 UTC
During initialization, GlobalConfiguration.initializeWmfSettings() encounters error parsing InitialiseSettings.php to extract the value of wgContentNamespaces.
The problem is that it expects namespace values to be numeric but we now have
symbolic values such as NS_MAIN. The exception also causes the parsing of
wgMetaNamespace and wgMetaNamespaceTalk to be bypassed.

A patch for this bug will be pushed shortly.
Comment 1 Sam Reed (reedy) 2013-03-18 19:38:25 UTC
Those should be all in includes/Defines.php

Though, not sure if you want to parse that everytime, so maybe doing it manually (as it's added to infrequently) might be alright..
Comment 2 Munagala Ramanath (Ram) 2013-03-18 19:45:36 UTC
Yes, I saw that but rather than parse yet another PHP file I decided to hardcode the core list of 16 values in the code, (especially since the comment in Defines.php strongly warns against changing those values) e.g.
        static final private HashMap<String, Integer> nsmap = new HashMap<String, Integer>();

        static {
                nsmap.put( "NS_MAIN",      0 );   nsmap.put( "NS_TALK",           1 );
                nsmap.put( "NS_USER",      2 );   nsmap.put( "NS_USER_TALK",      3 );
                nsmap.put( "NS_PROJECT",   4 );   nsmap.put( "NS_PROJECT_TALK",   5 );
                nsmap.put( "NS_FILE",      6 );   nsmap.put( "NS_FILE_TALK",      7 );
                nsmap.put( "NS_MEDIAWIKI", 8 );   nsmap.put( "NS_MEDIAWIKI_TALK", 9 );
                nsmap.put( "NS_TEMPLATE",  10 );  nsmap.put( "NS_TEMPLATE_TALK",  11 );
                nsmap.put( "NS_HELP",      12 );  nsmap.put( "NS_HELP_TALK",      13 );
                nsmap.put( "NS_CATEGORY",  14 );  nsmap.put( "NS_CATEGORY_TALK",  15 );
        }
Comment 3 Munagala Ramanath (Ram) 2013-03-18 20:18:26 UTC
A fix for this issue is now up for review at:
https://gerrit.wikimedia.org/r/#/c/54522/
Comment 4 Munagala Ramanath (Ram) 2013-03-19 04:08:15 UTC
The exception this bug causes can be found in log/log-all file on the search
indexer (probably on the searchers too) and looks like this:

Error reading InitialiseSettings.php from url file:///a/search/conf/InitialiseSettings.php : For input string: "NS_MAIN"
Comment 5 Andre Klapper 2013-03-26 11:20:25 UTC
[Merging "MediaWiki extensions/Lucene Search" into "Wikimedia/lucene-search2", see bug 46542. You can filter bugmail for: search-component-merge-20130326 ]
Comment 6 Munagala Ramanath (Ram) 2013-04-03 21:18:49 UTC
This bug can be closed since the change has been merged.
Comment 7 Andre Klapper 2013-04-03 23:14:28 UTC
Yay, thanks!

Ram: For future reference, you can do this yourself by changing the "Status" dropdown at the bottom from "NEW" to "RESOLVED | FIXED".

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links