Last modified: 2014-04-14 03:30:26 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 T65764, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63764 - Strip surrounding quotation marks from search parameters before testing for page existence.
Strip surrounding quotation marks from search parameters before testing for p...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-10 13:05 UTC by Capmo
Modified: 2014-04-14 03:30 UTC (History)
3 users (show)

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


Attachments

Description Capmo 2014-04-10 13:05:44 UTC
Searching for "foo bar" (with the quotation marks) results in a suggestion to «Create the page ""foo bar"" on this wiki!» which, if followed, leads to the creation of a page with the title [["foo bar"]]. This message appears EVEN if the page [[Foo bar]] already exists.

Although this behavior is occasionally desirable (in those very few situations in which the quotation marks should indeed be part of the title), I'd say that in 99% of the times it's not. Most people search with quotation marks in order to narrow down search results, and the average wiki user would not expect them to become part of the title of a newly created article. Even experienced users end up creating new articles with the suggested title and only later realize it (I've done it a couple of times myself).

The large list of redirects starting with double quotes on the enwiki attests to the high frequency of occurrences of this situation:
http://en.wikipedia.org/w/index.php?title=Special%3APrefixIndex&prefix="

My suggestions:
1) If a page does not exist with the quotes, check if one exists without the quotes;
2) In affirmative case, display message «There is a page named "Foo bar" on this wiki!» ([[MediaWiki:Searchmenu-exists]])
3) In negative case, display [[MediaWiki:Searchmenu-new]] without the inner pair of quotation marks around the searched term or expression. If a person really needs to create an article titled [["foo bar"]], s/he can still do it by typing the quotation marks in the URL or by following the red link to [["foo bar"]] in an article.

This would greatly improve the user experience with the search functionality.
Comment 1 Nik Everett 2014-04-10 13:41:23 UTC
Confirming Capmo's report on the behavior.  This is how it works.  On addition:
If the user is using Cirrus and the page has an exact title match then you won't get the [[MediaWiki::Searchmenu-new]] either:
https://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=default&search=%22main+page%22&fulltext=Search&srbackend=CirrusSearch

This is because Cirrus reports back to the Special:Search page that the search contained search syntax and special page doesn't give the user the option to create a page containing special search syntax.  Its not the same but was designed to solve the same kind of problem.  Honestly the solution you propose  in the case that the search is entirely surrounded by quotes (and only contains a single pair of them) is better because it preserves the create option.  This is certainly one of the most common uses of special search syntax so it might be worth special casing.

I've CCed Dan for prioritization.
Comment 2 Capmo 2014-04-11 06:16:06 UTC
(In reply to Nik Everett from comment #1)
> 
> I've CCed Dan for prioritization.

Thanks, Nik.
Comment 3 Dan Garry 2014-04-11 18:57:02 UTC
I think you're right that the current behaviour prioritises the secondary use case ("I want to create an article by this title, including quotes") more than the primary one ("I was using search syntax to narrow down my search"). Search syntax is typically esoteric, but using quotes to create phrases is common to pretty much every kind of search engine out there.

I'll go with normal priority on this. Right now (as in, this week!) our designer Brandon is working on what the search page should do when it returns no results. In answering that question, we may be significantly reworking the strings that appear to the user, so it may be that we end up solving this problem indirectly. If not, I think your solution makes a lot of sense.

Thanks for the report Capmo!
Comment 4 Capmo 2014-04-14 03:30:26 UTC
(In reply to Dan Garry from comment #3)
> Right now (as in, this week!) our designer Brandon is working on
> what the search page should do when it returns no results.
Perfect timing! :)

> Thanks for the report Capmo!
You're welcome

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


Navigation
Links