tracker issue : CF-3977916

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

CF11 Update 5 breaks CFC inheritance

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/CannotReproduce

Reporter/Name(from Bugbase): Dave Jones / Dave Jones (Dave Jones)

Created: 04/28/2015

Components: Language, CF Component

Versions: 11.0

Failure Type: Crash

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 0

Problem Description:
After installing CF 11 Update 5, function inheritance does not work properly when there are three levels of inheritance. 

When calling a function on a child component that is inherited from the child's parent component, required arguments are not passed and an exception is thrown.

The best way to describe this it to follow Steps to reproduce.

Steps to Reproduce:

Create three components having a Grandparent - Parent - Child relationship like this:

<!--- Grandparent.cfc --->
<cfcomponent>
	<cfset variables.name = "">
	<cffunction name="init">
		<cfreturn this/>
	</cffunction>
	<cffunction name="getName">
		<cfreturn variables.name>
	</cffunction>
</cfcomponent>

<!--- Parent.cfc --->
<cfcomponent extends="Grandparent">
	<cffunction name="init">
		<cfargument name="name" required="true" type="string">
		<cfset variables.name = arguments.name>
		<cfreturn super.init()/>
	</cffunction>
</cfcomponent>

<!--- Child.cfc --->
<cfcomponent extends="Parent">
	<!--- No init method here. Inherits from Parent.cfc --->
</cfcomponent>



Then, call the init function on Child passing in a name:
<!---
	Calling init on Child should pass "name" to Parent.cfc
	In CF11 Update 5 this throws an exception.
	In CF11 Update 4 (and CF9) this executes without error.
--->
<cfset child = createObject("component", "Child").init(name = "Fred Flinstone")>
<cfoutput>#child.getName()#</cfoutput>

Actual Result:

ColdFusion exception is thrown:

---------------------------------------------------------------------------------------------------------------------------------------
The NAME parameter to the init function is required but was not passed in.

The error occurred in C:/inetpub/wwwroot/dev/superbug/Parent.cfc: line 6
4 : 		<cfargument name="name" required="true" type="string">
5 : 		<cfset variables.name = arguments.name>
6 : 		<cfreturn super.init()/>
7 : 	</cffunction>
8 : </cfcomponent>
---------------------------------------------------------------------------------------------------------------------------------------

Expected Result:

Calling init on Child succeeds and returns an instance of Child.

Any Workarounds:
This has only been observed with three levels of inheritance. Avoid three levels of inheritance to avoid the bug.

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

Watson Bug ID:	3977916

External Customer Info:
External Company:  
External Customer Name: Dave
External Customer Email:  
External Test Config: My Hardware and Environment details:



CF11 Update 5 

Windows Server 2012 and Windows 8.1

IIS

Attachments:

Comments:

I just ran this on 11,0,05,293506, Windows 7 64-bit Express install running on Java 1.8.0_25. It ran as expected: Fred Flinstone
Comment by External U.
7705 | April 28, 2015 03:29:04 PM GMT
We have checked this on CF 11 Update 5 . It gives the expected result. Are you still facing the issue? If yes, can you please send us the stack trace which would help us to dig deeper into the issue. Thanks!
Comment by Suchika S.
7706 | June 05, 2015 01:57:04 AM GMT
I just redownloaded and reinstalled CF11 Updater 5 and I agree, the problem is fixed. My install was "stuck" on the pre-release version of updater 5. Problem solved, thanks!
Comment by External U.
7707 | June 05, 2015 10:16:07 AM GMT
Thanks Dave! Closing the bug :)
Comment by Suchika S.
7708 | June 08, 2015 12:54:21 AM GMT