Page MenuHomePhabricator

Search namespaces from [[Special:Preferences]] are ignored
Closed, ResolvedPublic

Description

Using this component (may be wrong) because I was advised that WMF is not utilize MWs internal search engine.

When clicking on the magnifying glass in the search box, the preferences I've set in [[Special:Preferences]] are ignored and search is done for "content pages" instead of advanced with my settings.

This is probably caused by fixing Bug 33270 and Bug 32228.


Version: 1.20.x
Severity: normal

Details

Reference
bz33583

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:02 AM
bzimport set Reference to bz33583.

Can reproduce on 1.19 (but not stock 1.18.0) without lucene, so presumably something in core mediawiki search stuff that was backported to wmf.

Appears to be caused by r106780

I have added a test case with r108400 albeit commented out.

This bug is also on production wiki since r106780 was merged by r107975.

Confirmed on mediawiki.org

  • set your namespace searching option to (Main)
  • in the top right input box search for "foobar"
  • Search page show pages from Manual and Extension namespaces.

Created attachment 9835
Patch to take into account the user's namespaces pref

I changed the component to "Special pages" to match bug 33270.

The problem is that the "fix" for bug 33270 assumed that if no namespaces were explicitly given in the HTTP request then the "default" search was wanted, while only the advanced option uses the user preference. One simple fix is to just not assume any profile (the old behavior) if the user has specified any search namespaces in their preferences.

Attached:

hashar, Could you look at this patch and apply it?

I have applied it with r108712 and uncommented the related test from r108400.

Thanks a lot Brad.

Applied live with r108751 . Would be great if someone can verify it :-)