Last modified: 2014-02-19 22:31:11 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 T17452, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15452 - Search update class looses namespace information
Search update class looses namespace information
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
1.13.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-03 10:30 UTC by Alex Powell
Modified: 2014-02-19 22:31 UTC (History)
3 users (show)

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


Attachments

Description Alex Powell 2008-09-03 10:30:10 UTC
Hi,

Every release of MW since 1.10 I've been making a tweak to the rebuildtextindex.php to replace line 60 with the following code:

            if($s->page_namespace != NS_MAIN)
            {   
                global $wgContLang;
                $title =  $wgContLang->getNsText( $s->page_namespace ) . ':' . $s->page_title;
            }
            else
            {
                $title =  $s->page_title;
            }
            $u = new SearchUpdate( $s->page_id, $title, $revtext );

I have no idea how the best way to get this into the main code base is, but I'm pretty sure as it stands its wrong in everyone's eyes - since the namespace information is currently lost. Ideally SearchUpdate would be refactored to take a namespace parameter, but this at least allows it to be retrieved intact. I found this problem when adding an extension to index the other namespaces. Or should I be using something else to rebuild the text search?

Kind regards,

Alex
Comment 1 Krinkle 2012-05-11 18:54:20 UTC
It has been modified a lot since then:

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=history;f=maintenance/rebuildtextindex.php

Current code:

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=maintenance/rebuildtextindex.php

Can you check if your patch still makes sense on that? Have you tried MediaWiki 1.19?
Comment 2 Chad H. 2014-02-19 22:31:11 UTC
Was fixed at some point when SearchUpdate was changed to take a Title object instead of a string. Implementations and hooks should be able to use that Title now.

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


Navigation
Links