Using the "runonce" attribute with "include" in cfscript throws an exception.


Running the following:

Produces an exception with the following stack trace:

Remove the runonce attribute and it works fine.


Pothys - MitrahSoft
February 15, 2018, 10:25 AM

Hi ,

Did you watch igal spair comments,

Inside the script you should call as follows

include "include.cfm"


cfinclude(template="test.cfm", runonce="true");

ACF also acts in same way.

can we close this ticket?

Julian Halliwell
February 15, 2018, 10:46 AM

Hi . Yes I read Igal's comment but it only applies if you are not using runonce;
If I omit the template attribute while using runonce:

...then I get the following error:

...even though you can see that the semi-colon is not missing.

is a valid workaround, but this is still an inconsistency with the "tags in script" functionality.

Pothys - MitrahSoft
February 16, 2018, 12:10 PM

I've added testcase for this ticket & Micha will confirm about this issue

Pullrequest :

Michael Offner
February 19, 2018, 11:09 AM

i could not agree more with this "but this is still an inconsistency".
tags in script are inconsistent, to implement tags in Railo/Lucee in a compatible way with ACF, we had to make 2 kind of tags.
"single value tags" and "multi attribute tags".

The following tags are all "single value tags":

  • pageEncoding "UTF-8";

  • throw "shit happens";

  • sleep 100;

  • include "inc.cfm";

  • import "org.lucee.whatever.*";

  • forward "susi.cfm"

  • flush 10;

  • exit "loop";

all this tags only take a single value, not multiple attributes like the other tags do. This is how CFML works, is it consistent?

actually the tag import is more flexible because it has it own parser, that support single value and multiple attributes, we could go with this the same way or maybe with all this tags.
I will mark this ticket as feature request because it works as it is expected to work.

Julian Halliwell
February 19, 2018, 11:14 AM

Understood. I agree this is very minor issue with a workaround, and I would much rather you spend time on more important tickets.


Michael Offner


Julian Halliwell


Affects versions