https://bugzilla.wikimedia.org/show_bug.cgi?id=29931

       Web browser: ---
             Bug #: 29931
           Summary: Queries restricting results to namespace fail when
                    namespaces contain spaces
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: Unprioritized
         Component: Semantic MediaWiki
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


MW: 1.17.0
SMW: 1.5.6
Example: http://sandbox.semantic-mediawiki.org/wiki/Namespace_Error

If you perform a query of the type {{#ask:[[Namespace:+]]|...}}, the query will
fail if the namespace name contains spaces.  If the name is provided
explicitly, the query will simply fail nastily.  If the name is provided by
some other means (for instance, the Variable Extension), it will cause a fatal
error.

SMW_QueryParser.php (on line 434, as of 1.5.6) contains the following code:

$idx = $wgContLang->getNsIndex($list[0]);

It should be something more like:

$idx = $wgContLang->getNsIndex(str_replace(" ","_",$list[0]));

Thanks!

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to