Functions included by templates not found

I have a method Check that is located in a component file. That file is included on the page I want to call the method. But when I try to call the method I get an error: No matching function [CHECK] found

This works perfectly fine in Adobe Coldfusion, but Lucee can’t seem to find it. If I add the method directly to the page it works. But if I add the method back to the component file and try to include it it cant find the method. I believe the file is being found and included properly because it is not throwing an error saying it can’t find the file.

Is there a difference in how lucee includes component files compared to AdobeCF?

You mean like <cfinclude template="some.cfc" />?

If you’re doing that, why not just call it a cfm and define it that way? You’re not gaining any encapsulation or OOP from the CFC.

1 Like

Hey that does work!

Why would AdobeCF accept the CFC and Lucee only seems to find this with the CFM?

Is it just bad practices on our part that Adobe CF let us get away with? Or does lucee interpret cfc files differently?

According to this ticket, including a CFC works, but oddly only if there is no query string.

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