Closed Bug 192121 Opened 23 years ago Closed 23 years ago

Javascript error in guided bug entry

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: dswegen, Assigned: gerv)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 Build Identifier: Internet explorer (version 6, in this case), displays an error when it tries to display the component descriptions in the guided bug entry form, and the description doesn't appear. The error message looks something like this: Line 104 Error: 'null' is null or not an object The line changes from product to product, but seems to have to do with the descriptions variable. Reproducible: Always Steps to Reproduce: 1. Go to http://bugzilla.mozilla.org/enter_bug.cgi?format=guided 2. Select a product 3. On the next page click on a component Actual Results: Depending on the IE setting 'Tools->Internet Options->Advanced->Browsing->Display a notification about every script error' a popup will appear with the error, and no component description will be given Expected Results: Component description should appear, and no error popup or warning
-> Gerv
Status: UNCONFIRMED → NEW
Ever confirmed: true
er, let me try that again :)
Assignee: myk → gerv
Yep, this is my mistake. The div targetted by the JS is only available on Mozilla. This needs a rethink. Gerv
Attached patch Patch v.1 (obsolete) — Splinter Review
This removes the browser check and instead does JS object sniffing to decide whether to document.write the instructions. Gerv
Comment on attachment 114580 [details] [diff] [review] Patch v.1 Myk - could you have a look at this? It's a five-line fix. Gerv
Attachment #114580 - Flags: review?(myk)
Aren't we using: <script type="text/javascript" language="JavaScript"> anymore?
Status: NEW → ASSIGNED
I don't know. What difference does it make? Is it a validation thing? Gerv
Attached patch Patch v.2Splinter Review
Fix <script> parameters, as requested. Gerv
Attachment #114580 - Attachment is obsolete: true
Attachment #115324 - Flags: review?(kiko)
Attachment #114580 - Flags: review?(myk)
Just tested the patch and it seems to work fine on both IE and mozilla
Comment on attachment 115324 [details] [diff] [review] Patch v.2 Dave: can you look at this? It's a six-liner, and makes guided mode work properly in IE. Gerv
Attachment #115324 - Flags: review?(justdave)
Comment on attachment 115324 [details] [diff] [review] Patch v.2 Looks pretty logical to me. Kiko should probably still look it over.
Attachment #115324 - Flags: review?(justdave) → review+
kiko: ping? Gerv
Comment on attachment 115324 [details] [diff] [review] Patch v.2 Gerv, it looks okay, but I have one question. Why not just move the `if (mozilla/5)' check one line down so the div is actually defined in all browsers, regardless? You'd avoid the need for document.write on those browsers at least. Of course, your change is `more correct' in the sense that it checks for the same DOM attributes than the function being used. It may suggest we might need a better `generic' functionality sniffing mechanism here (using a global var, for instance, to avoid the recheck). But this is nitpickish at best. Anyway, this is more curiosity than complaint; r=kiko.
Attachment #115324 - Flags: review?(kiko)
Flags: approval?
Flags: approval? → approval+
Target Milestone: --- → Bugzilla 2.18
Fixed. Checking in template/en/default/bug/create/create-guided.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/create/create-guided.html.tmpl,v <-- create-guided.html.tmpl new revision: 1.7; previous revision: 1.6 done Gerv
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
*** Bug 222459 has been marked as a duplicate of this bug. ***
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: