Invalid token '\ n' found in row 31 in column 0

I have a CF-7 file with 30 lines of code. I get an error in line 31 saying

** Invalid token '\n' found on line 31 at column 0.** 

What does the error message mean?

Hello

Vas

+4
source share
2 answers

The error is a bit misleading. The CF compiler tries to parse the code, but does not work due to an unclosed tag / block, so it continues to try to parse to the end of the document, and then it reports an error, since the last thing that was found is a new line that is not closing the tag. which is currently open. So go through the source code and check where you are not closing something. Error before line 31.

it could be something like

 <cfif foo eq "Bar"> Still haven't found what I'm looking for. 

and then does not have an end tag. Or you might also have a CF style comment

 <!--- but are closing it as a HTML comment --> 
+11
source

A new line character appears at the beginning of the line. Is what you use for parsing a file not expecting an empty string?

+1
source

All Articles