tracker issue : CF-4176225

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

Attribute validation error for tag cfloop.

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Samson Gonzalez / Samson Gonzalez (Samson Gonzalez)

Created: 07/27/2016

Components: Database

Versions: 2016

Failure Type: Non Functioning

Found In Build/Fixed In Build: CF2016_Update2 /

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Linux RHEL 6.4

Vote Count: 0

Listed in the version 2016.0.03.300466 Issues Fixed doc
Problem Description: CFLOOP does not work with a stored procedure result that's in the local scope.
I get the error:

The value of the attribute query, which is currently local.getStyleLocalization, is invalid.

Steps to Reproduce: Using a stored procedure that returns 3 resultsets.  All of them are named under a local scope variable.


<cfstoredproc procedure="get_model_info" returncode="no" datasource="#arguments.dsn#" cachedwithin="#CreateTimeSpan(0,0,0,30)#">
	<cfprocparam value="#arguments.model#" cfsqltype="CF_SQL_NUMERIC">
	<cfprocresult name="local.getModelInfo" resultset="1">
	<cfprocresult name="local.getStyleSizes" resultset="2">
	<cfprocresult name="local.getStyleLocalization" resultset="3">

Local scope query works for cfoutput tags.

<cfoutput query="local.getModelInfo">

but fails on cfloop tag

<cfloop query="local.getStyleLocalization">

This works under cf9 and cf11, but not cf2016.

Actual Result:
Attribute validation error for tag cfloop.

The value of the attribute query, which is currently local.getStyleLocalization, is invalid.

Expected Result:
Loop over resultset.

Any Workarounds:

None yet.

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

Watson Bug ID:	4176225

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

OS: 3.10.0-327.22.2.el7.x86_64  

CF: Version	2016,0,02,299200


DB: Sybase 15

JDBC: com.sybase.jdbc3.jdbc.SybDriver



seems similar to:
Comment by External U.
2102 | July 27, 2016 04:24:36 PM GMT
Samson, Bug #CF-4126393 was fixed in ColdFusion 2016 Update 1. Are you able to repro this issue on the latest update?
Comment by Nimit S.
2103 | July 28, 2016 09:38:09 AM GMT
I got this issue on Update 2. Here are the layers noted with depth We are doing a recursive loop within a function. The outermost recursion is using cfoutput, with two inner recursions using cfloop at the same level (one after the other) All three are in using queries from the local scope from within the same function call. <cffunction ....> proc with 3 result sets <cfoutput query="local.resultset1"> <cfloop query="local.resultset3"> </cfloop> <cfloop query="local.resultset2"> </cfloop> </cfoutput> </cffunction>
Comment by External U.
2104 | July 28, 2016 11:28:41 AM GMT
This issue is fixed now. The fix for this issue will be available as part of the upcoming update of ColdFusion 2016.
Comment by Nimit S.
2105 | August 08, 2016 01:21:58 AM GMT