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
Fatal error: Uncaught InvalidArgumentException: target should be an object with map method or an array in /home/html/maverick-transport.cz/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php:143 Stack trace: #0 [internal function]: WPMLFPFns::{closure:WPMLFPFns::init():141}(Object(Closure), NULL) #1 /home/html/maverick-transport.cz/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array(Object(Closure), Array) #2 [internal function]: WPMLFPFns::{closure:{closure:WPMLFPcurryN():136}:137}(Object(Closure), NULL) #3 /home/html/maverick-transport.cz/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array(Object(Closure), Array) #4 /home/html/maverick-transport.cz/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Lst.php(104): WPMLFPFns::__callStatic('map', Array) #5 [internal function]: WPMLFPLst::{closure:WPMLFPLst::init():103}('label', NULL) #6 /home/html/maverick-transport.cz/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array(Object(Closure), Array) #7 [internal function]: {closure:{closure:WPMLFPcurryN():136}:137}(NULL) #8 /home/html/maverick-transport.cz/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(50): call_user_func_array(Object(Closure), Array) #9 /home/html/maverick-transport.cz/public_html/wp-content/plugins/wpml-wpforms/classes/Hooks/WpForms/Notifications.php(278): {closure:WPMLFPcompose():47}(NULL) #10 /home/html/maverick-transport.cz/public_html/wp-content/plugins/wpml-wpforms/classes/Hooks/WpForms/Notifications.php(225): WPMLFormsHooksWpFormsNotifications->getChoiceMap(NULL, Array) #11 /home/html/maverick-transport.cz/public_html/wp-content/plugins/wpml-wpforms/classes/Hooks/WpForms/Notifications.php(95): WPMLFormsHooksWpFormsNotifications->getFieldValue(Array, 'TxC5x99etxC3xAD moxC5xBEnos...', NULL, Array) #12 /home/html/maverick-transport.cz/public_html/wp-includes/class-wp-hook.php(324): WPMLFormsHooksWpFormsNotifications->restoreFieldLabelsToDefaultLanguage(Array, Array, Array) #13 /home/html/maverick-transport.cz/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #14 /home/html/maverick-transport.cz/public_html/wp-content/plugins/wpforms/includes/class-process.php(1650): apply_filters('wpforms_entry_e...', Array, Array, Array) #15 /home/html/maverick-transport.cz/public_html/wp-content/plugins/wpforms/includes/class-process.php(638): WPForms_Process->entry_email(Array, Array, Array, 37, 'entry') #16 /home/html/maverick-transport.cz/public_html/wp-content/plugins/wpforms/includes/class-process.php(156): WPForms_Process->process(Array) #17 /home/html/maverick-transport.cz/public_html/wp-includes/class-wp-hook.php(324): WPForms_Process->listen(Object(WP)) #18 /home/html/maverick-transport.cz/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #19 /home/html/maverick-transport.cz/public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array) #20 /home/html/maverick-transport.cz/public_html/wp-includes/class-wp.php(830): do_action_ref_array('wp', Array) #21 /home/html/maverick-transport.cz/public_html/wp-includes/functions.php(1336): WP->main('') #22 /home/html/maverick-transport.cz/public_html/wp-blog-header.php(16): wp() #23 /home/html/maverick-transport.cz/public_html/index.php(17): require('/home/html/mave...') #24 {main} thrown in /home/html/maverick-transport.cz/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php on line 143
Symptoms:
Questions:
How to fix this issue? 🙂 Thank you 😉