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)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 649790
2.2
People
(Reporter: jpr, Unassigned)
Details
Attachments
(1 file)
(deleted),
image/jpeg
|
Details |
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.
Reporter | ||
Comment 1•14 years ago
|
||
Occurs on Linux and Windows 7.
Comment 2•14 years ago
|
||
But not on Mac? Or at least I can't reproduce on Mac....
Comment 3•14 years ago
|
||
Also, is this 5-branch-specific, or does it happen on trunk too?
Comment 4•14 years ago
|
||
For what it's worth, I can't reproduce this with a trunk Linux build.
Reporter | ||
Comment 5•14 years ago
|
||
(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.
Reporter | ||
Comment 6•14 years ago
|
||
(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.
Comment 7•14 years ago
|
||
OK. Does this happen with a clean profile?
Updated•14 years ago
|
Version: 5 Branch → Trunk
Reporter | ||
Comment 8•14 years ago
|
||
Reporter | ||
Comment 9•14 years ago
|
||
(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.
Comment 10•14 years ago
|
||
OK. Do you want to try to narrow down what about your profile causes the issue?
Reporter | ||
Comment 11•14 years ago
|
||
(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.
Comment 12•14 years ago
|
||
OK. Start with moving your prefs.js file out of the way and seeing whether that helps. Then I guess try places.sqlite?
Reporter | ||
Comment 13•14 years ago
|
||
Moving prefs.js out of the way fixes it.
Comment 14•14 years ago
|
||
OK, so what interesting things do you have in your prefs.js? Want to just mail it to me?
Reporter | ||
Comment 15•14 years ago
|
||
Its this line:
user_pref("intl.accept_languages", "en-ca,en-us,en");
Reporter | ||
Comment 16•14 years ago
|
||
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.
Comment 17•14 years ago
|
||
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
Comment 18•14 years ago
|
||
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.
Updated•14 years ago
|
Summary: Aurora Download Page Shows Buttons in Triplicate → Aurora Download Page Shows multiple download buttons when user has multiple languages in Accept-Language header
Updated•14 years ago
|
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
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•13 years ago
|
Component: www.mozilla.org/firefox → www.mozilla.org
Assignee | ||
Updated•12 years ago
|
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.
Description
•