Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #302226

    I hade problem with Visualizer Chart plugin and got help in this thread to solve it. But the solution broke the page builder.

    The solution was to change this line in avia-media.js
    var $body = $("body"), file_frame = [], media = wp.media

    To this

    var $body = $("body"), file_frame = [], media = $.AviaElementBehavior.wp_media

    But when I was going to change the background image for an colorbox I couldn’t because I got this message in the Chrome console.

    Uncaught TypeError: Cannot read property ‘Library’ of undefined

    Site: http://www.chrillemeter.se

    • This topic was modified 10 years, 3 months ago by chrlen.
    #302933

    Hey Chrillemeter!

    The problem is that Visualizer is loading the WP media-editor.js file before the theme does, this makes the “wp” object unavailable for avia-media.js.

    Try the following, open /config-templatebuilder/avia-template-builder/php/template-builder.class.php and look for line 204:

    wp_enqueue_script('avia_builder_js', $this->paths['assetsURL'].'js/avia-builder.js', array('jquery','jquery-ui-core', 'jquery-ui-sortable', 'jquery-ui-droppable','wp-color-picker'), $ver, TRUE );
    

    Replace it by:

    wp_enqueue_script('avia_builder_js', $this->paths['assetsURL'].'js/avia-builder.js', array('jquery','jquery-ui-core', 'jquery-ui-sortable', 'jquery-ui-droppable','wp-color-picker', 'media-editor'), $ver, TRUE );
    

    Regards,
    Josue

    #303173

    Thank you again. It worked :)

    • This reply was modified 10 years, 3 months ago by chrlen.
    #303426

    You are welcome, this change has been accepted and will be included in future updates.

    Regards,
    Josue

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Fix for Visualizer issue cause page builder problems.’ is closed to new replies.