This thread is resolved. Here is a description of the problem and solution.
Problem:
The client was seeing a Fatal error after installing the WPML plugins.
Solution:
This issue usually happens when there is something wrong in the database during installation. If it’s a new site with no translated content, you can reset WPML and set it up again.
To do so:
- Please take a backup of your site and go to WPML >> Support >> Troubleshooting (the link is at the bottom of the support page). >> There, click on “Reset and deactivate WPML” >> then Delete the plugin.
- After deleting all WPML data and WPML-related plugins then please install WPML plugins again and I hope now you will not face any issues.
Instead, I got: Fatal error: Uncaught InvalidArgumentException: Argument $language_code must be a non empty string. in /home2/systemna/public_html/casa/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:80 Stack trace: #0 /home2/systemna/public_html/casa/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Maybe.php(106): WPML_Translation_Element->get_translation(false) #1 /home2/systemna/public_html/casa/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php(397): WPML\FP\Just->map(Array) #2 /home2/systemna/public_html/casa/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php(407): WPML_LS_Settings->{closure}(false) #3 /home2/systemna/public_html/casa/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-render.php(144): WPML_LS_Settings->get_menu_settings_from_id(2) #4 /home2/systemna/public_html/casa/wp-includes/class-wp-hook.php(310): WPML_LS_Render-> in /home2/systemna/public_html/casa/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 80
Thank you for contacting WPML Support. It seems something went wrong during the WPML installation. If it’s a new site with no translated content, you can reset WPML and set it up again.
To do so:
=== Please backup your database and website ===
- Please go to WPML >> Support >> Troubleshooting (the link is at the bottom of the support page). >> There, click on “Reset and deactivate WPML” >> then Delete the plugin.
- After deleting all WPML data and WPML-related plugins then please install WPML plugins again and I hope now you will not face any issues.