2017-04-06 57 views
0

我试图卸载并重新安装视觉作曲家,我似乎无法修复它,我无法编辑前端,因为它根本没有显示。我安装了ken主题。当检查控制台时,我得到这个错误,但是我在编程中几乎没有到期,我不知道该怎么做。Wp视觉编辑器没有显示

Uncaught TypeError: $template.get is not a function 
    at n.html2element (composer-view.js:146) 
    at n.render (composer-view.js:157) 
    at n.appendShortcode (composer-view.js:534) 
    at n.<anonymous> (composer-view.js:477) 
    at load-scripts.php:112 
    at Function.m.each.m.forEach (load-scripts.php:112) 
    at n.addChild (composer-view.js:476) 
    at n.addAll (composer-view.js:470) 
    at _ (load-scripts.php:457) 
    at m (load-scripts.php:457) 

请帮忙。

回答

1

这基本上意味着你必须更新视觉作曲家。我也遇到很多问题。有不同的选项可以通过修改visual composer文件中的代码来解决这个问题,这是不推荐的。所以我个人建议你亲切地更新你的视觉作曲家,然后它完美的作品。

文件来修改网址是:

/wp-content/plugins/js_composer/assets/js/dist/backend.min.j‌​s 

代码替换为:

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() 
    }, 

请只改变 “html2element” 功能。希望这对你有用。

感谢

+0

的事情是我在artbees提供的最新版本,需要为主题的工作女巫,我能做些什么代码修改? – Aimatos

+0

代码修改应该在模板文件,这是安静的,我认为不好。看到我修改后的答案。 –

+0

似乎找不到该文件,我的文件夹名称是js_composer_theme/assets/js,但我没有dist文件夹,我有一个名为backend的文件夹,里面有很多文件,但我不想编辑任何文件如果我不知道女巫是谁 – Aimatos