Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Aaron Davis / Aaron Davis (aarondavis)
Created: 03/15/2013
Components: Core Runtime, Application
Versions: 10.0
Failure Type: Incorrect w/Workaround
Found In Build/Fixed In Build: Final / 288761
Priority/Frequency: Major / All users will encounter
Locale/System: English / Win All
Vote Count: 1
Problem Description:
A thread is created and then a custom tag is run inside that thread. The Custom Tag has params at the top that set
<cfparam name="Attributes.table" type="string">
<cfparam name="Attributes.datasource" type="string">
<cfquery name="rs" datasource="#Attributes.datasource#" result="rsResult">
select * from #Attributes.table#
</cfquery>
When trying to use #Attributes.table# as the tablename for a CFSQL tag inside that Custom Tag, Coldfusion reports that the element TABLE is not in ATTRIBUTES.
Steps to Reproduce:
Actual Result:
Expected Result:
Any Workarounds:
When a CFSAVECONTENT tag is created above the CFQUERY tag, with a CFDUMP of the Attributes collection inside that CFSAVECONTENT tag, magically the TABLE variable inside the ATTRIBUTES collection is found. And then the CFQUERY statement will run correctly and find TABLE in the Attributes collection.
<cfsavecontent variable="fake"><cfdump var="#ATTRIBUTES#"></cfsavecontent>
<cfquery name="rs" datasource="#Attributes.datasource#" result="rsResult">
select * from #Attributes.table#
</cfquery>
If we remove the CFSAVECONTENT tag which has the CFDUMP inside, then the CFQUERY tag will again no longer run, and produce the error above as stated.
Very strange behavior. And we have Coldfusion 8, Coldfusion 9 servers also, that do not behave this way, only when we run the code on Coldfusion 10 do we get the Attributes error trying to assign table in that scope.
We assume that when trying to CFDUMP the Attributes collection, internally ColdFusion 10 will copy the Attributes collection over the CFTHREAD's Attributes collection but NOT BEFORE.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3521203
External Customer Info:
External Company:
External Customer Name: aarondavis
External Customer Email:
External Test Config: My Hardware and Environment details:
Running Coldfusion 10 Enterprise with Apache.
We have a background job that runs inside a thread inside a new Application.
Attachments:
- August 10, 2013 00:00:00: 1_example.zip
Comments: