Javascript Composer-view.js文件给了我一个错误

Javascript Composer-view.js文件给了我一个错误,javascript,Javascript,我得到了这个错误。 composer view.js?ver=4.5.3:6未捕获类型错误:无法读取未定义的属性“attributes” 我在修改代码后得到了这个 html2element: function(html) { var $template, attributes = {}, template = html; $template = $(template(this.model.toJSON()).trim()), _.each(

我得到了这个错误。 composer view.js?ver=4.5.3:6未捕获类型错误:无法读取未定义的属性“attributes”

我在修改代码后得到了这个

html2element: function(html) {
        var $template, attributes = {},
            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()
    },

因此,我无法在VisualComposer的后端VisualComposor编辑器中添加更新或删除。我正在使用VC-4.8.4

您的变量
$template
未定义

var $template; // undefined
...
_.each($template.get(0)....) // $template is still undefined

我使用的是VisualComposer 4.5.8,我认为它与WordPress4.5不兼容

为了解决问题,我已将visual composer更新为4.11.2.1。我认为是最新的一款,现在很好用

我提到了这个链接。

我从这里得到了这个补丁。它起作用了。但是在实现了这个之后,我得到了这个错误。