Skip to main content
Inspiring
February 1, 2023
Answered

Invalid CFML structure found

  • February 1, 2023
  • 3 replies
  • 989 views

I'm getting the error "Invalid CFML structure found on line 10019 at column 34."
I know the code at line 10019 (in cfscript) has no problem.
When adding a new line (by enter key at anywhere before the error line) it still gives an error at line 10020,
but when adding one more new line it's OK.
What is the cause?
I have tried several different things like:
add or delete any comment or cftag it's OK.
(or remove a space then OK, but adding a space then gives an error ※after a little modification)
※any modifications after the error line(10019) is not efficient
I use ColdFusion2018 update15, pageEncoding="SJIS".

    This topic has been closed for replies.
    Correct answer VietTruong

    Sorry for late.

    Charlie Arehart,
    The code runs OK at cffiddle.org with both CF2021 and CF2018.
    I use Visual Studio Code on Windows 10, ColdFusion2018 update15.
    (Same error on both Windows and Linux)

     

    BKBK,
    I checked the code according to your sample, It doesn't have that character chr(65279).

     

    Now, this problem has been solved (rearrange content), I'm closing this conversation.
    Thank you for your help!

    --

    The cause seems to be the following complex factors:
    ・The file size is very large, and the number of class files are generated (maybe occur at compile time).
    ・Some contain are mixed with both CF tag descriptions and <cfscript> descriptions.
    ・The description location of error maybe refer to the accidental error value.

    3 replies

    VietTruongAuthorCorrect answer
    Inspiring
    February 17, 2023

    Sorry for late.

    Charlie Arehart,
    The code runs OK at cffiddle.org with both CF2021 and CF2018.
    I use Visual Studio Code on Windows 10, ColdFusion2018 update15.
    (Same error on both Windows and Linux)

     

    BKBK,
    I checked the code according to your sample, It doesn't have that character chr(65279).

     

    Now, this problem has been solved (rearrange content), I'm closing this conversation.
    Thank you for your help!

    --

    The cause seems to be the following complex factors:
    ・The file size is very large, and the number of class files are generated (maybe occur at compile time).
    ・Some contain are mixed with both CF tag descriptions and <cfscript> descriptions.
    ・The description location of error maybe refer to the accidental error value.

    Charlie Arehart
    Community Expert
    Community Expert
    February 17, 2023

    Glad you solved your first problem, with the huge file. Yes, those can be trouble. (Splitting it with a cfinclude may help, if it happens again.)

     

    But then it seemed you'd raised a second problem, on Feb 6 above, with just a 12-line sample. That's what my reply focused on. You confirm now that works on cfiddle: is it working now for you locally? If so, what got it working? Or why is it no longer am issue? 

    /Charlie (troubleshooter, carehart. org)
    Inspiring
    February 21, 2023

    Regarding the 12 line samples, it is the same problem (not 2 problems, sorry for misleading), it is the location where the error message is displayed (※The description location of error maybe refer to the accidental error value).
    I just rearranged the content like you suggested (Splitting it with a cfinclude)

    Inspiring
    February 6, 2023

    Specifically the following error is occurring.
    "Invalid CFML construct found on line 10 at column 6"

     1     <cfscript>
     2     someArray = [
     3         {name="testemployee", age="32"},
     4         {name="employeetest", age="36"}
     5     ];
     6     arraySort(
     7         someArray,
     8         function (e1, e2){
     9             return compare(e1.name, e2.name);
    10         }
    11     );
    12     </cfscript>


    After I fix it as follows, the error does not occur.
    Fix that there is no line break between line 8 and line 9

     1     <cfscript>
     2     someArray = [
     3         {name="testemployee", age="32"},
     4         {name="employeetest", age="36"}
     5     ];
     6     arraySort(
     7         someArray,
     8         function (e1, e2){return compare(e1.name, e2.name);
     9         }
    10     );
    11     </cfscript>

    I can't identify the cause, can anyone help me?

    Charlie Arehart
    Community Expert
    Community Expert
    February 6, 2023

    Truong, whatever is happening for you, it's unique to you. I can run that exact same code, either way, on CF2021 or 2018 (or 2016 or 11 or 10), without any such error. (And anyone who wants to can also run it online via Adobe's CFFiddle. org, where I offer both variants (your first and second).

     

    So first, before we explore your own situation any further, can you confirm if you run that code (at cffiddle.org) that it DOES run for you? Note that it has an option to change it between CF2021 and 2016. You've not said what version of CF you're running: if it may be CF2016 or 11 or 10, the code can be run against those as well (and Lucee and Railo) at trycf.com.)

     

    Second, as for your end, you referred in your first note to a difference in doing a CR vs a CRLF. So what editor are you using? And on what OS? And if the problem remains, please tell us both exacly what CF version you're running and what update it's at (indicated in the CF Admin "settings summary", or in a cfdump of the server scope).

    /Charlie (troubleshooter, carehart. org)
    Inspiring
    February 3, 2023

    I add information: if change the newline code to LF, it's OK, but if return to CRLF, it's error.