Issue with wpbakery
-
I have tested this module on a site that is built with wpbakery.
It all worked well with one weird exception. I am using another module for smooth scrolling. That did not work due to a js error in the generated version of the site.
I found that the generated source code contains this:
<script type="text/html" id="wpb-modifications"><script type="text/javascript" id="page-scroll-to-id-plugin-script-js-extra">
There are 2 opening <script> tags which, of course, make no sense. The live site looks like this:
<script type="text/html" id="wpb-modifications"></script>...
Once I manually added this closing tag in the generated version everything was fine, no more errors.
I don’t know what this tag is good for. Wpbakery generates this tag like this:
class Vc_Modifications { public static $modified = false; public function __construct() { add_action( 'wp_footer', array( $this, 'renderScript', ) ); } public function renderScript() { if ( self::$modified ) { // output script $tag = 'script'; echo '<' . $tag . ' type="text/html" id="wpb-modifications"></' . $tag . '>'; } } }
Maybe this is a bit of a non-conformistic approach so that your module does not catch this?
But also maybe an easy fix for you so I thought I let you know.
- The topic ‘Issue with wpbakery’ is closed to new replies.