Closed
Bug 795599
Opened 13 years ago
Closed 13 years ago
JS error if locale does not exist for landing page
Categories
(developer.mozilla.org Graveyard :: Wiki pages, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jswisher, Unassigned)
Details
(Whiteboard: bug)
Steps to reproduce:
1. Set your browser locale to something other than en-US.
2. Go to https://developer.mozilla.org/en-US/docs/Apps
3. Click "Sign up for it here" in the box about the Open Web Apps newsletter, which is a link to https://developer.mozilla.org/apps
Expected result:
Go to localized landing page for apps, if it exists, or en-US page if it doesn't.
Observed result:
Error : TypeError: $("#newsletter-sub").modal is not a function
Source : https://developer.mozilla.org/media/js/apps-newsletter.js
Line : 9
I can fix this by changing the link to https://developer.mozilla.org/en-US/apps since I don't think we have localized versions of that page. But I'll leave it for now since it reveals this bug.
Comment 1•13 years ago
|
||
I tried this in French and Spanish, and had no issues; which language did you try Janet?
Comment 2•13 years ago
|
||
Janet did fill this bug report during the last MDN sprint after a problem I reported to her. Since she didn't had the problem with her English browser, she thought the problem would surely come from the fact that I am running a localized Firefox, hence that should be a locale problem.
But when digging again it appears the error comes from the JavaScript of apps-newsletter.js :
TypeError: $("#newsletter-sub").modal is not a function
https://developer.mozilla.org/media/js/apps-newsletter.js
Line 9
I use the NoScript Firefox addon because I want only to allow JavaScript from some web sites. And for the page https://developer.mozilla.org/en-US/docs/Apps I only allow JavaScript from persona.org and mozilla.org. But not from google.com. And the "modal" function comes from some JavaScript from google.com.
So first thing to do would be to rename this ticket to "#newsletter-sub modal function from google.com not allowed by all users". Then lower its importance.
Then the MDN managers have to decide whether it's worth to bother with this issue (one solution being to host the JavaScript code for the "modal" function on mozilla.org) or not.
Thanks
Updated•13 years ago
|
Priority: -- → P1
Whiteboard: bug
Comment 3•13 years ago
|
||
That old Apps page has been deprecated so this is no longer an issue.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•