Web console gives warnings, but no line numbers

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Locked
jjanderson5
Posts: 19
Joined: August 9th, 2007, 6:53 pm

Web console gives warnings, but no line numbers

Post by jjanderson5 »

Hi,

I'm developing a web page and I try to keep the warnings in the web console to a minimum.

I'm currently running a jsp page that seems to work ok, but I'm getting 2 warnings that I can not track down. Normally, the console messages give a line number, but no line numbers are given for these warnings. I suspect the errors are in my css file, but I have not been able to isolate to any specific lines there. I have inserted console log messages in my javascript source code. The output of the log messages surrounds the warning messages, but there is no source code between the console.log() lines that seem appropriate.

This is an excerpt from the file page1.jsp

Code: Select all

27         console.log("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
 28         console.log("68WW page1.jsp");
 29         console.log("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
 30         // console.log("customerValidLogin = " + <jsp:getProperty name="BFSInfo" property="loggedIn" />);
 31         $(document).ready(function() {
 32             console.log("document.ready is being run");
Here is part of the console log produced by this code:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX page1.jsp:27:3
68WW page1.jsp page1.jsp:28:3
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX page1.jsp:29:3
Error in parsing value for ‘width’. Declaration dropped. page1.jsp
Error in parsing value for ‘height’. Declaration dropped. page1.jsp
Expected ‘:’ but found ‘=’. Declaration dropped. page1.jsp
document.ready is being run page1.jsp:32:4
Note that the output has page numbers for the lines produce by 'console.log()' source code lines. Also, note that the lines starting with "Error in parsing" are preceded with a warning icon, indicating the errors are warnings, not errors.

These "Error in parsing" lines lack line numbers. I assume there are no line numbers because the errors are not in the 'page1.jsp' file, but in the css file, as I mentioned above. I have systematically commented out lines in my css file that have to do with height or width, but the warning messages continue to show up.

Does anyone have a suggestion on how to find the root cause of these warnings?

Jim A.
User avatar
DanRaisch
Moderator
Posts: 127166
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: Web console gives warnings, but no line numbers

Post by DanRaisch »

Moving to Web Development.
AlfonsoML
Posts: 387
Joined: September 6th, 2006, 1:39 pm
Contact:

Re: Web console gives warnings, but no line numbers

Post by AlfonsoML »

You can check your stylesheet with StyleLint https://stylelint.io/ and it will point any errors that you have (and it will warn you about many too other things, be careful about the rules that you enable)
User avatar
Frenzie
Posts: 2135
Joined: May 5th, 2004, 10:40 am
Location: Belgium
Contact:

Re: Web console gives warnings, but no line numbers

Post by Frenzie »

Did the web console change since Fx 52? It says the file and line on the right and if you click on the error it takes you directly there.

Image
Intelligent alien life does exist, otherwise they would have contacted us.
Locked