Copy link to clipboard
Copied
After installing the update, form variables being sent as a list, cannot be read as a simple values, they are now being sent as arrays.
error message is
Complex object types cannot be converted to simple values
1 Correct answer
This is a known issue. The recent March cf updates changed this. And whether it is right or wrong (that they did that), there is at least a work-around. And no, you do NOT need to hunt down every program, just every CF application (at least until perhaps Adobe may offer a JVM arg to revert things instance-wide):
- if using application.cfc put in this.sameformfieldsasarray="false"
- if using application.cfm put the same attribute (as sameformfieldsasarray="false") into your cfapplication tag
(Up
...Copy link to clipboard
Copied
It's not clear. Are you saying that you did add that sameformfieldsasarray="false" into your cfapplication tag in application.cfm, as I showed above. If you did, you should not get the error any more. Please clarify.
/Charlie (troubleshooter, carehart.org)
Copy link to clipboard
Copied
@sgean01 : ... the only CFAPPLICATION tag that exists is there.
this is a very old (and large) website that has moved up from CF10 to CF11 to CF2018. All I can say about it is that when hotfix11 is installed, I receive that error at various places in my code...
As others have said, one solution is to place the attribute in the tag:
<cfapplication sameFormFieldAsArray="false" etc. >
Copy link to clipboard
Copied
Ah, Shawn. There is now an explanation for why it didn't work for you. The attribute is sameformfieldsasarray (with an s after field). I was mistaken in my first reply to this thread a couple weeks ago, and we only came to realize the mistake thanks to a comment here from Benjamin.
I've corrected my first reply and added a reply thanking him, with apologies to all.
/Charlie (troubleshooter, carehart.org)
Copy link to clipboard
Copied
As an update on all this, and an FYI to those who maybe didn't notice: update 12 (of CF2018) and update 2 (of cf2021) did revert the behavior back to defaulting sameformfieldsasarray to false.
/Charlie (troubleshooter, carehart.org)
-
- 1
- 2