Last modified: 2010-07-04 17:19:40 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 T18823, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16823 - Sidebar search form should not use Special:Search view URL as target
Sidebar search form should not use Special:Search view URL as target
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Aaron Schulz
http://en.wikipedia.org/wiki/Special:...
: easy
Depends on:
Blocks: 16358
  Show dependency treegraph
 
Reported: 2008-12-28 21:07 UTC by Brion Vibber
Modified: 2010-07-04 17:19 UTC (History)
1 user (show)

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


Attachments

Description Brion Vibber 2008-12-28 21:07:11 UTC
The mini search form in the sitebar uses a view URL for Special:Search as the form submission target/action.

This tends to produce a final URL like this:

http://en.wikipedia.org/wiki/Special:Search?search=fooey&go=Go

While pretty, it has the distinct disadvantage that it frequently collides with "pretty URL" configurations whose rewrite rules don't pass on the original query string...

So for instance the incoming URL fragment:

/wiki/Special:Search?search=fooey&go=Go

might get rewritten into:

/index.php?title=Special:Search

and our actual search parameters are gone. We then get bug reports, mails, or IRC visitors asking why search doesn't work on their wiki.

The sidebar form should instead use the script target, the way Special:Search's form does:

<form id="search" method="get" action="/w/index.php"><input name="title" type="hidden" value="Special:Search" />

this produces a URL which will work on any configuration, and will reduce the incidence of surprises.

AFAIK we don't explicitly create any other URLs where we append parameters to a view URL in this way, and we should be avoiding it here too.
Comment 1 Aaron Schulz 2009-02-25 00:13:14 UTC
Done in r47773

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


Navigation
Links