Web console gives warnings, but no line numbers

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

Post Posted February 23rd, 2018, 10:19 am


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
 28         console.log("68WW page1.jsp");
 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:

68WW page1.jsp page1.jsp:28: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
Posts: 125466
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted February 23rd, 2018, 1:16 pm

Moving to Web Development.

Posts: 387
Joined: September 6th, 2006, 1:39 pm

Post Posted February 27th, 2018, 2:11 pm

You can check your stylesheet with StyleLint 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
Posts: 2135
Joined: May 5th, 2004, 10:40 am
Location: Belgium

Post Posted March 26th, 2018, 1:34 am

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.

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

Return to Web Development / Standards Evangelism

Who is online

Users browsing this forum: No registered users and 2 guests