Skip to content Skip to sidebar

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

Problem:
The client's website went down after activating the WPML Multilingual CMS plugin.
Solution:
We recommend following the troubleshooting steps provided in our documentation. First, ensure you have a complete backup of your website. Then, refer to the troubleshooting guide here: WPML Troubleshooting Options.

If this solution does not resolve your issue, please open a new support ticket with us for further assistance.

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 11 replies, has 2 voices.

Last updated by Marcel 2 years, 1 month ago.

Assisted by: Marcel.

Author Posts
November 9, 2023 at 2:48 pm #14768573

saadS-7

Hello guys,

I purchased to WPML today, I installed the plugin and when I activate WPML Multilingual CMS the whole website went down

Could you please help 🙂

screenshot.PNG
November 9, 2023 at 5:49 pm #14770269

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

Before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.

Could you please add me your PHP error log? WordPress includes a debug mode which helps reveal PHP problems.

To enable it, open your wp-config.php file and look for

define('WP_DEBUG', false);

Change it to:

define('WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );

The wp-config.php is located in your WordPress root directory. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it.
If you open wp-config.php and that define statement is not there, you can add it right before this line:

/* That's all, stop editing! Happy blogging. */

Please note that you’ll see everything, not only related to our Plugins.
This will most likely include messages from other plugins, your theme and sometimes even WordPress core. The messages appear all over the place.
Sometimes they appear right on top, but they can also appear in the middle of the page.

DOC:
https://codex.wordpress.org/Debugging_in_WordPress

Please report me the errors you are seeing.

Best Regards
Marcel

November 15, 2023 at 5:10 pm #14819173

saadS-7

Hi Marcel,

Thank you so much for your prompt reply.

Please note that I use EasyWP and I don't know how to access to my wp-config.php

Could you please help. Thank you again in advance.

Best Regards.

Saâd

November 15, 2023 at 5:14 pm #14819243

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi Saâd,

you mean EasyWP, the hosting part from Namecheap? Is this correct? You can get access to the wp-config.php file as described here: hidden link.

For more information as best reach our direct toy our web hoster.

Best Regards
Marcel

November 20, 2023 at 6:39 pm #14880295

saadS-7

Hi Marcel,

Thank you so much for your reply.

I finaly found my wp-config.php through FileZilla (see the photo attached) but I cannot open it so I can do the following :

1 define('WP_DEBUG', false);

Change to:

1 define('WP_DEBUG', true);
2 define( 'WP_DEBUG_LOG', true );
3 define( 'WP_DEBUG_DISPLAY', true );

Could you please help. Thank you again in advance.

Best Regards.

Saâd

WP-Config.php.PNG
November 20, 2023 at 6:43 pm #14880421

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi Saâd,

You can right-click on the file in FileZilla and select "View/Edit". This will download a temporary local copy of the file and open it with your chosen configured editor. The local copy is necessary as FTP files cannot be opened directly on the server. Once you save and close the file, it will ask you if you want to upload and overwrite the existing file.

Best Regards
Marcel

November 22, 2023 at 8:39 am #14893727

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi

I marked your reply as private as you exposed your DB credentials in our public forum.

You can search in the file for "/* That's all, stop editing! Happy publishing. */" and add directly ABOVE.

define('WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true ); 

If you need further assistance activating the debug.log, I might need access to your FTP to activate it for you. But if you add these constants as mentioned, the site will not go down :).

Best Regards
Marcel

November 22, 2023 at 1:04 pm #14897689

saadS-7

Hi Marcel,

Thank you for your help and support.

I followed the septs above. And after reactivating the plugin the website went down again.

Please see attached the screeshots.

Thank you in advance for your patience.

Kind regards.

Saâd

Capture2.PNG
Capture1.PNG
November 22, 2023 at 3:13 pm #14899899

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi Saâd,

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT
-Please make a backup of site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Best Regards
Marcel

November 23, 2023 at 4:36 pm #14910483

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi Saâd,

a login is not working. I need access directly to the WP Backend, not to the web hosting portal, as a 2FA code blocks the portal's access.

It might be best if you reach out to your web hoster to activate the debug log, as I can't check this way to see why your site is going down when you edit it.

Best Regards
Marcel

November 24, 2023 at 11:22 am #14916287

saadS-7

Good morning Marcel,

I hope that you are doing well.

Here's the error log :

[22-Nov-2023 11:14:05 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 179
[22-Nov-2023 11:14:05 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 183
[22-Nov-2023 11:14:05 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 196
[22-Nov-2023 11:14:05 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 198
[22-Nov-2023 11:14:05 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 199
[22-Nov-2023 11:14:05 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 200
[22-Nov-2023 11:14:05 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 251
[22-Nov-2023 11:14:05 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 252
[22-Nov-2023 11:14:05 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 252
[22-Nov-2023 11:15:23 UTC] PHP Fatal error: Uncaught InvalidArgumentException: Argument $language_code must be a non empty string. in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:80
Stack trace:
#0 /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Maybe.php(106): WPML_Translation_Element->get_translation()
#1 /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php(397): WPML\FP\Just->map()
#2 /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php(407): WPML_LS_Settings->{closure}()
#3 /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-render.php(144): WPML_LS_Settings->get_menu_settings_from_id()
#4 /var/www/wptbox/wp-includes/class-wp-hook.php(326): WPML_LS_Render->wp_get_nav_menu_items_filter()
#5 /var/www/wptbox/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#6 /var/www/wptbox/wp-includes/nav-menu.php(762): apply_filters()
#7 /var/www/wptbox/wp-includes/nav-menu-template.php(151): wp_get_nav_menu_items()
#8 /var/www/wptbox/wp-content/themes/Divi/header.php(283): wp_nav_menu()
#9 /var/www/wptbox/wp-includes/template.php(790): require_once('...')
#10 /var/www/wptbox/wp-includes/template.php(725): load_template()
#11 /var/www/wptbox/wp-includes/general-template.php(48): locate_template()
#12 /var/www/wptbox/wp-content/themes/Divi/page.php(3): get_header()
#13 /var/www/wptbox/wp-includes/template-loader.php(106): include('...')
#14 /var/www/wptbox/wp-blog-header.php(19): require_once('...')
#15 /var/www/wptbox/index.php(17): require('...')
#16 {main}
thrown in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 80
[22-Nov-2023 11:15:48 UTC] PHP Fatal error: Uncaught InvalidArgumentException: Argument $language_code must be a non empty string. in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:80
Stack trace:
#0 /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Maybe.php(106): WPML_Translation_Element->get_translation()
#1 /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php(397): WPML\FP\Just->map()
#2 /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php(407): WPML_LS_Settings->{closure}()
#3 /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-render.php(144): WPML_LS_Settings->get_menu_settings_from_id()
#4 /var/www/wptbox/wp-includes/class-wp-hook.php(326): WPML_LS_Render->wp_get_nav_menu_items_filter()
#5 /var/www/wptbox/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#6 /var/www/wptbox/wp-includes/nav-menu.php(762): apply_filters()
#7 /var/www/wptbox/wp-includes/nav-menu-template.php(151): wp_get_nav_menu_items()
#8 /var/www/wptbox/wp-content/themes/Divi/header.php(283): wp_nav_menu()
#9 /var/www/wptbox/wp-includes/template.php(790): require_once('...')
#10 /var/www/wptbox/wp-includes/template.php(725): load_template()
#11 /var/www/wptbox/wp-includes/general-template.php(48): locate_template()
#12 /var/www/wptbox/wp-content/plugins/woocommerce/templates/single-product.php(22): get_header()
#13 /var/www/wptbox/wp-includes/template-loader.php(106): include('...')
#14 /var/www/wptbox/wp-blog-header.php(19): require_once('...')
#15 /var/www/wptbox/index.php(17): require('...')
#16 {main}
thrown in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 80
[22-Nov-2023 11:17:10 UTC] PHP Warning: Undefined array key 0 in /var/www/easywp-plugin/mu-plugins/wp-nc-easywp/plugin/Http/Checker/Plugins.php on line 255
[22-Nov-2023 11:22:53 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 179
[22-Nov-2023 11:22:53 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 183
[22-Nov-2023 11:22:53 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 196
[22-Nov-2023 11:22:53 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 198
[22-Nov-2023 11:22:53 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 199
[22-Nov-2023 11:22:53 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 200
[22-Nov-2023 11:22:53 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 251
[22-Nov-2023 11:22:53 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 252
[22-Nov-2023 11:22:53 UTC] PHP Warning: Trying to access array offset on value of type null in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/menu/wpml-admin-lang-switcher.class.php on line 252
[22-Nov-2023 11:23:06 UTC] PHP Fatal error: Uncaught InvalidArgumentException: Argument $language_code must be a non empty string. in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:80
Stack trace:
#0 /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Maybe.php(106): WPML_Translation_Element->get_translation()
#1 /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php(397): WPML\FP\Just->map()
#2 /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php(407): WPML_LS_Settings->{closure}()
#3 /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-render.php(144): WPML_LS_Settings->get_menu_settings_from_id()
#4 /var/www/wptbox/wp-includes/class-wp-hook.php(326): WPML_LS_Render->wp_get_nav_menu_items_filter()
#5 /var/www/wptbox/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#6 /var/www/wptbox/wp-includes/nav-menu.php(762): apply_filters()
#7 /var/www/wptbox/wp-includes/nav-menu-template.php(151): wp_get_nav_menu_items()
#8 /var/www/wptbox/wp-content/themes/Divi/header.php(283): wp_nav_menu()
#9 /var/www/wptbox/wp-includes/template.php(790): require_once('...')
#10 /var/www/wptbox/wp-includes/template.php(725): load_template()
#11 /var/www/wptbox/wp-includes/general-template.php(48): locate_template()
#12 /var/www/wptbox/wp-content/themes/Divi/page.php(3): get_header()
#13 /var/www/wptbox/wp-includes/template-loader.php(106): include('...')
#14 /var/www/wptbox/wp-blog-header.php(19): require_once('...')
#15 /var/www/wptbox/index.php(17): require('...')
#16 {main}
thrown in /var/www/wptbox/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 80
[22-Nov-2023 11:23:21 UTC] PHP Warning: Undefined array key 0 in /var/www/easywp-plugin/mu-plugins/wp-nc-easywp/plugin/Http/Checker/Plugins.php on line 255
[22-Nov-2023 11:23:41 UTC] PHP Warning: Undefined array key 0 in /var/www/easywp-plugin/mu-plugins/wp-nc-easywp/plugin/Http/Checker/Plugins.php on line 255

Thank you for your help

Kind regards.

Saâd

November 24, 2023 at 4:31 pm #14919705

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

the Fatal error message in the log was helpful. You are already running the latest version, so you can try to solve it using the mentioned troubleshooting options as described here: https://wpml.org/forums/topic/php-fatal-error-uncaught-invalidargumentexception-argument-language_code-must-be-a-non-empty-string-2/#post-11497417.

More information about WPML troubleshooting options can be found here: https://wpml.org/documentation/support/wpml-troubleshooting-options/.

Please remember to back up your site before starting those actions.

Best Regards
Marcel