Live Composer Cannot Read Property 'trim' of Undefined
Visual composer doesn't load and gives TypeError: _.template(...).trim is not a role
My visual composer plugin doesn't work. It stuck on the loading page. And it gives an mistake "TypeError: .template(...).trim is not a function" Error is on this line of code: this.$controls = $(.template(template, data, vc.template_options).trim()).addClass('vc_controls');
Delight help me to fix this out.
Hither is the error which I get:
Solutions
Solution Goto file /wp-content/plugins/js_composer_salient/assets/js/dist/backend.min.js effectually line 4045:
======> Replace the lawmaking
html2element: role(html) { var $template, attributes = {}, template = html; $template = $(template(this.model.toJSON()).trim()), _.each($template.get(0).attributes, function(attr) { attributes[attr.proper noun] = attr.value }), this.$el.attr(attributes).html($template.html()), this.setContent(), this.renderContent() }, If yous are unable to solve this error past upgrading or downgrading your theme or plugin, you could at least brand the beneath changes.
1. Open the following 2 files:
wp-content\plugins\js_composer\assets\js\frontend_editor\frontend_editor.js wp-content\plugins\js_composer\assets\js\frontend_editor\custom_views.js 2. Replace
this.$controls = $( _.template( template, data, vc.template_options ).trim() ).addClass( 'vc_controls' ); with
this.$controls = $( ( "vc.template_options" ).trim() ).addClass( 'vc_controls' ); This will surely work.
Upgrade to Visual Composer version four.xi.2+
Notation Wordpress 4.5 compatibility was fixed on 13th Apr: https://wpbakery.atlassian.internet/wiki/display/VC/Release+Notes
Similar questions
Visual Composer doesn't relieve image from custom chemical element
I want to create custom element in Visual composer which will add 2 images inside vc_single_image For example: In my functions.php I do following: And I've copied file form js_composer/include/shortcodesvc_single_images to MyTheme/vc-elements/ and after it I change html construction of this file (add new varible "secondImage"). Trouble: When I create ...
WordPress and Visual Composer custom page template
I really promise somebody can help me. I'am working with visual composer and whould like to create a template to utilise on some page's. I whant to create the starting time section in pure code and save it in my theme's every bit a template file. So when i pick this template in the page editor, i whould like to use visusal composer, just content made with composer shou...
Load Visual Composer on Every Page (AJAX Setup)
I am using a custom WordPress theme that uses AJAX to load pages. As you can imagine this can create an instance where the site loads to a folio that does not use Visual Composer (VC) and and then function loads some other page that does us VC, since the set load didn't require the resource. So far the simply solutions I've thought of are using VC on every pa...
Visual Composer; custom elements won't load textarea_html/'content'
Currently using WordPress 4.4.2, I'one thousand in the process of developing some custom Visual Composer elements. Information technology seems (however), that whenever I want to use a textarea_html param (So the stop-user tin can use the wysiwyg editor) I cannot seem to grab it's contents when rendering the template. Contents of 'titled_content_box.php' contents of the template used...
How to load visual composer during using ajax in wordpress
I used an ajax request in Wordpress to get the content of a mail, in that mail service i used the Visual Composer. but the content shows merely the VC shortcodes with out changing them to the real content.. That is the code that i used And this jQuery code only returns like that
As well ask
Source: https://wp-qa.com/visual-composer-doesn-t-load-and-gives-typeerror-_-template-trim-is-not-a-function
Postar um comentário for "Live Composer Cannot Read Property 'trim' of Undefined"