Home›Support›English Support›[Resolved] Bug appearing in really specific combination - WPML, WPForms Multilang and Select form element in Re...
[Resolved] Bug appearing in really specific combination - WPML, WPForms Multilang and Select form element in Re...
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing a 500 Internal Server Error when using WPForms, WPML, and WPForms multilang with a Repeater containing Select form elements, the issue might be related to how array keys are handled in the Notifications.php file of the WPML-WPForms integration. Solution: We recommend modifying the code in the Notifications.php file. First, locate line 92 and replace the existing code block:
Please ensure to test this change on a staging site before applying it to your live environment.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we highly recommend opening a new support ticket. Also, check the related known issues and confirm that you have installed the latest versions of themes and plugins.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Background of the issue:
Good morning everyone,
in our project we use WPForms, WPML and WPForms multilang. In a form we have a Repeater, which allows users to add another group of inputs dynamically. In this Repeater there are a Select form elements.
In this specific combination of elements/functionalities/plug-ins we're getting 500 Internal server error.
When we remove Select from Repeater, or when we deactivate WPForms multilang plug-in, the form submit works fine.
Please see code below what was returned by server.
Thank you for taking a look at this and letting us know. Have a great day!
Warning: Undefined array key "3_2" in /home/html/maverick-transport.cz/public_html/wp-content/plugins/wpml-wpforms/classes/Hooks/WpForms/Notifications.php on line 92
Warning: Trying to access array offset on null in /home/html/maverick-transport.cz/public_html/wp-content/plugins/wpml-wpforms/classes/Hooks/WpForms/Notifications.php on line 92
Warning: Undefined array key "3_2" in /home/html/maverick-transport.cz/public_html/wp-content/plugins/wpml-wpforms/classes/Hooks/WpForms/Notifications.php on line 95
Here is the ticket. I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.
Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.
Your upcoming reply will be treated with confidentiality and will only be visible to you and me.
✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.
the bug happens when you try to submit the form using WPForms Repeater.
So just fill all the inputs, add new block of inputs by pressing "přidat vůz" on left side and then try to submit.
Getting this issue on both Goggle Chrome and Mozilla Firefox.
Thanks for your patience. I'm able to replicate this issue on our sandbox site here and I will escalate this further to our 2nd Tier Support for further investigation. I will come back to you once I've feedback.
Hey in case it helps:
I've managed to solve the issue the following way:
```
public function restoreFieldLabelsToDefaultLanguage( $fields, $entry, $formData ) {
Hey Serkan and Kor, should I try to add this to functions.php?
Is this like an official fix or should I keep waiting any further update? Thank you and have a great evening.
Good morning everyone, do we have any update on this? We need to do some updates on the page as it's already live and this "doing-nothing" is taking a bit longer then we expected. Can we work on the website with no fear of loosing data as you've already replicated the issue on your sandbox? Thank you for letting me know and have a great weekend 😉
Thanks for your reply. Sorry for the delays. The report is still in a queue for a review. Yes, you can work on your Website since I can replicate this on our sandbox site.