Last modified: 2014-01-24 23:20:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 20976 - Refinement of 'searchmenu-new' message for users without create permission and searches without results
Refinement of 'searchmenu-new' message for users without create permission an...
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
All All
: Normal enhancement (vote)
: 1.23.0 release
Assigned To: Alex Ivanov
: easy
Depends on:
Blocks: messages
  Show dependency treegraph
Reported: 2009-10-03 21:41 UTC by Gurch
Modified: 2014-01-24 23:20 UTC (History)
10 users (show)

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

add searchmenu-new-nocreate (2.77 KB, patch)
2010-04-23 11:46 UTC, Derk-Jan Hartman

Description Gurch 2009-10-03 21:41:39 UTC
By default, [[MediaWiki:Searchmenu-new]] displays the following message:

    Create the page "[[:$1]]" on this wiki!

The English Wikipedia has customized this to:

    You may create the page "[[:$1]]", but consider checking the search results below to see whether it is already covered.

This is confusing when the search returns no results. There are two ways this could be remedied;

* supply a second parameter to the message indicating if there are any results
* add another message that is used instead of this one when there are no results
Comment 1 Brion Vibber 2009-10-04 20:55:54 UTC
Trevor, Robert, what do you think? Separate messages for no results, pass the result count in, or is there a cleaner way to handle this case?
Comment 2 Trevor Parscal 2009-10-05 16:47:59 UTC
I absolutely agree that referring to "results below" should only happen when there are indeed results below. And also, doesn't the use of below violate anyways?
Comment 3 Gurch 2009-10-06 11:32:08 UTC
(In reply to comment #2)
> And also, doesn't the use of below violate
> anyways?

I think a lot of the en.wikipedia-specific UI was created without much attention to (or even knowledge of) that page; I might go put a link to it somewhere prominent. The 'below' could probably be dropped (though it's not the only place it's used, e.g. the default message for [[MediaWiki:Newarticletext]] has "to create the page, start typing in the box below".)
Comment 4 Derk-Jan Hartman 2010-04-21 23:31:34 UTC
This message MediaWiki:Searchmenu-new is only presented to users who can create articles. However, now there is no good method to present information to users who cannot create articles. For instance. The english Wikipedia used to direct anonymous users to, giving anonymous users a route to follow when they want to create an article, and not leaving them guessing.

I think at the very least an additional message alla [[MediaWiki:searchmenu-new-nocreate]] should be provided.
Comment 5 Derk-Jan Hartman 2010-04-23 11:46:03 UTC
Created attachment 7325 [details]
add searchmenu-new-nocreate

Patch for a searchmenu-new-nocreate option. This basically amends r61555 from bug 19600.
Comment 6 Derk-Jan Hartman 2010-05-04 15:37:15 UTC
I applied this patch in r65902
Comment 7 Conrad Irwin 2010-05-04 15:47:40 UTC
Should this message (or a similarly default blank one) also be used for searches using special search-engine functions: prefix%3AP
Comment 9 Derk-Jan Hartman 2010-05-04 19:30:30 UTC
That isn't very nice indeed conrad....

To fix this would require expanding the includes/search/SearchEngine.php with something that can detect the individual searchterms and interpret their meaning (special or not) and give back solely the searchterms stripped from the special keywords.
Comment 10 Derk-Jan Hartman 2010-05-21 11:36:12 UTC
BTW. Conrad, the issue you refer to is bug 21102.
Comment 11 p858snake 2011-04-30 00:09:24 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 12 Nemo 2013-11-19 12:36:11 UTC
Adding many blockers of bug 38638 to the list of "easy" bugs, to mark them as candidates for [[mw:Google Code-in]] tasks (gci2013). If you think this bug is not suitable, remove the keyword.
Comment 13 Gerrit Notification Bot 2013-12-04 23:06:55 UTC
Change 99265 had a related patch set uploaded by MegaAlex:
Add search results found as $2 parameter to message searchmenu-new
Comment 14 Andre Klapper 2013-12-05 12:32:30 UTC
Latest patch is the result of the Google Code-In task so please help reviewing this in a timely manner.
Comment 15 Nemo 2013-12-05 16:47:59 UTC
(In reply to comment #13)
> Change 99265 had a related patch set uploaded by MegaAlex:
> Add search results found as $2 parameter to message searchmenu-new

This patch is slightly broader in scope than what proposed in the last comments, which ask for to be able to customise searchmenu-new* properly.

I think we can try and apply to searchmenu-new and searchmenu-exists a logic similar to's custom messages'. Currently, if there are no results, search-nonefound above says "There were no results matching the query"; but if there are, nothing is said. So we can cover this case in searchmenu-new and searchmenu-exists with [[translatewiki:Plural#Arbitrary plurals]], simply adding both a sentence of the kind {{PLURAL:$2|0=|See also the page found with your search.|See also the search results found.}}
This would put the parameter into use on the two messages and make it available for the empty one; bug 21102 would then take care of the ugliness of the first half of it.
Comment 16 Gerrit Notification Bot 2013-12-08 18:34:36 UTC
Change 99265 merged by jenkins-bot:
Add search results found as parameter to showCreateLink
Comment 17 Robin Pepermans (SPQRobin) 2014-01-24 23:20:00 UTC
Gerrit change #99265 can cause problems for extensions adding extra parameters using the SpecialSearchCreateLink hook.

And I updated the documentation at (please think of the documentation when changing hooks).

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