Last modified: 2014-10-15 12:02:03 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 T25822, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23822 - search-redirect shows wrong Namespace
search-redirect shows wrong Namespace
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
MWSearch (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Robert Stojnic
http://de.wikipedia.org/w/index.php?t...
:
: 24026 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-07 19:07 UTC by Umherirrender
Modified: 2014-10-15 12:02 UTC (History)
3 users (show)

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


Attachments

Description Umherirrender 2010-06-07 19:07:47 UTC
The information search-redirect shows a wrong namespace in the search result. 

Part of the HTML:

<a href="/wiki/Hilfe:Weiterleitung" title="Hilfe:Weiterleitung">Hilfe:Weiterleitung</a> <span class='searchalttitle'>(redirect <a href="/wiki/Wikipedia:Falschschreibung" title="Wikipedia:Falschschreibung">Hilfe:<span class='searchmatch'>Falschschreibung</span></a>)</span>

* Wikipedia:Falschschreibung - the redirect
* Hilfe:Weiterleitung - the target of the redirect

* Hilfe:<span class='searchmatch'>Falschschreibung</span> - the shown text, it has the wrong namespace at the begin (It should "Wikipedia:", not "Hilfe:").

I am not sure, if this a bug of the core or Lucene Search. Feel free, to move it to the right place.

Thanks.
Comment 1 Umherirrender 2010-10-29 10:06:08 UTC
Changing to MWSearch, because it looks like the Extension is building that text
Comment 2 Chad H. 2014-02-14 18:15:55 UTC
Can you provide links where this is broken? Preferably a link where it's fixed in Cirrus ;-)
Comment 3 Umherirrender 2014-02-14 20:13:23 UTC
Use the url in the url field and you will still see the error

Hilfe:Weiterleitung (redirect Hilfe:Falschschreibung) 

But the link behind 'Hilfe:Falschschreibung' is 'Wikipedia:Falschschreibung', so the text should also have the 'Wikipedia' in it.

Cirrus prefers the section over the redirect:
* https://de.wikipedia.org/w/index.php?title=Spezial%3ASuche&search=hilfe%3AFalschschreibung&fulltext=Volltext&uselang=en&srbackend=CirrusSearch

* https://de.wikipedia.org/w/index.php?title=Spezial%3ASuche&search=hilfe%3AFalschschreibung&fulltext=Volltext&uselang=en&srbackend=LuceneSearch
Comment 4 Chad H. 2014-02-14 21:15:15 UTC
(In reply to Umherirrender from comment #3)
> Use the url in the url field and you will still see the error
> 

I missed that, apologies

> Hilfe:Weiterleitung (redirect Hilfe:Falschschreibung) 
> 
> But the link behind 'Hilfe:Falschschreibung' is
> 'Wikipedia:Falschschreibung', so the text should also have the 'Wikipedia'
> in it.
> 
> Cirrus prefers the section over the redirect:
> *
> https://de.wikipedia.org/w/index.
> php?title=Spezial%3ASuche&search=hilfe%3AFalschschreibung&fulltext=Volltext&u
> selang=en&srbackend=CirrusSearch
> 
> *
> https://de.wikipedia.org/w/index.
> php?title=Spezial%3ASuche&search=hilfe%3AFalschschreibung&fulltext=Volltext&u
> selang=en&srbackend=LuceneSearch

Ok, I definitely see it here. I wonder if our behavior in Cirrus is the right thing though :)
Comment 5 Chad H. 2014-02-17 05:10:28 UTC
*** Bug 24026 has been marked as a duplicate of this bug. ***
Comment 6 se4598 2014-10-15 12:02:03 UTC
I think pretty sure the bug lies in this line:
https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FMWSearch.git/b327da0f987979b3be1e6c9d9d1c53e4197200b2/MWSearch_body.php#L211

The parameter $nsText seems to be referring in this context to the target ns, not to the redirect ns. But the real redirect ns is extracted later[1] for the title-object/linker as result of this call, but the erroneous snipped (displayed text) is already generated.

I'm feeling myself uncomfortable to fix this though as I'm not really understanding the whole code and unable to test it.

[1] https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FMWSearch.git/b327da0f987979b3be1e6c9d9d1c53e4197200b2/MWSearch_body.php#L220

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


Navigation
Links