Issues

Select view

Select search mode

 

invoke function doesn't support same scope calls

Fixed

Description

According to the official ACF docs for invoke:

invoke(instance, methodname [, arguments])

instance: String or component object; a reference to a component, or component name/path to instantiate. Can be an empty string when invoking a method within the same ColdFusion page or component.

The following code works in all versions of ACF, while Lucee throws: lucee.runtime.exp.ExpressionException: invalid component definition, can't find component []

The Lucee docs do not mention the empty string. Passing the THIS scope in a component does work. Passing the VARIABLES scope in a regular cfm template does not work however.

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

Fix versions

Affects versions

Priority

Created 15 September 2021 at 13:31
Updated 18 September 2024 at 10:16
Resolved 2 August 2022 at 08:32

Activity

Show:

Pothys - MitrahSoft2 August 2022 at 08:32

I've checked this ticket with the lucee latest build 6.0.0.219-SNAPSHOT. Now using an empty string in invoke() lucee invokes the method.

Zac Spitzer29 July 2022 at 12:38

Pothys - MitrahSoft12 July 2022 at 13:15

I added a fix to this ticket. By this fix, the invoke() function with the empty string as input will invoke the method from the same cfm page or component.

Pull Request:

Pothys - MitrahSoft20 September 2021 at 11:56

I've checked this ticket and confirmed the issue happened on lucee latest version 5.3.9.10-SNAPSHOT too. Using empty string in invoke() throws an error as above mentioned. Seems ACF invokes the method from the same cfm page/cfc.

I added a testcase to this ticket
Pull Request:

but using variables scope in cfm page, lucee invokes the method from the same page. Could you please check this and report it here back?

Flag notifications