13

My Wordpress site is broken and only shows this error message:

Fatal error: Uncaught Error: Call to undefined method WP_Textdomain_Registry::reset() in /var/www/htdocs/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LanguageSwitch.php:139
Stack trace:
#0 /var/www/htdocs/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LanguageSwitch.php(119): WPML\ST\MO\Hooks\LanguageSwitch->resetTranslationAvailabilityInformation()
#1 /var/www/htdocs/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LanguageSwitch.php(73): WPML\ST\MO\Hooks\LanguageSwitch->changeMoObjects('view-subscripti...')
#2 /var/www/htdocs/wp-content/plugins/wpml-string-translation/classes/TranslateWpmlString.php(167): WPML\ST\MO\Hooks\LanguageSwitch->switchToLocale('view-subscripti...')
#3 /var/www/htdocs/wp-content/plugins/wpml-string-translation/classes/TranslateWpmlString.php(109): WPML\ST\Trans in /var/www/htdocs/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LanguageSwitch.php on line 139

I can only access the site after adding ".disabled" to the plugin folder (wpml-string-translation) name but this disables the plugin and the site needs it to work.

5 Answers 5

21

It is a problem that is occurring with the update to wordpress 6.1.

To fix it you need to update WPML to 4.5.12 and String Translation to 3.2.3

Source: https://wpml.org/changelog/2022/10/wpml-4-5-12-updates-for-wordpress-6-1/

-- Edit:

After downloading the two updated plugins, rename the two folders related to the plugins and install the updated versions to solve the problem

8

I just removed string 139. Everything is working at the moment

2
  • Yes, just comment the line, and update the plugines and you are ok! Commented Nov 3, 2022 at 12:02
  • 3
    for those wondering which file to comment this out in, it's /plugins/wpml-string-translation/classes/MO/Hooks/LanguageSwitch.php Commented Nov 16, 2022 at 15:27
3

Had the same issue today.

This issue is due to none updated version of WPML and compatibility with 6.1 WordPress. Since WPML website is today down and you can not download the plugin.

There is github repository:

https://github.com/youssef-lmw/wpml-string-translation

  1. Download this version of the plugin

  2. List item replaces current one in wpml-string-translation folder

1
  • 2
    Github repo is down due to DMCA takedown. Good that git is decentral... 😶 I could reactivate my wordpress with installing the new version of WPML.
    – cljk
    Commented Nov 9, 2022 at 9:36
2

I downloaded https://github.com/youssef-lmw/wpml-string-translation/archive/refs/heads/main.zip an remplace wpml-string-translation folder in wp-content/plugins/wpml-string-translation and fixed problem.

WPML String Translation for Wordpress 6.1 FIX error: Fatal error: Uncaught Error: Call to undefined method WP_Textdomain_Registry::reset()

0

While the WPML.org site is down, you can downgrade WordPress itself to version 6.0, either

Not the answer you're looking for? Browse other questions tagged or ask your own question.