After upgrading from CF11 to CF2018, Update 3, none of my editable cfgrids are working. When I make an edit and then submit the form, the columns seem to get jumbled. I created the simplest cfgrid I could (below) but am still getting the same behavior.
<cfif isDefined("form.submitname")>
<cfdump var="#form#">
<cfelse>
<cfform action="test.cfm" method="post" name="testform" id="testformId">
<cfinput type="Submit" name="submitname" id="submitid">
<cfgrid name="TestGrid" format="html" selectmode="edit">
<cfgridcolumn name="A">
<cfgridcolumn name="B">
<cfgridrow data="john,doe">
<cfgridrow data="steve,anon">
</cfgrid>
</cfform>
</cfif>
The grid displays correctly, but what I change 'john' to 'peter' and submit, I get the following dump: enter image description here
As you can see, it thinks 'peter' was entered as both the first and last name, and it also thinks that 'peter' was the original first name.
When I modify any of the fields in the second column, I get the following javascript error in the console:
TypeError: _dd.values[_de] is undefined.
The error is thrown by cfgrid.js
If I submit only a change in the second column, the dump is completely empty.
It seems like the cfgrid is mixing up columns or something.
Your thoughts?
Ultimately the solution here is to move away from ColdFusion's implementation of
<cfgrid>and roll your own grid-UI or.... wait for a patch from Adobe.This is definitely a bug in ColdFusion, the error you are seeing is specifically a bug in the function
ColdFusion.Grid.Actions.afterEdit()I spent a little bit of time fiddling around with the JS generated with
<cfgrid>and found that they index into the columns incorrectlyYou can override ColdFusion's implementation of
ColdFusion.Grid.Actions.afterEdit()with your own to create a possible workaround ( I ran on Solaris 11.4 - Apache - ColdFusion 2018 : Update 3 )There are definitely a ton of other bugs plaguing this tag ... and its definitely worth noting that Lucee ( opensource ColdFusion engine) DOES NOT support this tag