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 thread is resolved. Here is a description of the problem and solution.

Problem: After activating WPML, my site returns a fatal error.

Solution: There were a lot of errors in the debug log relating the WPML language switcher slots. When I searched the database, I found an entry in the wp_options table with the option name "wpml_language_switcher". I deleted this row from the database and I was then able to activate the WPML plugin.

This topic contains 2 replies, has 2 voices.

Last updated by Claudio Naldi 1 year ago.

Assigned support staff: Lauren.

Author Posts
October 8, 2018 at 6:28 pm

Claudio Naldi

Hello,

This woocommerce site generates a server 500 error as soon as we activate WPML Multilingual CMS, it was working fine until two weeks ago.

We tested deactivating all plugins and only activating WPML Multilingual CMS, this also doesn't work.

We copied a complete backup of the project on a testing sub-domain where we tested all kind of PHP setups and menory settings.

Testing environement sub domain:
hidden link

Production domain: (where we noticed the problem first) the site is multilingual (DE / EN) but not now since that problem happened;
hidden link

The following is the error code generatedon the test sub domain

Fatal error: Uncaught Error: Call to undefined method stdClass::get() in /var/www/vhosts/wpcare.ch/wpc.vielfach.ch/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings-strings.php:94 Stack trace: #0 /var/www/vhosts/wpcare.ch/wpc.vielfach.ch/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings-strings.php(56): WPML_LS_Settings_Strings->translate_slot_strings(Object(stdClass)) #1 /var/www/vhosts/wpcare.ch/wpc.vielfach.ch/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php(250): WPML_LS_Settings_Strings->translate_all(Array) #2 /var/www/vhosts/wpcare.ch/wpc.vielfach.ch/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php(378): WPML_LS_Settings->maybe_init_settings() #3 /var/www/vhosts/wpcare.ch/wpc.vielfach.ch/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php(343): WPML_LS_Settings->get_setting('menus') in /var/www/vhosts/wpcare.ch/wpc.vielfach.ch/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings-strings.php on line 94

thank you in advance for a fix, we have an upset customer in need of his completely working site.

Best,

Claudio Naldi
Managing Director

Atomz Digital Ltd. (was Atomz Media Ltd.)

October 9, 2018 at 10:29 pm #2802309

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. I'll be happy to help you with this.

I installed a copy of your dev site locally for further testing. I found that there were a lot of errors in the debug log relating the WPML language switcher slots. When I searched the database, I found an entry in the wp_options table with the option name "wpml_language_switcher". I deleted this row from the database and I was then able to activate the WPML plugin.

I also checked and the database entry is recreated after enabling WPML and I was able to create a language switcher and the site ran without any issue. So something leads me to believe that this entry in your database someone had been corrupted.

Please make a full backup of your database before making changes and test this on your dev site first, as I haven't fully tested the local site I created to see if there are any other problems. However at a quick glance, I'm not seeing any issues. The language switcher shows up on the site and everything seems to be working, but I must warn of extra caution simply because making changes to the database can sometimes cause other problems.

Please let me know if this resolves the issue for you. Thanks!

October 13, 2018 at 5:06 pm #2814359

Claudio Naldi

My issue is resolved now. Thank you!