New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2D Array in URL throws error #836

michaeldiederich opened this Issue Jan 16, 2018 · 4 comments


3 participants

michaeldiederich commented Jan 16, 2018

If you want to submit/request a page with an 2D Array as URL arguments, cfwheels (latest master branch) throws an error:

Lucee Error (expression)

Message | Can't cast Object type [Array] to a value of type [Struct]
Detail | Java type of the object is lucee.runtime.type.ArrayImpl
Stacktrace | The Error Occurred in/home/[....]/wheels/dispatch/functions.cfm:
line 62
60: local.item = local.nested[local.i];
62: if (!StructKeyExists(local.struct, local.item)) {
63: local.struct[local.item] = {};
64: }

See attached screenshot for the parameters, example url:


965c8390623818ebb9aefbe12c5891e21ae875ee43d800ced7 pimgpsh_fullsize_distr


This comment has been minimized.


neokoenig commented Jan 16, 2018

This never worked in 1.4.x though did it? (As in, this isn't something which used to work and is now broken?)

$createNestedParamStruct() also handles form submissions such as organisation[organisationcategories][6,5][_delete] with hasManyCheckbox(), so I wonder if that's the issue - i.e, it's always expecting a struct


This comment has been minimized.

michaeldiederich commented Jan 16, 2018

I never used 1.4.x.

@perdjurner perdjurner self-assigned this Jan 17, 2018

@perdjurner perdjurner added the bug label Jan 17, 2018

@perdjurner perdjurner added this to the 2.0.1 milestone Jan 17, 2018


This comment has been minimized.

michaeldiederich commented Jan 22, 2018

Just to make sure: Why don't you parse the argument item and e.g. cast each of the array elements to the returning struct?


This comment has been minimized.


perdjurner commented Jan 22, 2018

I don't know enough about how nested properties work, or are supposed to work, so all I did was work around the error itself (then at least the parameters will be available in the form / url scopes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment