WPML

问题概述

如果您尝试从 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

临时解决方法

此问题已在 Avada 7.11.3 中修复。 更新即可在您的站点上解决此问题,因此只有在您还无法更新时,才需要此临时解决方法。

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

  • 打开 …/wp-content/plugins/fusion-builder/inc/class-fusion-builder-library.php 文件。
  • 将:
    add_action( 'wp_loaded', [ $this, 'register_layouts' ] );
  • 替换为:
    add_action( 'init', [ $this, 'register_layouts' ] );

所有已知问题

仍然遇到此问题?

如果更新无法解决问题,请提出支持问题,我们将与您一起排查。