Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is trying to install WPML for site translation but encounters an error that prevents the menu from functioning. The client has tried deactivating plugins and switching to the basic WordPress menu, but the issue persists.

Solution:
First, we asked the client to enable the debug log to identify the specific error by adding the following lines to the wp-config.php file:

define('WP_DEBUG', true);

define('WP_DEBUG_LOG', true);

We provided a link to our documentation on debugging WPML: https://wpml.org/documentation/support/debugging-wpml/

Next, considering that the client had just installed WPML and had not started translating yet, we suggested performing a complete reset of WPML:
1. Navigate to WPML → Support and click the Troubleshooting link.
2. In the Reset section, select the checkbox 'I am about to reset all translation and language data' and click the 'Reset and deactivate WPML' button.
We also provided a link to our documentation on resetting WPML: https://wpml.org/documentation/getting-started-guide/language-setup/deleting-languages-and-plugin-data-by-doing-a-wpml-reset-on-your-site/#step-3-do-the-wpml-reset
We emphasized the importance of creating a backup before performing the reset, as it cannot be undone and all translations sent to remote services will be lost.

If the solution provided here is not relevant to your case, either because it's outdated or not applicable, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket: Contact WPML Support.

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.

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Andrey 1 year, 4 months ago.

Assisted by: Andrey.

Author Posts
April 29, 2024 at 11:15 am #15576702

giorgosK-3

Tell us what you are trying to do?

I am trying to install wpml so i can transalte the site.
I tried to deactivate and i found the "problem".
I used elements kit lite in the header and there was an error.
I said okay, let's go with the basic wordpress menu and used it but the same error occured.
It doesn't let me to have a menu.

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

hidden link But i have deactivated the wpml plugins so the site can work

April 29, 2024 at 12:23 pm #15577068

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for contacting WPML support.

Could you please upload screenshots showing the problem?

Please enable the debug.log. You can do this by adding a few lines to the site’s wp-config.php file. With error log enabled, you will see what the actual problem is.

To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

define('WP_DEBUG', true);

In order to enable the error logging to a file on the server you need to add yet one more similar line:

define( 'WP_DEBUG_LOG', true );

In this case, the errors will be saved to a debug.log log file inside the /wp-content/directory.

https://wpml.org/documentation/support/debugging-wpml/

Let me know what you see in the the debug.log after the debug mode has been enabled.

April 29, 2024 at 12:48 pm #15577239

giorgosK-3

First of all, thank you very much for your immediate response

The errors on the back of the site

-------------------

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 3456
lang="">
Skip to main contentSkip to toolbar

Warning: Trying to access array offset on value of type null in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 179

Warning: Trying to access array offset on value of type null in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 183

Warning: Trying to access array offset on value of type null in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 196

Warning: Trying to access array offset on value of type null in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 198

Warning: Trying to access array offset on value of type null in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 199

Warning: Trying to access array offset on value of type null in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 200

Warning: Trying to access array offset on value of type null in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 251

Warning: Trying to access array offset on value of type null in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 252

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/flegrarooms/public_html/wp-includes/kses.php on line 1745

Warning: Trying to access array offset on value of type null in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 252

-------------------

The errors on the front of the site

-------------------

Deprecated: Creation of dynamic property Whip_RequirementsChecker::$configuration is deprecated in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/yoast/whip/src/Whip_RequirementsChecker.php on line 37

Deprecated: Creation of dynamic property Whip_RequirementsChecker::$messageManager is deprecated in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/yoast/whip/src/Whip_RequirementsChecker.php on line 38
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 3456
lang="" prefix="og: hidden link">
About WordPress
Flegra Rooms
Customize
33 updates available
00 Comments in moderation
New
Edit Page
Rank Math SEO
Maintenance is Off
Performance
Elementor Debugger
Search
Howdy, flegra_adm_rooms
Skip to content

Fatal error: Uncaught InvalidArgumentException: Argument $language_code must be a non empty string. in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:80 Stack trace: #0 /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Maybe.php(106): WPML_Translation_Element->get_translation(false) #1 /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php(397): WPML\FP\Just->map(Array) #2 /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php(407): WPML_LS_Settings->{closure}(false) #3 /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-render.php(144): WPML_LS_Settings->get_menu_settings_from_id(6) #4 /home/flegrarooms/public_html/wp-includes/class-wp-hook.php(326): WPML_LS_Render->wp_get_nav_menu_items_filter(Array, Object(WP_Term)) #5 /home/flegrarooms/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #6 /home/flegrarooms/public_html/wp-includes/nav-menu.php(762): apply_filters('wp_get_nav_menu...', Array, Object(WP_Term), Array) #7 /home/flegrarooms/public_html/wp-includes/nav-menu-template.php(151): wp_get_nav_menu_items(Object(WP_Term), Array) #8 /home/flegrarooms/public_html/wp-content/plugins/pro-elements/modules/nav-menu/widgets/nav-menu.php(1455): wp_nav_menu(Object(stdClass)) #9 /home/flegrarooms/public_html/wp-content/plugins/elementor/includes/base/controls-stack.php(2321): ElementorPro\Modules\NavMenu\Widgets\Nav_Menu->render() #10 /home/flegrarooms/public_html/wp-content/plugins/elementor/includes/base/widget-base.php(634): Elementor\Controls_Stack->render_by_mode() #11 /home/flegrarooms/public_html/wp-content/plugins/elementor/includes/base/widget-base.php(775): Elementor\Widget_Base->render_content() #12 /home/flegrarooms/public_html/wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Widget_Base->print_content() #13 /home/flegrarooms/public_html/wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element() #14 /home/flegrarooms/public_html/wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content() #15 /home/flegrarooms/public_html/wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element() #16 /home/flegrarooms/public_html/wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content() #17 /home/flegrarooms/public_html/wp-content/plugins/elementor/core/base/document.php(1795): Elementor\Element_Base->print_element() #18 /home/flegrarooms/public_html/wp-content/plugins/pro-elements/modules/theme-builder/documents/theme-document.php(414): Elementor\Core\Base\Document->print_elements(Array) #19 /home/flegrarooms/public_html/wp-content/plugins/elementor/includes/frontend.php(1165): ElementorPro\Modules\ThemeBuilder\Documents\Theme_Document->print_elements_with_wrapper(Array) #20 /home/flegrarooms/public_html/wp-content/plugins/elementor/core/base/document.php(1231): Elementor\Frontend->get_builder_content(46, false) #21 /home/flegrarooms/public_html/wp-content/plugins/elementor/modules/library/documents/library-document.php(76): Elementor\Core\Base\Document->get_content(false) #22 /home/flegrarooms/public_html/wp-content/plugins/pro-elements/modules/theme-builder/documents/theme-document.php(158): Elementor\Modules\Library\Documents\Library_Document->get_content(false) #23 /home/flegrarooms/public_html/wp-content/plugins/pro-elements/modules/theme-builder/documents/theme-document.php(173): ElementorPro\Modules\ThemeBuilder\Documents\Theme_Document->get_content() #24 /home/flegrarooms/public_html/wp-content/plugins/pro-elements/modules/theme-builder/classes/locations-manager.php(364): ElementorPro\Modules\ThemeBuilder\Documents\Theme_Document->print_content() #25 /home/flegrarooms/public_html/wp-content/plugins/pro-elements/modules/theme-builder/api.php(13): ElementorPro\Modules\ThemeBuilder\Classes\Locations_Manager->do_location('header') #26 /home/flegrarooms/public_html/wp-content/themes/hello-elementor/header.php(35): elementor_theme_do_location('header') #27 /home/flegrarooms/public_html/wp-includes/template.php(810): require_once('/home/flegraroo...') #28 /home/flegrarooms/public_html/wp-includes/template.php(745): load_template('/home/flegraroo...', true, Array) #29 /home/flegrarooms/public_html/wp-includes/general-template.php(48): locate_template(Array, true, true, Array) #30 /home/flegrarooms/public_html/wp-content/plugins/elementor/modules/page-templates/templates/header-footer.php(9): get_header() #31 /home/flegrarooms/public_html/wp-includes/template-loader.php(106): include('/home/flegraroo...') #32 /home/flegrarooms/public_html/wp-blog-header.php(19): require_once('/home/flegraroo...') #33 /home/flegrarooms/public_html/index.php(17): require('/home/flegraroo...') #34 {main} thrown in /home/flegrarooms/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 80

April 30, 2024 at 3:36 pm #15582053

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for sharing your feedback.

I think that you are using an outdated version of WPML plugins. To benefit from the latest bug fixes and improvements, it is recommended that you update your WPML plugin to the latest version, 4.6.10, and add-ons. This update may not necessarily solve your problem, but it will help us troubleshoot it better with the latest code available.

You can check the latest released versions under the "My Account -> Downloads" section on this website. To update, you can follow the instructions provided in this URL: http://wpml.org/faq/install-wpml/. If you do not see the updates, click the Check for updates button in the Plugins → Add New Plugin → Commercial tab.

Before updating, please make sure to backup your database first. You can use a plugin for this purpose if you like (e.g. http://wordpress.org/plugins/duplicator/).

Please let me know if the issue persists after the update has been done.

May 3, 2024 at 8:11 am #15589961

giorgosK-3

All the system is updated. This is not the problem

May 3, 2024 at 9:59 am #15590679

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback.

You mentioned initially that you have just installed WPML, and probably no translations have been done yet.

Could you try to reset WPML completely and configure it again?

1. Go to WPML → Support and click the Troubleshooting link.

2. In the Reset section of the Troubleshooting page, select the I am about to reset all translation and language data checkbox. Then, click the Reset and deactivate WPML button.

https://wpml.org/documentation/getting-started-guide/language-setup/deleting-languages-and-plugin-data-by-doing-a-wpml-reset-on-your-site/#step-3-do-the-wpml-reset


The WPML reset cannot be undone. All translations you have sent to remote translation services will be lost.

We recommend that you create a backup of your site before resetting WPML.

May 7, 2024 at 10:22 am #15601121

giorgosK-3

Thank you for your help.
The last solution seemed that solved the issue.

Thank you for all!