WPML

Overview of the Issue

In some cases, after updating WPML and Divi theme to their recent versions, you may get the following notice:

Warning: Undefined array key “display_conditions” in …/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Divi/DisplayConditions.php on line 23

Workaround

This issue is fixed. Updating to the latest version solves it on your site, so you only need this workaround if you can’t update yet.

This warning is not harmful but our developers are working on it. In the meantime you can apply any of the two following workarounds after making a full back up of your site.

  1. Open your functions.php file.
  2. Add this code:
    PHP
    $should_i_run = get_transient( 'divifix' ); if ( $should_i_run == false ) { set_transient( 'divifix', true, 10000); $test = get_option( "et_divi" ); unset ( $test["builder_global_presets_history"] ); update_option( "et_divi", $test ); }
  3. Visit your site’s front-end.
  4. Remove the previous code.

If this does not work, you can:

  1. Open the file /wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Divi/DisplayConditions.php.
  2. Look for line 23.
  3. Replace:
    PHP
    if ( $atts['display_conditions'] && self::BASE64_EMPTY_ARRAY !== $atts['display_conditions'] ) {
    With:
    PHP
    if ( isset( $atts['display_conditions'] ) && self::BASE64_EMPTY_ARRAY !== $atts['display_conditions'] ) {

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.