我的 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)名稱後才能訪問該網站,但這會禁用該插件,並且該網站需要它才能工作。
P粉3176793422023-10-25 22:59:52
這是更新到 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/
#--編輯:
下載兩個更新的外掛程式後,將與外掛程式相關的兩個資料夾重新命名並安裝更新版本即可解決問題