Anyone know why I get a "Syntax Error, Invalid Con...
# cfml-beginners
Anyone know why I get a "Syntax Error, Invalid Construct" in this Application.cfc First 3 lines of my Application.cfc <cfset = "CoolApp" /> <cfset this.SessionManagement=true /> <cfset this.loginStorage="Session" />
There is no syntax error in that code. Why did you focus on those three lines?
But those can't be the first three lines of your Application.cfc. There needs to be a
line too.
With a syntax error... it'll almost always tell you which statement has the syntax error. What's the whole error?
Here are the first few lines of my application.cfc <cfset = "Store" /> <cfset this.SessionManagement=true /> <cfset this.loginStorage="Session" /> <cffunction name="onRequest"> <cfset Super.onRequest(ArgumentCollection=Arguments) /> <site title="Pet Store" template="store/template.cfm"><!--- wireframe.cfm ---> <page title="Welcome" template="home.cfm" /> <site id="Types" title="Pet Types"> <page title="Dogs" template="dogs.cfm" /> <page title="Cats" template="cats.cfm" /> <page title="Fish" template="fish.cfm" /> <page title="Birds" template="birds.cfm" /> <page title="Monkeys" template="monkeys.cfm" /> </site>
Lucee said error occured in Line 2
There was a cfimport state ment that I removed. Could That be it?
We have no way to tell! It looks like you are using inheritance (as you have
) but you don't show us the actual first lines of your code (as Adam mentioned where is your
tag?) It's quite possible the syntax error is in the CFC you are extending but without seeing the actual code we have no way to help you.
@Formiko. You are not showing us the code in question still. An Application.cfc starts with
, so that'd be one of the first lines of the file. Equally as you say... you had at least one
tag in there. These would also be within the first lines of the file. show us the actual code Also. show us the actual error. Don't just describe it... show us. The error message usually tells you what's wrong. This is now the second time I have asked this.
@Formiko please check the comments by @Adam Cameron We need to know what more you are doing before an answer can be provided