Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #2773

    Poy T
    Participant

    I got this error below from WPBakery Visual Composer plugin.

    Once i turn this off, the error disappear..

    Can you please help?

    Warning: Invalid argument supplied for foreach() in /home/content/96/11075796/html/dev/wp-content/plugins/js_composer/composer/lib/mapper.php on line 146

    i’m using Wp 3.8.

    #2775

    Kory
    Keymaster

    Hey Poy,

    Are you using the most recent version of the X Shortcodes plugin (v2.0.1), X theme (v1.5.1), and Visual Composer (v3.7.3)? Additionally, are you seeing this error throughout your site, or just on certain pages, or when you try to use certain shortcodes?

    Let us know when you have a chance, as we are currently unable to replicate this error.

    Thanks! We’ll help you get to the bottom of this.

    #2842

    Poy T
    Participant

    Hey mate,

    i just recorded a quick 43 seconds video to show you where the errors and answered all the quesitons you asked earlier.

    #2845

    Rubin
    Keymaster

    Hey,

    do you have the wp_debug option on true or false in your wp-config.php file?

    #2848

    Iain M
    Participant

    Hi,

    I’m seeing same thing..

    Warning: Invalid argument supplied for foreach() in /home/teeheez/public_html/wp-content/plugins/js_composer/composer/lib/mapper.php on line 146

    3.8 installed, and WP Bakery 3.7.3 and X shortcodes 2.0.2

    the error appears on the admin dashboard, not on front of site..

    hope you can fix,

    thanks,

    Iain

    #2868

    Kory
    Keymaster

    Hey guys,

    At this time we cannot replicate this exact error, but we are getting an error when Contact Form 7 or Revolution Slider are not activated but Visual Composer is. Do you both happen to have either one of these plugins not installed or not activated along with Visual Composer being installed and activated? I have been able to eliminate the error I see by going to this file:

    /framework/functions/global/admin/visual-composer.php

    Finding the two bits of code near the bottom of the file that look like this:

    //
    // [rev_slider_vc]
    //
    
    vc_map_update( 'rev_slider_vc', array(
      'name'        => __( 'Slider Revolution', '__x__' ),
      'weight'      => 615,
      'icon'        => 'revslider',
      'category'    => $category_media,
      'description' => __( 'Place a Slider Revolution slider into your content', '__x__' )
    ) );
    
    vc_remove_param( 'rev_slider_vc', 'title' );
    vc_remove_param( 'rev_slider_vc', 'el_class' );

    And:

    //
    // [contact-form-7]
    //
    
    vc_map_update( 'contact-form-7', array(
      'name'        => __( 'Contact Form 7', '__x__' ),
      'weight'      => 535,
      'icon'        => 'contact-form-7',
      'category'    => $category_social,
      'description' => __( 'Place one of your contact forms into your content', '__x__' )
    ) );

    And wrapping them both in different if statements, like so:

    if ( class_exists( 'RevSlider' ) ) :
    
      //
      // [rev_slider_vc]
      //
    
      vc_map_update( 'rev_slider_vc', array(
        'name'        => __( 'Slider Revolution', '__x__' ),
        'weight'      => 615,
        'icon'        => 'revslider',
        'category'    => $category_media,
        'description' => __( 'Place a Slider Revolution slider into your content', '__x__' )
      ) );
    
      vc_remove_param( 'rev_slider_vc', 'title' );
      vc_remove_param( 'rev_slider_vc', 'el_class' );
    
    endif;

    And:

    if ( class_exists( 'WPCF7_ContactForm' ) ) :
    
      //
      // [contact-form-7]
      //
    
      vc_map_update( 'contact-form-7', array(
        'name'        => __( 'Contact Form 7', '__x__' ),
        'weight'      => 535,
        'icon'        => 'contact-form-7',
        'category'    => $category_social,
        'description' => __( 'Place one of your contact forms into your content', '__x__' )
      ) );
    
    endif;

    Would you both mind copying and pasting this yourselves to see if this particular warning you’re getting goes away? It eliminates our warning, I just want to make sure that it also addresses your issue as well. It should be noted that we are using functions provided by Visual Composer to make this possible, so there is clearly an error with how their functions are handling these errors. We will certainly be in talks with them, but would like to get some feedback from you all first to see if this fixes the issue.

    #2871

    Kory
    Keymaster

    We have been able to recreate this warning on our end and using the if statements as noted above is eliminating the warning. We apologize for this inconvenience. We will be working to get this on ThemeForest as soon as possible and will make it available for download here as well.

    #3672

    Poy T
    Participant

    thanks mate. please let us know.

    #3676

    Iain M
    Participant

    Hi,

    just saw this, will give it a go tomorrow..

    Happy New Year.. !!

    cheers,

    Iain

    #3679

    Rubin
    Keymaster

    Looking forward hearing how it went! We tried it on our end and everything looks fine now after adding the if statement.