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

Description

Running the following:

include template="include.cfm" runonce="true";

Produces an exception with the following stack trace:

Missing [;] or [line feed] after expression at lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.checkSemiColonLineFeed(AbstrCFMLScriptTransformer.java:1742):1742 at lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.__singleAttrStatement(AbstrCFMLScriptTransformer.java:1604):1604 at lucee.transformer.cfml.script.AbstrCFMLScriptTransformer._singleAttrStatement(AbstrCFMLScriptTransformer.java:1525):1525 at lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.tagStatement(AbstrCFMLScriptTransformer.java:926):926 at lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:220):220 at lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:202):202 at lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statements(AbstrCFMLScriptTransformer.java:185):185 at lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statements(AbstrCFMLScriptTransformer.java:169):169 at lucee.transformer.cfml.script.CFMLScriptTransformer.transform(CFMLScriptTransformer.java:50):50 at lucee.transformer.cfml.tag.CFMLTransformer.tag(CFMLTransformer.java:600):600 at lucee.transformer.cfml.tag.CFMLTransformer.body(CFMLTransformer.java:331):331 at lucee.transformer.cfml.tag.CFMLTransformer.transform(CFMLTransformer.java:271):271 at lucee.transformer.cfml.tag.CFMLTransformer.transform(CFMLTransformer.java:142):142 at lucee.runtime.compiler.CFMLCompilerImpl.compile(CFMLCompilerImpl.java:85):85 at lucee.runtime.PageSourceImpl._compile(PageSourceImpl.java:334):334 at lucee.runtime.PageSourceImpl.compile(PageSourceImpl.java:303):303 at lucee.runtime.PageSourceImpl.loadPhysical(PageSourceImpl.java:257):257 at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:193):193 at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:913):913 at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:950):950 at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:906):906 at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:225):225 at lucee.runtime.listener.ModernAppListener.onRequest(ModernAppListener.java:101):101 at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2265):2265 at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2228):2228 at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:456):456 at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:47):47 at javax.servlet.http.HttpServlet.service(HttpServlet.java:729):729 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292):292 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207):207 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52):52 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240):240 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207):207 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212):212 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106):106 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502):502 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141):141 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79):79 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88):88 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528):528 at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:873):873 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670):670 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520):1520 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476):1476 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142):1142 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617):617 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61):61 at java.lang.Thread.run(Thread.java:745):745

Remove the runonce attribute and it works fine.

Attachments

1
  • 27 Aug 2016, 08:59 am

Activity

Zac Spitzer 16 hours ago

also, if you put each attribute on a new line, it puts the attributes as variables

https://github.com/lucee/Lucee/commit/2d7d9b4ff7becbf652d8379466305b780b1dc2b2

same somewhat related issue as

https://luceeserver.atlassian.net/browse/LDEV-5543

Julian Halliwell 19 February 2018 at 11:14

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 19 February 2018 at 11:09

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?
NO

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.

Pothys - MitrahSoft 16 February 2018 at 12:10

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

Pullrequest : https://github.com/lucee/Lucee/pull/395

Details

Assignee

Reporter

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Priority

Created 27 August 2016 at 09:00
Updated 16 hours ago