Apache OpenOffice (AOO) Bugzilla – Issue 119357
Sometimes no download link when JavaScript enabled in Firefox 12
Last modified: 2013-07-10 21:58:06 UTC
At http://www.openoffice.org/download/ there is sometimes no download link for the application in Firefox 12 when Javascript is enabled. The JS error console shows the following: Error: language is not defined Source File: http://www.openoffice.org/download/download_new_dl.js Line: 276 "Sometimes" means: when using one user account under Windows XP. Other user accounts on the same machine show the link. I don't know what the difference is. Disabling all add-ons did not help. Whatever the reason, changing if (language == "" || language == "null" || language == "en") language = "en-US"; to if (typeof language == "undefined" || !language || language == "en") language = "en-US"; should fix it.
Thanks for the hint. Please can you give us some more information? Especially when the problem happens again, an output of the following webpage would be very helpful: http://www.openoffice.org/download/test/analyze.html
http://www.openoffice.org/download/test/analyze.html output: navigator.platform: Win32 navigator.UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0 navigator.UserAgent lower case: mozilla/5.0 (windows nt 5.1; rv:12.0) gecko/20100101 firefox/12.0 navigator.UserAgent lower case: -1 getLink(): undefined getPlatform(): Windows
I thought of all the output, not only the first lines. ;-)
Ditto for me using a Linux system: navigator.platform: Linux i686 navigator.UserAgent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0 navigator.UserAgent lower case: mozilla/5.0 (x11; linux i686; rv:11.0) gecko/20100101 firefox/11.0 navigator.UserAgent lower case: -1 getLink(): undefined getPlatform(): Linux getLanguage(): English (British)
(In reply to comment #4) > Ditto for me using a Linux system: > > navigator.platform: Linux i686 > navigator.UserAgent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20100101 > Firefox/11.0 > navigator.UserAgent lower case: mozilla/5.0 (x11; linux i686; rv:11.0) > gecko/20100101 firefox/11.0 > navigator.UserAgent lower case: -1 > getLink(): undefined > getPlatform(): Linux > getLanguage(): English (British) I do see links on the page.
(In reply to comment #3) > I thought of all the output, not only the first lines. ;-) That was all of the output. Same bug as on the download page. The Error Console shows: Error: language is not defined Source File: http://www.openoffice.org/download/download2.js Line: 14 The good news is that I've identified the reason for the difference: I have no preferred language defined in my "Content" options. Probably not a common choice, but it can happen. The solution proposed above is still valid. Or you could declare the language variable with 'var' (good practice anyhow) and leave out the 'typeof' test, but you'd still need to change the condition to cover language == undefined. Taking the quotes off the "null" would do that: if (language == "" || language == null || language == "en") language = "en-US"; but if (!language || language == "en") language = "en-US"; would cover everything more elegantly.
@Terry + DonJaime: I've reworked the "analyze.html" webpage. Could you please try again? Thanks.
I should say that the links below the title page ('analyze') each point to a page. I no longer see the paragraph towards the top left of the page (the one I quoted in my previous post). I see this in the middle of the page: Variables from the browser Values navigator.platform Linux i686 navigator.platform.toLowerCase() linux i686 navigator.language en-GB navigator.userLanguage undefined navigator.systemLanguage undefined navigator.userAgent Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0 navigator.userAgent.toLowerCase() mozilla/5.0 (x11; linux i686; rv:11.0) gecko/20100101 firefox/11.0 navigator.javaEnabled() No getLink( VERSION, MIRROR, SCHEMA ) http://download.openoffice.org/other.html/download getArray() here,English (British),http://download.openoffice.org/other.html,n,n,n getPlatform( SCHEMA ) Linux getLanguage() English (British) getLanguageISO() en-GB mirrorbrain_getPlatformForMirror( SCHEMA ) Linux_x86_install-rpm mirrorbrain_getExtension( SCHEMA ) .tar.gz mirrorbrain_getFileName( VERSION, SCHEMA ) null hasMirrorLink() false
@Terry: Thanks for the update. In the meantime I've cleaned-up the "analyze.html" webpage (also to recognize IceWeasel). For en-GB we have no install files for AOO 3.4.0 but hopefully for AOO 3.4.1. However, the plan is to redirect users with not (yet) supported languages to the "other.html" to let them choose their 2nd favorite install file. You can see this with the value for "getLink()" and "getArray()". I've tweaked the DL logix to redirect German and it works. When clicking on the green box then the "other.html" webpage opens. OK, 2 more questions: a) What text do you see in the green box? b) What is the download URL in the green box?
(In reply to comment #9) > @Terry: > <snip> > > OK, 2 more questions: > a) What text do you see in the green box? > b) What is the download URL in the green box? I see no green box. Where on the page is it supposed to be?
Take the "not-yet-official-and-online" webpage: http://ooo-site.staging.apache.org/download/index_aoo.html
(In reply to comment #11) > Take the "not-yet-official-and-online" webpage: > > http://ooo-site.staging.apache.org/download/index_aoo.html The green box there says: "Download Apache OpenOffice Get Apache OpenOffice from your native language community." The url is http://sourceforge.net/projects/openofficeorg.mirror/files/localized/en-GB/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_en-GB.tar.gz There is a paler green box below that which says "Get all platforms ...."
@Terry: That's interesting. The text in the green box is correct. As en-GB builds are not available, you should be redirected to the "other.html" webpage. This is not working. I've corrected this problem. Now all users with not-support language (like en-GB) should be redirected. Does it also work for you?
(In reply to comment #13) > @Terry: > <snip> > > I've corrected this problem. Now all users with not-support language (like > en-GB) should be redirected. Does it also work for you? Yes, the url is now http://www.openoffice.org/download/other.html and clicking on the box loads that page.
great, thanks for your feedback
http://ooo-site.staging.apache.org/download/index_aoo.html provides a green box with a functioning link. Output from http://www.openoffice.org/download/test/analyze.html, in case you're still interested: Variables from the browser Values navigator.platform Win32 navigator.platform.toLowerCase() win32 navigator.language navigator.userLanguage undefined navigator.systemLanguage undefined navigator.userAgent Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0 navigator.userAgent.toLowerCase() mozilla/5.0 (windows nt 5.1; rv:12.0) gecko/20100101 firefox/12.0 navigator.javaEnabled() Yes JavaScript functions from the DL scripts Return values getLink( VERSION, LANGUAGE, MIRROR, SCHEMA ) http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_en-US.exe/download getArray( LANGUAGE ) here,English (US),English (US),http://www.openoffice.org/download/other.html,y getPlatform( LANGUAGE, SCHEMA ) Windows (MSI) getLanguage( LANGUAGE ) English (US) getLanguageISO( LANGUAGE ) en-US sourceforge_getLink( VERSION, LANGUAGE, SCHEMA ) http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_en-US.exe/download apache_getLink( VERSION, LANGUAGE, SCHEMA ) http://www.apache.org/dyn/closer.cgi/incubator/ooo/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_en-US.exe apache_getChecksum( VERSION, LANGUAGE, SCHEMA, HASH ) http://www.apache.org/dist/incubator/ooo/files/localized/en-US/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_en-US.exe.md5 mirrorbrain_getPlatformForMirror( LANGUAGE, SCHEMA ) Win_x86_install mirrorbrain_getFileName( VERSION, LANGUAGE, SCHEMA ) Apache_OpenOffice_incubating_3.4.0_Win_x86_install_en-US.exe mirrorbrain_getExtension( LANGUAGE, SCHEMA ) .exe hasMirrorLink( LANGUAGE ) true