- 状态
- 已解决
- 报告针对
- WPML String Translation 3.1.0
- 解决于
- 3.1.2
问题概述
当您尝试使用 Divi 主题更新或新建页面时,您会收到此错误:
PHP Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /home/skinro1q/public_html/wpsystem/wp-content/themes/Divi/epanel/custom_functions.php:271
Stack trace:
#0 .../wp-content/themes/Divi/includes/builder/feature/global-presets/Settings.php(263): et_update_option('builder_custom_...', Object(stdClass))
#1 .../wp-content/themes/Divi/includes/builder/class-et-global-settings.php(636): ET_Builder_Global_Presets_Settings->migrate_customizer_settings(Array)
#2 .../wp-content/themes/Divi/includes/builder/class-et-global-settings.php(21): ET_Global_Settings::set_values()
#3 .../wp-content/themes/Divi/includes/builder/class-et-global-settings.php(721): ET_Global_Settings::init()
#4 .../wp-includes/class-wp-hook.php(287): et_builder_init_global_settings(Object(WP))
#5 .../wp-includes/class-wp-hook.php(311): in .../wp-content/themes/Divi/epanel/custom_functions.php on line 271
临时解决方法
如果您遇到了此问题,可以通过以下操作来解决:
- 恢复您最近的稳定备份。
- 更新您的 WPML 插件
但是,如果您的 Divi 设置在以次要语言保存时已损坏,请执行以下操作:
- 请在继续操作之前对您的站点进行完整备份。
- 使用重置按钮或按照以下步骤重置您的 Divi 设置:
- 将以下代码添加到您的 functions.php 文件中。
add_action ('init', function () { delete_option ('et_divi'); }); - 在默认语言下打开后台的任意页面。
- 保持在默认语言下,再次保存主题设置。这将重置您的 Divi 主题选项。
- 删除此代码。
- 一旦您的 Divi 设置不再损坏,您就可以正常更新您的插件并更新 Divi 设置。