我的 WordPress 网站已损坏,仅显示此错误消息:
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): WPMLSTMOHooksLanguageSwitch->resetTranslationAvailabilityInformation() #1 /var/www/htdocs/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LanguageSwitch.php(73): WPMLSTMOHooksLanguageSwitch->changeMoObjects('view-subscripti...') #2 /var/www/htdocs/wp-content/plugins/wpml-string-translation/classes/TranslateWpmlString.php(167): WPMLSTMOHooksLanguageSwitch->switchToLocale('view-subscripti...') #3 /var/www/htdocs/wp-content/plugins/wpml-string-translation/classes/TranslateWpmlString.php(109): WPMLSTTrans in /var/www/htdocs/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LanguageSwitch.php on line 139
我只能在将“.disabled”添加到插件文件夹(wpml-string-translation)名称后才能访问该网站,但这会禁用该插件,并且该网站需要它才能工作。
这是更新到 wordpress 6.1 时出现的问题。
要修复此问题,您需要将 WPML 更新到 4.5.12,将字符串翻译更新到 3.2.3
来源:https ://wpml.org/changelog/2022/10/wpml-4-5-12-updates-for-wordpress-6-1/
--编辑:
下载两个更新的插件后,将与插件相关的两个文件夹重命名并安装更新版本即可解决问题
v自行车V型不错VB下错VB下错v