Page MenuHomePhabricator

Searching for userpages of nonexistent users (or users with no userpage) should not forward you to their userpage with &go=Go
Open, LowPublic

Description

For example, [[Special:Search/User:global.js]] should return results like [1], not forward the searcher to a nonexistent page for a nonexistent user.

[1] https://en.wikipedia.org/w/index.php?title=Special%3ASearch&search=user%3Aglobal.js&fulltext=Search


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=45255
https://bugzilla.wikimedia.org/show_bug.cgi?id=46491

Details

Reference
bz59082

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:33 AM
bzimport added a project: MediaWiki-Search.
bzimport set Reference to bz59082.
bzimport added a subscriber: Unknown Object (MLST).

Yeah, I suggested that Bug 45255 may be the responsible of this, if non-existent user pages are now returning 200 responses instead of 404, maybe the search engine is affected by this, thinking that any user page exists and redirecting to it.

Although I'm not entirely sure if that's the problem, since now I see that such page returns a 404 response. But the thing is that doing the same search using another namespace prefix (with a page that doesn't exist) doesn't forward the browser to that page.

This behaviour looks like it stretches back to 2005. I've added Bryan as a CC on this.

The relevant commit messages are:
commit 435ed6274eb2d7daf8681c3a16ab6883541c59a5
Author: Ævar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Date: Sat Mar 26 23:30:53 2005 +0000

  • (bug 1398) patch by Thue Janus Kristensen that modifies the behaviour of the 'Go' button, if an IP address is entered the search engine first checks if an article by that name exists, otherwise it goes to the user contributions list of that search engine ( this would catch en.wp.org/wiki/127.0.0.1 ), also, entering a valid username with the current namespace-3 + : prefix will go to the users page, regardless of whether it contains any text or not.

commit eb0489b5da4ee3a3e1824a1741bdf60fc67bf2a5
Author: Brion Vibber <brion@users.mediawiki.org>
Date: Sun Mar 27 01:28:03 2005 +0000

Fix minor issues missed in patch review:
* Use getDbkey(), not getTitle(), when constructing new titles
* Don't bother checking for existence of a user page on go; with the
namespace prefix it's pretty clear what's meant, and the inconsistent
behavior would be more confusing than illuminating.

Brion, do you still think this is a good idea for nonexistent users? Sometimes we want to search for text in the user namespace, not for a page with that exact title.

In that case you'd need to go to the search page and explicitly enable 'User' in the searched namespaces, or else use some kind of magic indicator of which namespace you want to search in (I don't know offhand if that exists).

Simply typing a namespace name, colon, followed by some text will not search in that namespace -- it'll search for the text you gave including the namespace name all as a big search term.

The magic indicator that you are looking for things in the user namespace is to prefix the search with "user:".

PiRSquared, I know it isn't a great answer but you can skip the "go" behavior in a few ways:

  1. Drop a ~ between the namespace and the search term. That is pretty cryptic.
  2. Wait for the little "containing... user:global.js" div to appear under the search box, hit down, then hit enter.
  3. Go directly to the search page and search in the box next to the blue search button but not the one in the top right. You can get directly to the search page by going to /wiki/Special:Search or by hitting enter in the search box on the top left of any page while it is empty or by clicking on the magnifying glass in the same box while it is empty.