Last modified: 2014-09-24 01:24:35 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 T13380, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11380 - "Go" search should check if page exists in namespaces other than main
"Go" search should check if page exists in namespaces other than main
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
1.12.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
: 19862 25432 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-18 10:47 UTC by Chris Chiasson
Modified: 2014-09-24 01:24 UTC (History)
8 users (show)

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


Attachments
patch to SpecialSearch::goResult() (779 bytes, patch)
2007-09-25 18:42 UTC, Alexander
Details

Description Chris Chiasson 2007-09-18 10:47:42 UTC
Steps to reproduce (on Wikipedia, but I think it is a problem with MediaWiki):
1. Go to your user preferences page and click on the search tab.
2. Uncheck the (Main) namespace and check the Wikipedia namespace.
3. Click save.
4. In the search field on the left panel, type "columns" without quotation marks.

Result:
You are taken to the (Main namespace) article, Column

Expected result:
Articles in the Wikipedia namespace that explain how to format wiki text into columns.

Speculation:
It seems that the "I'm feeling lucky"-esque functionality is interfering with the namespace exclusion.
Comment 1 Brion Vibber 2007-09-18 14:51:59 UTC
The 'go' hit always goes to the requested page title and is unrelated to your search preferences.

I'm not sure if it would be desireable to limit it to search namespaces... but that might end up doing something useful. Worth considering at least.
Comment 2 Brion Vibber 2007-09-18 15:11:36 UTC
A likely implementation might loop through all requested namespaces to do the checks in SearchEngine::getNearMatch, using the default namespace parameter on Title::newFromText() to apply a namespace if not included already in the search term.
Comment 3 Alexander 2007-09-25 18:42:23 UTC
Created attachment 4157 [details]
patch to SpecialSearch::goResult()

After SearchEngine::getNearMatch($term), only redirects to the resulting Title if it's in a namespace the user has chosen to search.
Comment 4 Brion Vibber 2007-09-26 19:42:35 UTC
Hmm, go needs to *always* go to the specific page you request when you request it, as that's its function.

So I wouldn't accept this patch.
Comment 5 Alexander 2007-10-01 02:55:44 UTC
"go needs to *always* go to the specific page you request when you request it"

So, except for the main namespace?
Comment 6 Brion Vibber 2007-10-01 12:49:55 UTC
For any namespace.

I outlined above a way to have the Go matches match patches in the specified search namespaces where no namespace is given in the search term (eg 'column') without breaking when a namespace is included (eg 'talk:column' or ':column'). Title::newFromText() has this logic already available when passing it a default namespace parameter.
Comment 7 Aaron Schulz 2009-02-24 16:36:47 UTC
"Go" tried the specific page, you need the namespace in order to get non-main pages.
Comment 8 Brion Vibber 2009-08-21 22:34:37 UTC
*** Bug 19862 has been marked as a duplicate of this bug. ***
Comment 9 Chad H. 2010-10-06 13:45:05 UTC
*** Bug 25432 has been marked as a duplicate of this bug. ***
Comment 10 p858snake 2010-10-07 02:23:42 UTC
Changed title/summary so it is no longer monobook centric.
Comment 11 p858snake 2011-04-30 00:10:14 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 12 Sumana Harihareswara 2011-11-10 06:55:02 UTC
Thanks for your patch, Alexander. Marking "reviewed" per comment 4 and comments after.
Comment 13 Krinkle 2012-11-06 21:24:15 UTC
See also bug 30323.

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


Navigation
Links