tracker issue : CF-3037057

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 74246:cfinvoke against a persistent CFC fails with error message

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): John Beynon / John Beynon (johnab)

Created: 12/14/2008

Components: Language, Tags

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 218294

Priority/Frequency: Major / Unknown

Locale/System: English / Win All

Vote Count: 2

Problem:

cfinvoke against a persistent CFC fails with error message

"The component attribute in cfinvoke tag has invalid value."

Thread in prerelease forum at https://prerelease.adobe.com/project/forum/thread.html?cap=87529BDA13744B3DB718E841890B9240&forid={936680A8-3CD1-4D52-BCEE-9EF903D7FB02}&topid={796B0A53-C3A7-4223-A7F3-1D0150D4D36B} - thread confirms other people are seeing this behaviour too.

Removing the persistent attribute and the CFC is invoked ok.

CFinvoke is the only way to dynamically invoke CFC methods so it really needs to be fixed so that it works!


Method:

testcase:

index.cfm

<cfset myObject = createobject("component","mycfc")>

<cfinvoke component="#myObject#" method="myMethod" returnvariable="myReturnVar">

<cfdump var="#myReturnVar#">

mycfc.cfc

component persistent=true {
	public string function myMethod() {
		return 'foo';
	}
}


Result:

 The component attribute in cfinvoke tag has invalid value.
The component attribute can either be a string (component name) or a component object
 
The error occurred in C:\JRun4\servers\centaur\centaur-ear\cfusion-war\ormmanager\admin\testcases\cfinvoke\index.cfm: line 3

1 : <cfset myObject = createobject("component","mycfc")>
2 : 
3 : <cfinvoke component="#myObject#" method="myMethod" returnvariable="myReturnVar">
4 : 
5 : <cfdump var="#myReturnVar#">

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3037057

External Customer Info:
External Company:  
External Customer Name: John Beynon
External Customer Email: 7E7D48CA445FAAAF992015D5
External Test Config: 12/14/2008

Attachments:

Comments:

+1 vote. Definitely needs fixing.
Vote by External U.
24396 | November 10, 2011 07:08:48 PM GMT
This will cause all sorts of bizarre failures in community frameworks if it isn't fixed! Users will pass in persistent CFCs and the framework will blow up unexpectedly. This has to be fixed.
Vote by External U.
24397 | November 10, 2011 07:08:49 PM GMT