Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Jim Briggs / Jim Briggs (SirJames)
Created: 03/17/2014
Components: General Server
Versions: 10.0
Failure Type: Incorrect w/Workaround
Found In Build/Fixed In Build: Final / 290459
Priority/Frequency: Major / All users will encounter
Locale/System: English / Win 2008 Server R2 64 bit
Vote Count: 0
Problem Description: java.lang.Double cannot be cast to java.lang.String occurs in cftextarea and cfselect when setting a value using cfset and adding +1 to it. This has also been tested in CF9 and it also breaks there. It worked in CF7.
Steps to Reproduce: The following simple form will have the last element crash.
<Cfset CurrentID = 10>
<cfform name="test" >
<cftry>
<cfoutput>
<table>
<tr valign="top">
<Td align="center" nowrap>
<!--- JBB - 03/17/2014 - 08:29 - this works because the cfset below causes the type change --->
incoming: #CurrentID#
<cftextarea onfocus="lastFocus=this" id="#currentID#" cols="110" rows="3" name="Purpose" required="Yes" message="You must enter a purpose.">ddd</cftextarea>
<cfset CurrentID = CurrentID + 1>
outgoing: #currentID#
</TD>
</tr>
<tr valign="top">
<Td align="center" nowrap>
<!--- JBB - 03/17/2014 - 08:30 - this works because it's a normal text area --->
incoming: #CurrentID#
<textarea onfocus="lastFocus=this" id="#currentID#" cols="110" rows="3" name="Purpose" required="Yes" message="You must enter a purpose.">ddd</textarea>
<cfset CurrentID = CurrentID + 1>#CurrentID#
outgoing: #currentID#
</TD>
</tr>
<tr valign="top">
<Td align="center" nowrap>
<!--- JBB - 03/17/2014 - 08:30 - this works because of the space in the id field --->
incoming: #CurrentID#
<cftextarea onfocus="lastFocus=this" id="#currentID# " cols="110" rows="3" name="Purpose" >ddd</cftextarea>
<cfset CurrentID = CurrentID + 1>#CurrentID#
outgoing: #currentID#
</TD>
</tr>
<tr valign="top">
<Td align="center" nowrap>
<!--- JBB - 03/17/2014 - 08:30 - this breaks because the space in the id field has been removed --->
incoming: #CurrentID#
<cftextarea onfocus="lastFocus=this" id="#currentID#" cols="110" rows="3" name="Purpose" >ddd</cftextarea>
<cfset CurrentID = CurrentID + 1>
outgoing: #currentID#
</TD>
</tr>
</table>
</cfoutput>
<cfcatch><cfdump var="#CFCatch#"></cfcatch>
</cftry>
</cfform>
Actual Result: If the cftry above is taken out a 500 error occurs.
Expected Result: The id field value should be incrementing normally.
Any Workarounds: Instead of using "#currentid#" in the id field use "#currentid# " (add a space so it evaluates as a string.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3724983
External Customer Info:
External Company:
External Customer Name: SirJames
External Customer Email:
External Test Config: My Hardware and Environment details: Windows Server 2008r2. Is a brand new install with up to update 13 applied.
Attachments:
Comments: