How to Make WPBakery’s Visual Composer Work With the New WP Version.

Screen Shot 2016-08-04 at 10.48.01 AMHad to do some Stack Overflow research on this one. It looks like the backend JavaScript is broken.

In order to fix that we need to find the file named composer-view.js.
The actual path is wp-content/plugins/js_composer/assets/js/backend/composer-view.js.

The next step is changing the function named “html2element”.

The new version looks like this


html2element: function(html) {
    var $template, attributes = {},
    template = html;
	
    $template = $(template(this.model.toJSON()).trim());

    if($template.get(0)){
        _.each($template.get(0).attributes, function(attr) {
        attributes[attr.name] = attr.value
    })};
	
    this.$el.attr(attributes).html($template.html()),
    this.setContent(),
    this.renderContent()
},

 

Screen Shot 2016-08-04 at 10.48.16 AM