Plugin throwing TypeError after WordPress 4.5 update

后端 未结 10 1425
甜味超标
甜味超标 2020-12-07 19:06

I\'m debugging a visual composer plugin that broke after I updated WordPress to 4.5 and I can\'t figure out why it is throwing a TypeError.

The error message in the

10条回答
  •  无人及你
    2020-12-07 19:22

    I made this modification that works on my WP 4.8.1 (PHP7)

    in the file wp-content/plugins/js_composer/assets/js/backend/composer-view.js

    you must modify the render method :

    replace this line

    this.html2element(_.template($shortcode_template_el.html(), this.model.toJSON())); 
    

    by this line

    this.html2element( $shortcode_template_el.html() );
    

    It seems the _.template() function that doesn't work perfectly and doesn't return the good object, so better give the html code instead.

提交回复
热议问题