Skip Navigation

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

Problem: I have this error

Uncaught Error: Call to undefined method stdClass::is_enabled() in /wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php:346

Solution: deleting the wpml_language_switcher entry from wp_options fixes the issue

Relevant Documentation: https://wpml.org/forums/topic/server-500-error-2/#post-2802309

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.

This topic contains 4 replies, has 2 voices.

Last updated by P-Derathe 6 months, 1 week ago.

Assigned support staff: Laura.

Author Posts
March 12, 2020 at 9:57 am #5670779

P-Derathe

Qiuand j'essaie d'activer wpml Version 4.3.10 :
Une erreur de type E_ERROR a été causée dans la ligne 346 du fichier /var/www/toutentete/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php. Message d’erreur : Uncaught Error: Call to undefined method stdClass::is_enabled() in /var/www/toutentete/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php:346 Stack trace: #0 /var/www/toutentete/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-inline-styles.php(274): WPML_LS_Settings->get_active_slots() #1 /var/www/toutentete/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-admin-ui.php(105): WPML_LS_Inline_Styles->admin_output() #2 /var/www/toutentete/wp-includes/class-wp-hook.php(288): WPML_LS_Admin_UI->admin_head_action() #3 /var/www/toutentete/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters() #4 /var/www/toutentete/wp-includes/plugin.php(478): WP_Hook->do_action() #5 /var/www/toutentete/wp-admin/admin-header.php(149): do_action() #6 /var/www/toutentete/wp-admin/plugins.php(481): require_once('/var/www/touten...') #7 {main} thrown

March 12, 2020 at 3:48 pm #5674467

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

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

Hi,

thanks for contacting us.

I will reply to this ticket in English. If this is a problem, please open a ticket in the French forum.

Your issue is similar to this one: https://wpml.org/forums/topic/server-500-error-2/#post-2802309
Can you please check if the solution proposed there works for you?

March 14, 2020 at 9:36 am #5685507

P-Derathe

Hello Laura
Thanks for your answer
With the post you suggested (https://wpml.org/forums/topic/server-500-error-2/#post-2802309 ) I was able to solve my issue.

This problem with the entry "wpml_language_switcher" in the "wp_options" table is known and recurrent. Why doesn't WPML solve it?

Best regards
Pascal

March 14, 2020 at 12:11 pm #5686015

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

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

Hi Pascal,

the issue seems to happen when there is a corruption of the database, and this is something that can't be fixed on WPML's side, as corruption can happen for several reasons.

However, I'm glad to know it worked for you. Please contact us again if you still have issues.

March 15, 2020 at 10:06 am #5688457

P-Derathe

WPML breaks site toutentete.com AGAIN!
Hello
Sorry to come back to it, but the toutentete.com site is broken again.
So I go to the "wp_options" table (here "tet_options")
1 ° At the entry "wpml_language_switcher" I see that strange characters are generated. There are 16: "�"
I delete them.
I save the entry "wpml_language_switcher"
By conscience, I edit again the entry "wpml_language_switcher" .. and I see that the 16 characters "�" are there again!

2 ° I apply the solution recommended here: https://wpml.org/forums/topic/server-500-error-2/#post-2802309
namely delete the entry "wpml_language_switcher" from the table "wp_options" (here "tet_options")
beforehand I had taken care to deactivate WPML Version 4.3.10.
I reactivate WPML Version 4.3.10.
The entry "wpml_language_switcher" of the table "wp_options" (here "tet_options") has not been recreated
...
and the site is still broken 🙁