WPML
状态
已由作者解决
解决于
Avada 7.11.3
相关插件/主题
Avada
主题标签
Compatibility

问题概述

如果您尝试从 WPML > 翻译管理页面翻译使用 Avada 库创建的元素,您会发现以下 PHP 错误:

PHP Fatal error: Uncaught Error: Call to a member function get_source_language_code() on bool in .../wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/tm/inc/functions-load.php:496

Stack trace:

#0 [internal function]: wpml_tm_create_ATE_job_creation_model()

#1 .../wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(164): array_map()

#2 [internal function]: WPML\FP\Fns::WPML\FP\{closure}()

#3 .../wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(152): call_user_func_array()

#4 [internal function]: WPML\FP\Fns::WPML\FP\{closure}()

#5 .../wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array()

#6 .../wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/tm/classes/ATE/Hooks/class-wpml-tm-ate-jobs-actions.php(141): WPML\FP\Fns::__callStatic()

#7 .../wp-incl in .../wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/tm/inc/functions-load.php on line 496

临时解决方法

在继续操作之前,请确保对您的站点进行完整备份


  • 打开 …/wp-content/plugins/fusion-builder/inc/class-fusion-builder-library.php 文件。

  • 将:
    		add_action( 'wp_loaded', [ $this, 'register_layouts' ] );


  • 替换为:
    		add_action( 'init', [ $this, 'register_layouts' ] );

所有已知问题 →