【问题标题】:Call to undefined method WP_Textdomain_Registry::reset()调用未定义的方法 WP_Textdomain_Registry::reset()
【发布时间】:2022-11-02 19:18:52
【问题描述】:

我的 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): 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

我只能在将“.disabled”添加到插件文件夹(wpml-string-translation)名称后才能访问该站点,但这会禁用该插件并且该站点需要它才能工作。

【问题讨论】:

    标签: php wordpress wpml


    【解决方案1】:

    这是更新到 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/

    - 编辑:

    下载两个更新插件后,将插件相关的两个文件夹重命名,安装更新版本即可解决问题

    【讨论】:

      猜你喜欢
      • 2012-07-27
      • 2016-12-23
      • 2019-10-25
      • 2018-07-11
      • 2013-10-23
      • 2012-02-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多