• Hello,

    Thank you for creating such a quality plugin.
    I recently went to pagespeed for testing, and saw that there is an error that comes from Easy Tabel of Contents:
    ReferenceError: jQuery is not defined at https://mydomain.com/wp-content/plugins/easy-table-of-contents/assets/js/front.min.js?ver=2.0.56.1-1696873727:1:1

    May I ask how to solve it?
    I m using WP Rocket, and i have already excluded the /easy-table-of-contents/assets/js/front.min.js to be miniflied / defered / delayed, but it is still not working.

    Thank you.

    jQuery(function(t){if("undefined"!=typeof ezTOC){function e(){if(0!==t(".ez-toc-widget-container.ez-toc-affix").length){var e=30;void 0!==ezTOC.scroll_offset&&(e=parseInt(ezTOC.scroll_offset)),t(ezTOC.affixSelector).stick_in_parent({inner_scrolling:!1,offset_top:e})}if(t.fn.shrinkTOCWidth=function(){t(this).css({width:"auto",display:"table"}),/MSIE 7\./.test(navigator.userAgent)&&t(this).css("width","")},void 0!==ezTOC.visibility_hide_by_default){var i=t(".ez-toc-toggle:not(.ez-toc-loaded),.ez-toc-widget-sticky-toggle:not(.ez-toc-loaded)"),o=ezTOC.visibility_hide_by_default;t.each(i,function(e,i){var c=t(this);t(c).addClass("ez-toc-loaded");var a=t(c).parents("#ez-toc-container,#ez-toc-widget-container,#ez-toc-widget-sticky-container").find("ul.ez-toc-list,ul.ez-toc-widget-sticky-list");t(a).hasClass("eztoc-toggle-hide-by-default")&&(o=1),Cookies?(1==Cookies.get("ezTOC_hidetoc-"+e)?t(c).data("visible",!1):t(c).data("visible",!0),Cookies.remove("ezTOC_hidetoc-"+e)):(t(c).data("visible",!0),Cookies.remove("ezTOC_hidetoc-"+e)),o&&t(c).data("visible",!1),t(c).data("visible")||a.hide(),t(c).on("click",function(i){i.preventDefault();let c=document.querySelector("#ez-toc-container");if(c)c.classList.toggle("toc_close");else{let s=document.querySelector(".ez-toc-widget-container,.ez-toc-widget-sticky-container");s.classList.toggle("toc_close")}t(this).data("visible")?(t(this).data("visible",!1),Cookies&&(o?Cookies.set("ezTOC_hidetoc-"+e,null,{path:"/"}):Cookies.set("ezTOC_hidetoc-"+e,"1",{expires:30,path:"/"})),a.hide("fast")):(t(this).data("visible",!0),Cookies&&(o?Cookies.set("ezTOC_hidetoc-"+e,"1",{expires:30,path:"/"}):Cookies.set("ezTOC_hidetoc-"+e,null,{path:"/"})),a.show("fast"))})})}var c,a,s,l=t("span.ez-toc-section").toArray(),n=(c=l,c.reduce(function(e,i){var o;return e[i.id]=t('.ez-toc-widget-container .ez-toc-list a[href="#'+t(o=i).attr("id")+'"]'),e},{})),r=t.map(n,function(t,e){return t}),d=(a=5,void 0!==ezTOC.smooth_scroll&&1===parseInt(ezTOC.smooth_scroll)&&(a=void 0!==ezTOC.scroll_offset?parseInt(ezTOC.scroll_offset):30),s=t("#wpadminbar"),s.length&&(a+=s.height()),a);function h(){var e,i,o,c,a,s=(e=d,i=l,o=t(window).scrollTop()+e+1,c=i[0],a=o-t(c).offset().top,i.forEach(function(e){var i=o-t(e).offset().top;i>0&&i<a&&(a=i,c=e)}),c);if(s){var h,f,g,z,v,u,p,b,$,w=n[s.id];(function t(e,i){i.forEach(function(t){e!==t&&t.parent().hasClass("active")&&t.parent().removeClass("active")})})(w,r),(g=(h=w).parent()).hasClass("active")||g.addClass("active"),$=(z=f=g,v=t(z),u=v.html(),v.parent().append('<li id="ez-toc-height-test" class="active">'+u+"</li>"),p=t("#ez-toc-height-test"),b=p.height(),p.remove(),b-(v.children("ul").first().height()||0)),t(".ez-toc-widget-container ul.ez-toc-list li.active").css("height",$+"px")}}function f(){t(window).off("load resize scroll",h)}l.length>0&&t(".ez-toc-widget-container").length&&t(window).on("load resize scroll",h)}t("#ez-toc-container").length&&!t("#ez-toc-container .ez-toc-toggle label span").html()&&t("#ez-toc-container .ez-toc-toggle label").html(ezTOC.fallbackIcon),ezTOC.init=function(){e()},e()}});
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Magazine3

    (@magazine3)

    Hi, thanks for reaching out to us. We have investigated the issue and it appears that this problem is caused by a conflict with another plugin. This conflict affects the main library file and leads to the removal of “/easy-table-of-contents/assets/js/front.min.js” from the plugin. Please try to correct this file, and if it doesn’t resolve the issue, make necessary corrections that were not currently exclude.

    Plugin Author Magazine3

    (@magazine3)

    Hi, we are marking this ticket as resolved due to inactivity. Please feel free to reach out to us if you have any concerns by creating a new thread. We will be happy to assist you there.

    Thread Starter ensonc

    (@ensonc)

    Hello,

    Thanks for getting back.

    May I know which plugin is conflict?with Easy table of Contents? And what do you mean “correct this file”?

    Thank you.

    Plugin Author Magazine3

    (@magazine3)

    Hi, please update the plugin once with the latest version 2.0.62 and clear the cache once. If the issue remains the same let us know.

    Thread Starter ensonc

    (@ensonc)

    @magazine3 Hello, I have updated the plugin and cleared the cache, and the issue remains.

    Plugin Author Magazine3

    (@magazine3)

    Hi, Could you please share the URL once on which you are facing this issue, so we can check on our end?

    Thread Starter ensonc

    (@ensonc)

    @magazine3

    Hello,

    Here is the URL

    Thank you.

    Plugin Author Magazine3

    (@magazine3)

    Hi, We have checked on our end but found no errors as you mentioned. You can see this in the screenshot attached: https://paste.pics/QF1VF, Kindly clear the cache on your side and recheck.

    If the issue persists, please let us know how you are checking those errors on your end. Kindly share a short video so we can follow the same steps to identify the issue.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘ReferenceError: jQuery is not defined’ is closed to new replies.