@Sorin Haidau
Hi guys, I'm using the Astra theme. This fix works for 99.9%. For some, this only stops the spinning wheel, but as soon as the page loads the visual composer, no.
I modified this code a bit (which is now posted everywhere)
The original Astra theme code is here (composer-view.js)
html2element:function (html) { var attributes = {}, $template; if (_.isString(html)) { this.template = _.template(html); $template = $(this.template(this.model.toJSON()).trim()); } else { this.template = html; $template = html; } _.each($template.get(0).attributes, function (attr) { attributes[attr.name] = attr.value; }); this.$el.attr(attributes).html($template.html()); this.setContent(); this.renderContent(); },
Code that works:
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() },
The main difference is here (compared to the source code)
}); this.$el.attr
Instead of the original comma there is a semicolon :):
}), this.$el.attr
Greetings from people :)
Update: this recorded about 19 of the 20 sites that I had with the astra theme with the same error as mentioned above ... all but one site.
I had this error after the visual composer finally appeared (half of the design elements are missing)
Uncaught Error: Syntax error, unrecognized expression: .ui-tabs-nav [href=
I fixed this by updating line 552 of composition-custom-views.js:
$('.ui-tabs-nav [href="#tab-' + params.tab_id + '"]').text(params.title);
And voila, everything now works. I'm sorry if it does not work for all topics, try using the code mentioned above. If this does not work, try my solutions :)