Skip Navigation

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 16 replies, has 3 voices.

Last updated by thomasD-100 1 year, 11 months ago.

Assisted by: Bobby.

Author Posts
November 29, 2022 at 10:20 am #12553459

thomasD-100

I am getting a critical error when the WPML Multilingual CMS plugin is active.
I still did not update to WordPress 6.1.1. because of some critical issues with WPML.

How can we solve the issue?

November 29, 2022 at 11:44 am #12554047

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

1) Please update all WPML plugins to the latest version by going to the Plugins → Add New page, click the Commercial tab, and then click Check for updates.

- https://wpml.org/faq/install-wpml/#wpml-4-2-8

Please make a backup before proceeding.

2) Can you please enable WP debug log as explained in the next docs and share with us more info and the error message you get when the critical error appears?

This would help us know what is the problem and suggest the correct steps to fix the problem.

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

Thanks,
Drazen

November 29, 2022 at 3:04 pm #12555939

thomasD-100

I cannot activate the WPML Multilingual CMS plugin. If I do that I get a critical error and unfortunately I can not enable the WP debug

November 29, 2022 at 6:02 pm #12557205

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hello,

I would need to see the detail of the error. You can see how to enable debug logging here:
https://wpml.org/documentation/support/debugging-wpml/

Go in your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);

Edit your wp-config.php file and add these lines, just before it says 'stop editing here':

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . 'https://cdn.wpml.org/error_log.txt');

This will create an error_log.txt file in your site's root directory. Please send me its contents.

November 30, 2022 at 8:55 am #12560535

thomasD-100

Here is the debug:

[no notice related to WPML -- removed by support]

November 30, 2022 at 8:57 am #12560567

thomasD-100

In addition to this one, I got yesterday late afternoon an email from WordPress while recreating the issue through the staging website:

Fehler-Details
==============
Ein Fehler vom Typ E_ERROR wurde in der Zeile 103 der Datei /html/wordpress/1669737828791/wp-content/plugins/_sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-dependencies-factory.php verursacht. Fehlermeldung: Uncaught Error: Class 'WPML_LS_Model_Build' not found in /html/wordpress/1669737828791/wp-content/plugins/_sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-dependencies-factory.php:103
Stack trace:
#0 /html/wordpress/1669737828791/wp-content/plugins/_sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-dependencies-factory.php(125): WPML_LS_Dependencies_Factory->model_build()
#1 /html/wordpress/1669737828791/wp-content/plugins/_sitepress-multilingual-cms/classes/language-switcher/class-wpml-language-switcher.php(31): WPML_LS_Dependencies_Factory->render()
#2 /html/wordpress/1669737828791/wp-content/plugins/_sitepress-multilingual-cms/sitepress.php(345): WPML_Language_Switcher->init_hooks()
#3 /html/wordpress/1669737828791/wp-content/plugins/_sitepress-multilingual-cms/sitepress.php(365): wpml_init_language_switcher()
#4 /html/wordpress/1669737828791/wp-includes/class-wp-hook.php(307): wpml_loaded(Object(SitePress))
#5 /html/wordpress/1669737828791/wp-includes/class-wp-hook.php(

December 1, 2022 at 4:28 am #12567339

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for sharing the above information.

Please review the following Errata and let me know your results

https://wpml.org/errata/wpml-4-5-12-language-switcher-listing-change-order-when-switching-language/

December 1, 2022 at 10:37 am #12569529

thomasD-100

So... I have noticed that in the wp-content/plugins folder I hade the following two classes: class-wpml-ls-model-build 1.php
/class-wpml-ls-model-build-2.php

I have delete "WPML Multilingual CMS" and uploaded manually the latest version form WPML.org>Downloads. I activate the plugin again, followed the workaround you suggested and now the website doesn't go down and is stable.

Anyway the problem with horizontal list language switcher still persists!
I do not understand why...

Bildschirmfoto 2022-12-01 um 11.35.58.png
Bildschirmfoto 2022-12-01 um 11.36.45.png
December 2, 2022 at 5:37 pm #12580095

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hello,

glad to hear the issue has been resolved, regarding the language switcher, our team is going to be implementing this workaround into the next release of WPML, however, if the workaround is not working we might need to review this further.

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

December 6, 2022 at 5:49 pm #12601345

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for the access details!

When I review the staging site I can see it's working ok.

You are not able to use the switcher as it points to the live site but if you visit the different domains separately you will see that the switcher does not change order.

hidden link
hidden link

December 7, 2022 at 9:23 am #12604953

thomasD-100

Hi,
I tried to open the staging site using another browser and cleaning the cache, but I still see the language switcher changes order.
Do you think maybe is related to the fact that I have still not update to WordPress 6.1.1?

December 8, 2022 at 2:03 am #12611017

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Please open both links I shared above.

If you use the language switcher it will take you to the live site which I am guessing does not have fix.

December 8, 2022 at 8:35 am #12612549

thomasD-100

I am still struggling with the problem...

Bildschirmfoto 2022-12-08 um 09.23.35.png
Bildschirmfoto 2022-12-08 um 09.23.48.png
December 8, 2022 at 10:31 pm #12617655

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

At the moment I am not able to view the site as the credentials are not working for me to share a screenshot with you of what I see, but last I test I could not reproduce the issue.

If possible update the access and also share a screencast of how you are reproducing this issue as I was not able to anymore. Also test in an incognito window.

December 13, 2022 at 9:49 am #12640507

thomasD-100

So, the credentials should work now.