• George

    (@quantum_leap)


    Hi I just noticed that your plugin clashes with WPBakery Visual Composer. Particularly, the modal shortcode generator doesn’t work(doesn’t display the attributes). When VC is disabled, it seems to be working fine.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author thomstark

    (@thomstark)

    Check your console for javascript errors that Visual Composer might be creating.

    Thread Starter George

    (@quantum_leap)

    Hi, it’s here:

    TypeError: caller is undefined
    
    changeHandler()                           vc-tabs.min.js:1
    n.event.dispatch()                        jquery.js:3
    n.event.add/r.handle()                    jquery.js:3
    n.event.trigger()                         jquery.js:3
    a.event.trigger()                         jquery-migrate.min.js:2
    .trigger/<()                              jquery.js:3
    .each()                                   jquery.js:2
    n.prototype.each()                        jquery.js:2
    .trigger()                                jquery.js:3
    <anonymous>                               jquery.js:37
    .each()                                   jquery.js:2
    n.prototype.each()                        jquery.js:2
    <anonymous>                               jquery.js:34
    n.event.dispatch()                        jquery.js:3
    n.event.add/r.handle()                    jquery.js:3
    n.event.trigger()                         jquery.js:3
    a.event.trigger()                         jquery-migrate.min.js:2
    .trigger/<()                              jquery.js:3
    .each()                                   jquery.js:2
    n.prototype.each()                        jquery.js:2
    .trigger()                                jquery.js:3
    Chozed.prototype.result_select()          jquery.js:925
    Chozed.prototype.search_results_mouseup() jquery.js:827
    Chozed.prototype.register_observers/<()   jquery.js:559
    n.event.dispatch()                        jquery.js:3
    n.event.add/r.handle()                    jquery.js:3
    
    [Learn More]                              vc-tabs.min.js:1:3575
    Plugin Author thomstark

    (@thomstark)

    So the problem is not with File Away. It’s with Visual Composer, which is generating this javascript error, which in turn prevents File Away’s javascript from loading.

    Thread Starter George

    (@quantum_leap)

    Hmmm. Let me explain a bit more. Basically, the generator popup appears as normal when I click its button. When I select a shortcode from the first dropdown field I get the error messages described and the shortcode attributes do not appear as they should further down the page. Also the “Insert Shortcode” button doesn’t insert the code to the page but that’s understandable since the shortcode hasn’t been set yet. The only exeption to that rule is when I select the first shortcode type “Directory Files” in which case the secondary dropbox appears underneath. Selecting “Sorted List” still outputs the errors but the attributes appear underneath and I can select options and insert the shortcode. If I select “Sortable Data Table” I do not get any attributes and of course I still get the error messages.

    So all I am saying is that the error gets generated when a File Away action is initiated, it’s just does not generate that by itself!

    Plugin Author thomstark

    (@thomstark)

    Well clearly Visual Composer is interfering with File Away, as the problem doesn’t exist if Visual Composer is disabled. Since Visual Composer is behind a $34 paywall, I’m not going to be able to look at their plugin to fix their issue for them.

    On your console error, where it says, “TypeError: caller is undefined”, there should be a corresponding js document and line number associated with that error. You didn’t include it in your error report.

    Thread Starter George

    (@quantum_leap)

    Ok yes, you are right sorry. file is called “vc-tabs.min.js:1:3575”.

    File path is SITEROOT/wp-content/plugins/js_composer/assets/lib/vc_tabs/vc-tabs.min.js

    The file contains the following minified code:

    
    +function($){"use strict";function Plugin(action,options){var args;return args=Array.prototype.slice.call(arguments,1),this.each(function(){var $this,data;$this=$(this),data=$this.data("vc.tabs"),data||(data=new Tabs($this,$.extend(!0,{},options)),$this.data("vc.tabs",data)),"string"==typeof action&&data[action].apply(data,args)})}var Tabs,old,clickHandler,changeHandler;Tabs=function(element,options){this.$element=$(element),this.activeClass="vc_active",this.tabSelector="[data-vc-tab]",this.useCacheFlag=void 0,this.$target=void 0,this.selector=void 0,this.$targetTab=void 0,this.$relatedAccordion=void 0,this.$container=void 0},Tabs.prototype.isCacheUsed=function(){var useCache,that;return that=this,useCache=function(){return!1!==that.$element.data("vcUseCache")},"undefined"==typeof this.useCacheFlag&&(this.useCacheFlag=useCache()),this.useCacheFlag},Tabs.prototype.getContainer=function(){return this.isCacheUsed()?("undefined"==typeof this.$container&&(this.$container=this.findContainer()),this.$container):this.findContainer()},Tabs.prototype.findContainer=function(){var $container;return $container=this.$element.closest(this.$element.data("vcContainer")),$container.length||($container=$("body")),$container},Tabs.prototype.getContainerAccordion=function(){return this.getContainer().find("[data-vc-accordion]")},Tabs.prototype.getSelector=function(){var findSelector,$this;return $this=this.$element,findSelector=function(){var selector;return selector=$this.data("vcTarget"),selector||(selector=$this.attr("href")),selector},this.isCacheUsed()?("undefined"==typeof this.selector&&(this.selector=findSelector()),this.selector):findSelector()},Tabs.prototype.getTarget=function(){var selector;return selector=this.getSelector(),this.isCacheUsed()?("undefined"==typeof this.$target&&(this.$target=this.getContainer().find(selector)),this.$target):this.getContainer().find(selector)},Tabs.prototype.getRelatedAccordion=function(){var tab,filterElements;return tab=this,filterElements=function(){var $elements;return $elements=tab.getContainerAccordion().filter(function(){var $that,accordion;return $that=$(this),accordion=$that.data("vc.accordion"),"undefined"==typeof accordion&&($that.vcAccordion(),accordion=$that.data("vc.accordion")),tab.getSelector()===accordion.getSelector()}),$elements.length?$elements:void 0},this.isCacheUsed()?("undefined"==typeof this.$relatedAccordion&&(this.$relatedAccordion=filterElements()),this.$relatedAccordion):filterElements()},Tabs.prototype.triggerEvent=function(event){var $event;"string"==typeof event&&($event=$.Event(event),this.$element.trigger($event))},Tabs.prototype.getTargetTab=function(){var $this;return $this=this.$element,this.isCacheUsed()?("undefined"==typeof this.$targetTab&&(this.$targetTab=$this.closest(this.tabSelector)),this.$targetTab):$this.closest(this.tabSelector)},Tabs.prototype.tabClick=function(){this.getRelatedAccordion().trigger("click")},Tabs.prototype.show=function(){this.getTargetTab().hasClass(this.activeClass)||(this.triggerEvent("show.vc.tab"),this.getTargetTab().addClass(this.activeClass))},Tabs.prototype.hide=function(){this.getTargetTab().hasClass(this.activeClass)&&(this.triggerEvent("hide.vc.tab"),this.getTargetTab().removeClass(this.activeClass))},old=$.fn.vcTabs,$.fn.vcTabs=Plugin,$.fn.vcTabs.Constructor=Tabs,$.fn.vcTabs.noConflict=function(){return $.fn.vcTabs=old,this},clickHandler=function(e){var $this;$this=$(this),e.preventDefault(),Plugin.call($this,"tabClick")},changeHandler=function(e){var caller;caller=$(e.target).data("vc.accordion"),"undefined"==typeof caller.getRelatedTab&&(caller.getRelatedTab=function(){var findTargets;return findTargets=function(){var $targets;return $targets=caller.getContainer().find("[data-vc-tabs]").filter(function(){var $this,tab;return $this=$(this),tab=$this.data("vc.accordion"),"undefined"==typeof tab&&$this.vcAccordion(),tab=$this.data("vc.accordion"),tab.getSelector()===caller.getSelector()})},caller.isCacheUsed()?("undefined"==typeof caller.relatedTab&&(caller.relatedTab=findTargets()),caller.relatedTab):findTargets()}),Plugin.call(caller.getRelatedTab(),e.type)},$(document).on("click.vc.tabs.data-api","[data-vc-tabs]",clickHandler),$(document).on("show.vc.accordion hide.vc.accordion",changeHandler)}(window.jQuery);
    

    I don’t know if it’s worth asking the developer for the source code so you can look into it…

    But thanks for you help so far anyway!

    • This reply was modified 9 years, 8 months ago by George.
    Plugin Author thomstark

    (@thomstark)

    Really this should be something they should fix on their end. (Not to mention the fact that they are charging money for their plugin and it is breaking other plugins.) My assumption is their javascript listener is too broad and therefore File Away’s shortcode generator is triggering their function, but it’s not finding what it needs in my code (unsurprisingly) thus leaving “caller” undefined in their function. They need to narrow the scope of their listener earlier, I assume.

    Thread Starter George

    (@quantum_leap)

    Ok, I will let them know, thanks again!

    Plugin Author thomstark

    (@thomstark)

    Yes, sir.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Clash with Visual Composer’ is closed to new replies.