Last modified: 2014-09-24 01:24:35 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.
You are taken to the (Main namespace) article, Column
Articles in the Wikipedia namespace that explain how to format wiki text into columns.
It seems that the "I'm feeling lucky"-esque functionality is interfering with the namespace exclusion.
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.
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.
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.
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.
"go needs to *always* go to the specific page you request when you request it"
So, except for the main namespace?
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.
"Go" tried the specific page, you need the namespace in order to get non-main pages.
*** Bug 19862 has been marked as a duplicate of this bug. ***
*** Bug 25432 has been marked as a duplicate of this bug. ***
Changed title/summary so it is no longer monobook centric.
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Thanks for your patch, Alexander. Marking "reviewed" per comment 4 and comments after.
See also bug 30323.