All users were logged out of Bugzilla on October 13th, 2018

In <pageInfo.js>, (JS) "Error: this.data[row] has no properties" (on pages with meta tags)

RESOLVED FIXED

Status

--
major
RESOLVED FIXED
16 years ago
13 years ago

People

(Reporter: bugzilla, Assigned: db48x)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
Warning: reference to undefined property this.data[row]
Source File: chrome://navigator/content/pageInfo.js
Line: 82

to reproduce:
1) go to http://wap.gemal.dk/env.cgi press cancel in the Downloading dialog
2) right click on the empty white page and select Page Info
3) select the Forms tab

check the js console...

20021201
(Assignee)

Comment 1

16 years ago
ok, I know why this happens. See line 487, in the case where there are no form
nodes in the document (and about:blank has no form nodes)

Anyway, this'll be fixed when I get bug 181764 checked in
Depends on: 181764
The patch for bug 181764 has been checked in, it looks like that bug is only
open for cosmetic reasons at this point. I don't get a "blank white page" when
canceling the download, however. Henrik, can you make sure this has been fixed,
please?

Comment 3

16 years ago
I get almost the same error but on line 81

Warning: reference to undefined property this.data[row]
Source File: chrome://navigator/content/pageInfo.js
Line: 81

I use mozilla 1.4 final.
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624

I see the error opening the media tab.

This happens on a page without any meta tags or other header info.
I get this error twice on the page.

This is the row complaining.

81:    return this.data[row][colidx] || "";

If the bug 181764 was included in 1.4 final the problem persists.

If needed I could create a testcase of my page.
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6a) Gecko/20031030]
(BuildId=2003110115, bug 224340#c19) (W98SE)

I just got tens of this one, like in a loop...
{
Error: this.data[row] has no properties
Source File: chrome://navigator/content/pageInfo.js
Line: 81
}

It's no longer a (strict) warning: it's now an error.
Changing: (S) normal -> major.

The code says:
{
 75 
 76     // row can be null, but js arrays are 0-indexed.
 77     // colidx cannot be null, but can be larger than the number
 78     // of columns in the array (when column is a string not in 
 79     // this.columnids.) In this case it's the fault of
 80     // whoever typoed while calling this function.
 81     return this.data[row][colidx] || "";
}
Severity: normal → major
Summary: strict javascript warning in pageInfo.js → In <pageInfo.js>, (JS) "Error: this.data[row] has no properties"

Comment 5

15 years ago
I'm using the latest Mozilla 1.6beta (build 2003120808) and each time I consult
the View/Page Info Ctrl+I, I get about 50 errors in the javascript console. Even
after unchecking
Edit/Preferences.../Debug/Show chrome javascript errors and warnings,
I still get 
Error: this.data[row] has no properties
Source File: chrome://navigator/content/pageInfo.js
Line: 81
and I should not.

Comment 6

15 years ago
This bug sure looks like a DUPLICATE of bug 213860

Comment 7

15 years ago
*** Bug 213860 has been marked as a duplicate of this bug. ***
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6b) Gecko/20031208] (W98SE)

Yet another URL: <http://www.aston.fr/>.

From bug 213860: it happens on pages with meta tags.
Summary: In <pageInfo.js>, (JS) "Error: this.data[row] has no properties" → In <pageInfo.js>, (JS) "Error: this.data[row] has no properties" (on pages with meta tags)
Removing: (depends on) bug 181764, since its inital patch landed on 2003.01.
No longer depends on: 181764
Addition to comment 8:

A run through Venkman shows that the |getCellText| function is called for twice
the actual row count, 0-5 instead of 0-2:

then there are 2 columns (meta-name, meta-content), so 3*2=6 errors !
then this happens at each pageInfo window "refresh" !!

Now, where is this function called from ?
(not from one of the calls inside pageInfo.js !)
(Assignee)

Comment 11

15 years ago
Created attachment 137254 [details] [diff] [review]
fix

it should be noted that this also happens with the forms tab, and that this
patch fixes that as well
(Assignee)

Updated

15 years ago
Attachment #137254 - Flags: superreview?(bz-vacation)
Attachment #137254 - Flags: review?(timeless)
(Assignee)

Updated

15 years ago
Blocks: 223867
Comment on attachment 137254 [details] [diff] [review]
fix


Yea, I noticed theses calls while using Venkman, and wondered about this
function purpose...

'approval1.6=?': Trivial repetitive JS Error generating code removal.
Attachment #137254 - Flags: approval1.6?
(Assignee)

Comment 13

15 years ago
The TreeBoxObject uses it to request the contents of each cell that it draws on
the screen.
So why is it ok to remove that code?  Do things still update properly?
(Assignee)

Comment 15

15 years ago
it's ok because it's called automatically whenever you add a row. I changed that
a while back, but apparently never took out all the extra calls.
Additionaly to the <pageInfo.js> patch,

Could you check
<http://lxr.mozilla.org/seamonkey/search?string=%5C.rowCountChanged>
for possible other removals ?
(Assignee)

Comment 17

15 years ago
none of those others are related. each one of those other files manages a
seperate nsTreeView object, and they'll all have slightly different rules in
this respect. I recently changed the one in pageInfo.js, but that doesn't mean
any of the others have changed.
Comment on attachment 137254 [details] [diff] [review]
fix

Ah, ok.  sr=bzbarsky then.

Timeless is sorta on a bus at the moment; I don't know when he will next be
able to review stuff.  You may want to ask Neil instead...
Attachment #137254 - Flags: superreview?(bz-vacation) → superreview+
(Assignee)

Updated

15 years ago
Attachment #137254 - Flags: review?(timeless) → review?(neil.parkwaycc.co.uk)

Updated

15 years ago
Attachment #137254 - Flags: review?(neil.parkwaycc.co.uk) → review+

Comment 19

15 years ago
Comment on attachment 137254 [details] [diff] [review]
fix

a=tor for 1.6 checkin.
Attachment #137254 - Flags: approval1.6? → approval1.6+

Comment 20

15 years ago
Has this landed yet? It's going to need to make it in soon if it's going to make
the 1.6 branch.
It seems that it has not.
I requested approval1.6, but I don't have a CVS account to check in the patch.

Daniel (the author) ? Anyone ??
(Assignee)

Comment 22

15 years ago
No, it hasn't yet. I still don't have my cvs access, so could you check it in
for me Asa? I'd appreciate it.

Comment 23

15 years ago
Checked in for Daniel Brooks.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.