Closed Bug 650238 Opened 14 years ago Closed 14 years ago

[ReleaseChannels] Aurora Download Page Shows multiple download buttons when user has multiple languages in Accept-Language header

Categories

(www.mozilla.org :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 649790

People

(Reporter: jpr, Unassigned)

Details

Attachments

(1 file)

If you visit: http://www.mozilla.com/en-US/firefox/channel/ You should see the Aurora and Final download buttons repeated three times vertically. Does not happen in 4.0.
Occurs on Linux and Windows 7.
But not on Mac? Or at least I can't reproduce on Mac....
Also, is this 5-branch-specific, or does it happen on trunk too?
For what it's worth, I can't reproduce this with a trunk Linux build.
(In reply to comment #2) > But not on Mac? Or at least I can't reproduce on Mac.... I don't have a Mac to try it on.
(In reply to comment #3) > Also, is this 5-branch-specific, or does it happen on trunk too? Happens on trunk too on Win 7, including in safe mode.
OK. Does this happen with a clean profile?
Version: 5 Branch → Trunk
Attached image screenshot of issue on win7 (deleted) —
(In reply to comment #7) > OK. Does this happen with a clean profile? No. I have been switching back and forth between 4, central and aurora.
OK. Do you want to try to narrow down what about your profile causes the issue?
(In reply to comment #10) > OK. Do you want to try to narrow down what about your profile causes the > issue? If you have instructions, sure.
OK. Start with moving your prefs.js file out of the way and seeing whether that helps. Then I guess try places.sqlite?
Moving prefs.js out of the way fixes it.
OK, so what interesting things do you have in your prefs.js? Want to just mail it to me?
Its this line: user_pref("intl.accept_languages", "en-ca,en-us,en");
All three download links point at the en-US installer though. I think function getDownloadURLForAuroraForLanguage(aProduct, aVersion, aLocale, aPlatform) is probably the culprit for that. As well as getLanguageIDs for the three buttons. Guess this is a page bug in the end.
Yeah, this is a bug in the page. The relevant code is: function writeDownloadItems(aProduct) { // Show the dynamic links if (gPlatform == PLATFORM_MAC) { document.writeln(gDownloadItemMacOS9); } else if (gPlatform == PLATFORM_OTHER) { document.writeln(gDownloadItemOtherPlatform); } else { var languageIDs = getLanguageIDs(aProduct); for (var i = 0; i < languageIDs.length; ++i) writeDownloadItem(languageIDs[i]); } } getLanguageIDs splits your navigator.language ("en-CA" in your case) on '-', sets "languageCode" to "en", sets "regionCode" to "ca", and then does this: var currentVersion = gLanguages["en"]["us"][aProduct]; var bestVersion = ""; for (region in gLanguages[languageCode]) { build = gLanguages[languageCode][region]; if (build[aProduct] && regionCode == region) { That always tests false for the "fxaurora" product, say, because gLanguages["en"]["ca"]["fxaurora"] is null. Then we go on to: // We have a localized build for this language, but not this region. // Show all available regions and let the user pick. if (bestVersion != currentVersion) { For Firefox, I see links to en-US, en-GB, and en-ZA builds as a result (but the buttons don't say where they're going, of course). But for Aurora, as you noted they're all en-US. And that's because getDownloadURLForLanguage calls getDownloadURLForAuroraForLanguage in the "fxaurora" case and that last function has: // Force en-US locale for now, when we fix other language replace it with // "locale" url += aProduct + "-" + aVersion + ".en-US." + os_file_ext; So yeah, this page just needs fixing.
Component: Layout → www.mozilla.com
Product: Core → Websites
QA Contact: layout → www-mozilla-com
Version: Trunk → other
Looks like r87201 is what introduced the include of download.old.js (which is where the code in comment 17 lives) and the code that uses it for the aurora download buttons.
Summary: Aurora Download Page Shows Buttons in Triplicate → Aurora Download Page Shows multiple download buttons when user has multiple languages in Accept-Language header
Summary: Aurora Download Page Shows multiple download buttons when user has multiple languages in Accept-Language header → [ReleaseChannels] Aurora Download Page Shows multiple download buttons when user has multiple languages in Accept-Language header
Target Milestone: --- → 2.2
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Component: www.mozilla.org/firefox → www.mozilla.org
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: