Last modified: 2009-05-19 23:19:30 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 T20848, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18848 - Incorrect link to Yahoo Search
Incorrect link to Yahoo Search
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://sv.wikipedia.org/w/index.php?n...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-19 22:52 UTC by Junichi Tatsu
Modified: 2009-05-19 23:19 UTC (History)
1 user (show)

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


Attachments

Description Junichi Tatsu 2009-05-19 22:52:18 UTC
Hello,

My name is Junichi Tatsu and I work in the technical support team of Yahoo! Search.
It has come to our attention that if you click on the "Yahoo" button in the following page:
http://sv.wikipedia.org/w/index.php?ns0=1&search=silo+breaker&title=Special%3AS%C3%B6k&fulltext=Advanced+search&fulltext=Avancerad+s%C3%B6kning

it will redirect to the following URL:
http://sv.search.yahoo.com/search?p=silo+breaker&ns0=1&title=Special%3AS%C3%B6k&fulltext=Search&fulltext=S%C3%B6k&searchengineselect=yahoo&vs=http%3A%2F%2Fsv.wikipedia.org

which is not a valid hostname and will result in a http 404.

We have made a temporary fix but would appreciate it if you could have it fixed to:
http://se.search.yahoo.com/search?p=silo+breaker&ns0=1&title=Special%3AS%F6k&fulltext=Search&fulltext=S%F6k&searchengineselect=yahoo&vs=http%3A%2F%2Fsv.wikipedia.org

(note the se.search... Instead of sv.search...)

Would this be something you could fix?

Best regards,
Junichi Tatsu
Yahoo! Search
Comment 1 Brion Vibber 2009-05-19 23:07:47 UTC
Here's the offending code on the site:

http://sv.wikipedia.org/wiki/MediaWiki:Common.js

// Sökfunktion med flera sökmotorer
/** Change Special:Search to use a radio menu *******************************************************
   *
   *  Description: Change Special:Search to use a radio menu, with the default being
   *               the internal MediaWiki engine
   *  Created and maintained by: [[:fr:User:Pmartin]]
   */
 
if ((wgNamespaceNumber == -1) && (wgCanonicalSpecialPageName == "Search")) {
	var searchEngines = {
	  mediawiki: {
	    ShortName: "Wikipedia-sök",
	    Template: "/w/index.php?search={searchTerms}"
	  },
	  yahoo: {
	    ShortName: "Yahoo!",
	    Template: "http://" + wgUserLanguage + ".search.yahoo.com/search?p={searchTerms}&vs=" + wgServer
	  },
[snip]

wgUserLanguage will be 'sv', 'en', 'fr', etc... whereas the hostnames vary, but seem to be using country codes:
* se.search.yahoo.com
* fr.search.yahoo.com
* de.search.yahoo.com
* jp.search.yahoo.com -> search.yahoo.jp
* us.search.yahoo.com

Language codes just don't work except in a few countries/language that happen to match up like fr and de. If the language code can't be appended, it should just head straight to the Swedish server.
Comment 2 Brion Vibber 2009-05-19 23:18:54 UTC
Bad code was introduced April 6 2009:
http://sv.wikipedia.org/w/index.php?title=MediaWiki:Common.js&diff=8931878&oldid=8672428

I've fixed it there and dropped a note on-wiki to [[fr:User:Pmartin]] about the issue; the fix may need to be replicated on other sites. (Pascal wouldn't have noticed the bug if his UI language was set to French.)
Comment 3 Brion Vibber 2009-05-19 23:19:30 UTC
Note that aggressive caching of site JavaScript means that not all end-users will see the fix immediately; it may take up to 30 days to ensure that all visitors are updated.

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


Navigation
Links