Closed Bug 448001 Opened 16 years ago Closed 16 years ago

Developer stats graph doesn't show up at all

Categories

(addons.mozilla.org Graveyard :: Developer Pages, defect)

defect
Not set
critical

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: baz, Assigned: cpollett)

References

()

Details

Attachments

(1 file)

I'm putting this in Developer Pages instead of stats since it's likely a CSS/JS/mini-fication issue rather than stats per se.
I'm not entirely sure how stats works, but FWIW it looks like this page has a JS error in the inline JS produced by the overall site layout related to advanced search:

$ svn blame site/app/views/layouts/mozilla.thtml  | grep "getElementById('advanced-search-toggle-link')"

 17213 cpollett@mozilla.com         document.getElementById('advanced-search-toggle-link').href="#";   // for ff2, ie6-7

This breaks when there's no search element on the page, which could be causing all JS on the page to bail out after that point.
Yep, Les is right. We need to fix ASAP and push again - more pages than just stats don't have a search box.
Assignee: nobody → cpollett
As Les pointed out the error was caused because JS was dying when the  given id was not found (related to the search element). The raison d'etre of this code was to allow toggling of the advance search form under ie 6-7. The patch implements Les' suggested fix from irc. This got rid of the JS error on the statistics page which does not have the search element. I then went and checked that toggling of the advance search form still works in ie 6 and 7. It did.
Attachment #331328 - Flags: review?
Attachment #331328 - Flags: review? → review?(lorchard)
Comment on attachment 331328 [details] [diff] [review]
patch to fix advance search toggle js error

Looks okay to me, in that the JS error went away and the page seems to work.
Attachment #331328 - Flags: review?(lorchard) → review+
Okay, checked into r17398
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
https://addons.mozilla.org/en-US/statistics/addon/5579 and other public-stats add-ons work just fine, so verified FIXED; no longer seeing the JavaScript error: "Error: document.getElementById("advanced-search-toggle-link") is null
Source File: https://preview.addons.mozilla.org/en-US/statistics/addon/5579
Line: 61"

Tested IE 6 and 7 in addition to Firefox 2/3.
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: