Tagged: enfold, page builder
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
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
Thank you again. It worked :)
You are welcome, this change has been accepted and will be included in future updates.
Regards,
Josue