Our Facilities office has a long form for event setup requests. Recently, users trying to use the form have run into “Whoops, server issues.” messages and cannot submit.
In the debug logs, I see the following in AJAX since July 10:
25-Jul-2025 9:36:19am CDT LiveWhale Notice: /livewhale/nocache.php?livewhale=ajax&function=handleFormsSubmission&id=13&smart_cache_disabled=1 AJAX error: The server returned the status error 500. (IP / Details / Page / mischlern)
After a process of elimination, I determined that the issue are the Checkboxes form fields. If a user has any value in a Checkboxes field, the server error appears. If the Checkboxes fields are left alone, or if there are none, there are no issues.
A quick follow-up: had the thought to try this testing form while not logged in. It appears the behavior when not logged-in is an endless spinning gear.
I don’t see any errors in the AJAX debug for anonymous submissions, but I finally noticed the following in our Errors debug. (Was too focused on the specific form to see “Form” errors.)
25-Jul-2025 10:18:55am CDT America/Chicago PHP Fatal error: Uncaught TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given in /var/www/www.beloit.edu/livewhale/core/modules/forms/public.widget.forms.php:288
That appears to be the real issue: a data type mismatch?
Thanks Nick – this looks like it must be an edge-case PHP 8.1 bug we didn’t catch earlier, sorry about that! Thanks for the test case, we’ll get this queued up for a core diagnosis and fix pronto.
In the short-term, I wonder if temporarily making that checkbox field optional rather than required might work as a workaround?
@karl: In the actual form, all of the Checkbox fields are optional, but they ask questions that most users are going to add a value for.
What kinds of tables to you need? (round, square, rectangle)
What podium setup do you need? (simple, branded)
What additional power needs do you have? (some, extreme)
My alternative was to try and avoid Checkboxes in the form, but I don’t think any other option will be quite as effective.
@jwilcox: Testing on dev (2.20.2), it does appear that this issue doesn’t occur. (Why do I always forget something, like this, when trying to troubleshoot.)
Guess I need to consider doing the upgrade to 2.20.2?
@mischlern The 2.20.2 upgrade would fix this, yes. Otherwise you can reach out to Request Help (so we have permission to SFTP in) and we can probably patch in a quick fix for you gratis. We aren’t able to back-patch every bug fix to prior versions, but I suspect this one is just a one-liner that would be easy enough to patch.