the three designer urls work, but .com/services/web-design does not work because web-design is not a registered event. Designer name should be optional like a variable, but everything else is a normal route path handler/action/var1/var2 and so on.
In the Routes.cfm I think I can do something like:
but I get an error which i think is misleading because the addRoute syntax looks good to me:
Error importing routes configuration file: Invalid construct: Either argument or name is missing. When using named parameters to a function, each parameter must have a name.
Ok, the condition argument is not in framework 3.5. So i’m using 3.7. But now I have to figure out why
# Function argument mismatch.
The getInstance function does not specify the same arguments or arguments in the same order in the coldbox.system.ioc.Injector ColdFusion component and the coldbox.system.ioc.IInjector ColdFusion interface.
The error occurred in D:\Websites\designersnetwork\coldbox\system\web\Controller.cfc: line 63 Called from D:\Websites\designersnetwork\coldbox\system\Coldbox.cfc: line 69 Called from D:\Websites\designersnetwork\coldbox\system\Coldbox.cfc: line 102 Called from D:\Websites\designersnetwork\coldbox\system\Coldbox.cfc: line 378 Called from D:\Websites\designersnetwork\Application.cfc: line 58 |
So haven’t been able to successfully install any of the 3.7 sample applications. I get the above error every time.
I don’t think upgrading to Java 1.7 is going to fix that issue, I think if you look carefully you are trying to do a closure that I think only ColdFusion 10 is capable of doing here.
I’m pretty certain Andrew is correct and closures only work on CF10. You’ll have to find another way to do it. Can you declare the function above and just pass a reference to it?
I meant to get back to this post sooner. so I tested my route again. My CF Application log says
“Error”,“jrpp-11”, “12/10/13”, “14:43:01”,“351…”,“Error importing routes configuration file: Invalid construct: Either argument or name is missing. When using named parameters to a function, each parameter must have a name.”
I believe this is because 9.0.2 does not support closures like you guys mentioned already. But since I did not see anything about 3.7.0 requiring CF 10, then I thought that the condition closure is meant to work on my server.
Sorry I meant with the closures and 9.02, for your second problem with the condition. it is expecting a UDF or closure so it doesn’t consider false to be either of those.