Uncaught TypeError: $template.get is not a function

后端 未结 8 1242
遥遥无期
遥遥无期 2020-12-24 01:28

I am getting this error in WordPress when I am using a plugin called WpBakery Visual Composer.

I am using the latest version of WordPress (4.5), using the latest Go

8条回答
  •  一生所求
    2020-12-24 01:37

    a latest fix in December 2016, for Visual composer fix is this,

    html2element:function(html){var $template,attributes={},template=vc.template(html);$template=$(template(this.model.toJSON()).trim()),_.each($template.get(0).attributes,function(attr){attributes[attr.name]=attr.value}),this.$el.attr(attributes).html($template.html()),this.setContent(),this.renderContent()},
    

    notice this important thing, template=vc.template(html); in the actual code. this is the quick fix in latest version, compatible with WPordpress latest.

    Remember to update Wordpress and theme accordingly, so this fix should work fine.

    thanks and happy coding

提交回复
热议问题