No JavsScript on this page

143 views
Skip to first unread message

jhsachs -- account management

unread,
Jun 1, 2012, 2:55:42 PM6/1/12
to fir...@googlegroups.com
>> I looked this up on the Web and found that it means exactly what it
>> says, except that it can also be caused by a <script> tag that does
>> not specify type="text/javascript".

>That's incorrect. Firebug also displays the script when you don't specify
>>the type attribute.

In that case the message itself is incorrect. I realized after posting that it says both things.

>>I went to work on my script's main file...
>> -- only references to include files that I'd already cleared. But it
>> worked! When I eliminated the entire body of the script, FireBug
>> worked correctly.
    
>I assume with "main file" you mean your HTML file?

Yes.

>And by "references to "include files" you mean
><script src="xyz.js">type="text/javascript"></script>, no?

No. I mean files that are included in the script by a PHP "include" or "require_once" statement. They could contain any combination of PHP, HTML, and JavaScript code.

>>I then started putting stuff back in, expecting to zero in on the bit...
    
>> Now I can begin debugging my script, after a couple of hours of
>> totally unproductive problem identification.

>> I hope someone can explain what happened here, and how to prevent a repeat.
    
>The only explanation I have is that you didn't put it back in exactly as it
>was before. E.g. a simple typo...

I can't prove that that is not the case, but I think it's very unlikely, because I was not typing... I was strictly cutting and pasting... precisely to avoid typos.

In any case, it's difficult to imagine what type of error I could accidentally fixed that would have made a difference to Firebug. As I said, the code I was experimenting with contained no JavaScript; if there an error in the HTML, my IDE would have flagged it; and even if there was in error in my PHP it never  left the server.

>The next time this occurs, your first sight should go to the *Net*
>panel to see if the script was really loaded correctly. If it was,
>you should have a look inside the *Console* panel for any syntax
>errors your code might have....

I'll keep these suggestions and try them if the problem recurs. I did check the Console panel, and it was empty.

It looks like there's nothing you can do with this until I can send you a copy of the failing file. I understand that. I think you'll understand why I didn't save one: I was focused on getting FireBug to work so that I could debug my code, and the possibiility that FireBug was malfunctioning did not occur to me until near the end of the process, when the script in its original form was long gone.

Sebastian Zartner

unread,
Jun 3, 2012, 4:46:07 AM6/3/12
to fir...@googlegroups.com, jhs...@jhsachs.com
For reference: This thread started at https://groups.google.com/forum/#!topic/firebug/mXqMM__js8A.


>> I looked this up on the Web and found that it means exactly what it
>> says, except that it can also be caused by a <script> tag that does
>> not specify type="text/javascript".

>That's incorrect. Firebug also displays the script when you don't specify the type attribute.

In that case the message itself is incorrect. I realized after posting that it says both things.

Again, the message says "If <script> tags have a "type" attribute, it should equal "text/javascript" or "application/javascript".". So I believe it's clear enough.


>I assume with "main file" you mean your HTML file?

Yes.

>And by "references to "include files" you mean
><script src="xyz.js">type="text/javascript"></script>, no?

No. I mean files that are included in the script by a PHP "include" or "require_once" statement. They could contain any combination of PHP, HTML, and JavaScript code.
 
I see. So your main file is actually also a PHP script. Note that Firebug only sees the HTML, JavaScript and CSS output. It doesn't see any PHP includes.


>>I then started putting stuff back in, expecting to zero in on the bit...
    
>> Now I can begin debugging my script, after a couple of hours of
>> totally unproductive problem identification.

>> I hope someone can explain what happened here, and how to prevent a repeat.
    
>The only explanation I have is that you didn't put it back in exactly as it
>was before. E.g. a simple typo...

I can't prove that that is not the case, but I think it's very unlikely, because I was not typing... I was strictly cutting and pasting... precisely to avoid typos.

Ok, in this case it really sounds unlikely. But with cut and paste you can also do mistakes.
 
In any case, it's difficult to imagine what type of error I could accidentally fixed that would have made a difference to Firebug. As I said, the code I was experimenting with contained no JavaScript; if there an error in the HTML, my IDE would have flagged it; and even if there was in error in my PHP it never  left the server.

That's why you should have a look at the Net panel first and check, if the JavaScript code was actually transferred.

>The next time this occurs, your first sight should go to the *Net*
>panel to see if the script was really loaded correctly. If it was,
>you should have a look inside the *Console* panel for any syntax
>errors your code might have....

I'll keep these suggestions and try them if the problem recurs. I did check the Console panel, and it was empty.

Ok, so when nothing was displayed inside the Console panel, it could be that there really was no error. But it could also have been that there was a transferring error or the error display was just turned off. Therefore please always make sure you have Show JavaScript Errors and Show JavaScript Warnings checked inside the Console panel options.
 
It looks like there's nothing you can do with this until I can send you a copy of the failing file. I understand that. I think you'll understand why I didn't save one: I was focused on getting FireBug to work so that I could debug my code, and the possibiility that FireBug was malfunctioning did not occur to me until near the end of the process, when the script in its original form was long gone.

I can completely understand that. This also often happened to me. It's clear that you're searching the error in your code in the first line, but of course the Firebug programmers also make mistakes and it could be that Firebug was the culprit here. Though from my experience errors resulting in this message most often lie at the user-side.

Anyway, if you see the problem again, just follow the steps described at our wiki page. With these steps you should be able find out if it's a problem at your side, in another extension or in Firebug itself and create a test case for it when it's really caused by Firebug.

Sebastian

jhsachs -- account management

unread,
Jun 4, 2012, 6:18:43 PM6/4/12
to fir...@googlegroups.com
I'm now able to reproduce this problem on a publicly accessible page, in a slightly different form. I created a new Firefox profile as suggested on the wiki page and the problem did not go away.

The problem occurs (the Firebug window opens by itself) when I cold-start Firefox and it loads http://www.google.com as its home page. The problem doesn't happen if I close Firebug but not Firefox, and then reload http://www.google.com by clicking the Home button, whether I do so immediately or later.

The Firefox version is 12.0; Firebug is 1.9.2; OS is Windows 7.

I've tried doing the same thing with the home page set to http://www.yahoo.com and http://www.amazon.com, and the problem did not occur. When I set the home page back to google.com, it occurred again.

The Console tab was empty until I enabled "Show JavaScript warnings," and then I got one message, "Use of getAttributeNodeNS() is deprecated. Use getAttributeNS() instead."

The Net tab listed about ten loads, none of which looked suspicious.

Note that in the form of this problem that I originally described,
it happens whenever the affected page is loaded -- NOT only when Firefox is cold-started. I still can't reproduce that form of the problem except on pages that aren't t publicly accessible.

Reply all
Reply to author
Forward
0 new messages