WPML

Overview of the Issue

If you try to translate an Element created with Avada library from WPMLTranslation Management page, you will find the following PHP error:

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

Workaround

This issue is fixed in Avada 7.11.3. Updating solves it on your site, so you only need this workaround if you can’t update yet.

Please, make sure of having a full backup of your site before proceeding.

  • Open …/wp-content/plugins/fusion-builder/inc/class-fusion-builder-library.php file.
  • Change:
    add_action( 'wp_loaded', [ $this, 'register_layouts' ] );
  • For
    add_action( 'init', [ $this, 'register_layouts' ] );

All known issues

Still Seeing This Issue?

If updating doesn’t fix it, ask a support question and we’ll look into it with you.