Custom Multiselect field yielding 502 error #12701
Replies: 4 comments 3 replies
-
Craft is probably not the thing that’s issuing that 502 error. That would generally be coming from your web server itself. You may have some sort of firewall or security extension (mod_security, Suhosin, etc.) installed that is filtering requests that look suspicious (like a SQL attack), and something about the post data is triggering it. |
Beta Was this translation helpful? Give feedback.
-
I run the project in my local Docker environment without any hard limitations. Furthermore, if I extend the Dropdown field using the exact same code, it works like a charm so that's a bit weird. |
Beta Was this translation helpful? Give feedback.
-
Emptied the dir. When I use Dropdown there's just the regular logs, but as soon as I use MultiSelect I get a load of the following errors:
|
Beta Was this translation helpful? Give feedback.
-
I have it like this, but it still returns that error:
|
Beta Was this translation helpful? Give feedback.
-
When I try to fill my Custom Multiselectfield with options using the following code, it results in a
502 Bad Gateway
error:When I change from Multiselect to Dropdown the code works as expected. Checked the class reference and both fields seem to return the options in the same way. If I use a predefined array the code works as expected:
Somehow the code
$user = User::find()->id($userId)->one();
works in de Dropdown type but not in theMultiselect
part. What am I missing here?Beta Was this translation helpful? Give feedback.
All reactions