Lucee and CF work differently with invoke parameter instance

Hi, I’m trying to call a function using invoke in Lucee. The function is located in the same file as the invoke so in my ColdFusion code, as instance parameter value I use " " , but in Lucee it generates an error. So I changed its value to this, but it doesn’t work in ColdFusion. How can I solve this issue?

Java Version: 11.0.16
Lucee Version: 5.3.9.166

Could you please share the code? That will make discussion easier.

Here is an example where I try to use this function (this is in CF) and instance parameter has “” as value, while if I run this on Lucee it won’t work
https://drive.google.com/file/d/1FZ87cKnHYjwQn9svXGycw2TEeAudKq6M/view?usp=sharing

@Samuele_Pederzani Can you please share your stacktrace?

1 Like

Pastebin or trycf would be far better than an image of your code.

1 Like

Maybe is same problem of this:
https://lucee.daemonite.io/t/invoke-built-in-function-programmaticaly/11621

in ACF for call built-in or UDF functions the first parameter of cfinvoke is empty.

The gist is… TryCF.com

Without the full length of the code, My guess is that the compiler is getting confused between single and double quotes.

What value for the parameter instance that works both with ColdFusion and Lucee can I use?
I remind you that the function that I’m trying to invoke is set in the same component where I call the function.

Could you please create and share a reproducible code snippet, create some at trycf.com and share it as a gist or create a small cfml/cfc templates, so we can try recreating the issue more easily?

Don’t know if there is any coder around who has the time to try recreating it first by reading and typing from pasted images. You might get guessing only :confused: .

3 Likes

I found the reason why it didn’t work on ColdFusion, in CF if you call a Private function using invoke you need to use “” as value of the instance parameter, while if you try to invoke a public function you would also use this. In Lucee the value this works also with private functions