Status/Resolution/Reason: Needs Review/Fixed/DesignLimitation
Reporter/Name(from Bugbase): Evert Nagel / Evert Nagel ()
Created: 03/27/2017
Components: Language, Functions
Versions: 2016,11.0,10.0
Failure Type: Others
Found In Build/Fixed In Build: 2016.0.03.301771 / 2018,0,0,308513
Priority/Frequency: Normal /
Locale/System: / Windows 10 64 bit
Vote Count: 0
Problem Description:
The information about extended components obtained through getComponentMetadata() is refreshed only when the extending object is altered or instantiated, not when the extended component is altered.
This requires frameworks which examine metadata before instantiating, such as Coldbox, to reload twice to apply changes in extended components.
Steps to Reproduce:
Create component foo.cfc:
{code:java}
component {
property name="prop1" default="prop1";
//property name="prop2" default="prop2";
}
Create component bar.cfc:
component extends="foo" {
}
{code}
Create template test.cfm:
{code:java}
<cfdump var="#getComponentMetadata('bar').extends.properties#">
<cfset test = createObject("component", "bar")>
<cfdump var="#getComponentMetadata('bar').extends.properties#">
{code}
Call test.cfm
Uncomment second property in foo.cfc
Call test.cfm again
Actual Result:
Displays an array containing one property and an array containing two properties.
Expected Result:
Displays both arrays containing two properties.
Any Workarounds:
Attachments:
Comments: