Conversation
supportHi there, I’m experiencing a critical JavaScript issue on mobile view that appears to be related to the TEC Slider plugin. Here’s the main error from the console: Uncaught RangeError: Maximum call stack size exceeded at String.replace (<anonymous>) at jQuery functions (jquery.min.js / jquery-migrate.min.js) at cleanUpEvents (tecslider/assets/slick/slick.min.js) This seems to be a recursive loop triggered by an interaction between jQuery (v3.7.1), jQuery Migrate (v3.4.1), and the version of Slick bundled with TEC Slider. The error only happens on mobile. Could you please confirm: Is this a known issue? Is TEC Slider compatible with the latest jQuery versions? Any advice on preventing the mobile JS error ? Thanks in advance for your help!
Hi, Thanks again for reporting this and sharing the details! This kind of error can sometimes be environment-specific — especially with different themes, plugins, or how the slider is loaded. To help us recreate and resolve the issue more effectively, could you please share any of the following: A link to the page where you’re using the slider, or A quick note about your theme, page builder (if any), and whether the slider is inside a tab, popup, or lazy-loaded section The steps that lead to the error (e.g., on load, after interaction, etc.) This will really help us debug it more accurately and provide a fix. Appreciate your help! Best regards, mywptrek
Step to reproduce: -go to https://www.moulinblanchard.com/ -activate mobile view -wait a few second The slider is on the homepage, i have some plugin use for lazy loading and optimization. I use wordpress 6.7.2. My theme is twenty twenty-four.
Hi, Thanks again for providing more info. From what I’ve seen so far, the issue might be related to a lazy load setup on your site. Could you please let me know which lazy load plugin or method you are using? I’d like to recreate a similar setup on my end to find a proper solution for you. Appreciate the help! Best, mywptrek
I only see two plugins installed that can do lazy loading: https://fr.wordpress.org/plugins/wp-fastest-cache/ https://fr.wordpress.org/plugins/autoptimize/ We did not make any advanced configuration settings, we pretty much used the default conf. Edit: I tried to desactivate the option “optimise javascript” in the plugin Autoptimize. I also trun off the wp-fastest-cache. I can now display the homepage correctly in chrome mobile but not in firefox mobile view. The new error i see in the console is : jquery.min.js?ver=3.7.1:2 Uncaught TypeError: Cannot read properties of null (reading ‘width’) at e.setDimensions (slick.min.js?ver=2.4.2:1:29337) at e.setPosition (slick.min.js?ver=2.4.2:1:31314) at HTMLDocument.i (jquery.min.js?ver=3.7.1:2:86755) at e (jquery.min.js?ver=3.7.1:2:27028) at t (jquery.min.js?ver=3.7.1:2:27330) You just have to go on the site to check this. This reply was modified 1 year, 2 months ago by hecdev . This reply was modified 1 year, 2 months ago by hecdev .
Hi, Thanks again for the info! It seems like our slider initialization script might be running before the slider elements are fully available in your layout — possibly due to lazy loading or a layout shift. If you’re comfortable making a small edit, you can try this temporary fix: In the file: includes/class-tecslider-function.php Around line 939 , inside the inline script that begins like this: <script id="tecsb-slider-block-inline-j" type="text/javascript"> Add this line right after the opening <script id="tecsb-slider-block-inline-j" type="text/javascript" > tag : window.addEventListener('load', function () { Then, around line 1159 , just before the closing </script> tag, add: }); This will delay the script until the full page — including images and any lazy-loaded elements — is fully loaded. Let me know if this resolves the issue on your end. Since I wasn’t able to reproduce the problem locally, this will help us test further. Best regards, mywptrek
Hi, Thanks again for reporting this and sharing the details! This kind of error can sometimes be environment-specific — especially with different themes, plugins, or how the slider is loaded. To help us recreate and resolve the issue more effectively, could you please share any of the following: A link to the page where you’re using the slider, or A quick note about your theme, page builder (if any), and whether the slider is inside a tab, popup, or lazy-loaded section The steps that lead to the error (e.g., on load, after interaction, etc.) This will really help us debug it more accurately and provide a fix. Appreciate your help! Best regards, mywptrek
Step to reproduce: -go to https://www.moulinblanchard.com/ -activate mobile view -wait a few second The slider is on the homepage, i have some plugin use for lazy loading and optimization. I use wordpress 6.7.2. My theme is twenty twenty-four.
Hi, Thanks again for providing more info. From what I’ve seen so far, the issue might be related to a lazy load setup on your site. Could you please let me know which lazy load plugin or method you are using? I’d like to recreate a similar setup on my end to find a proper solution for you. Appreciate the help! Best, mywptrek
I only see two plugins installed that can do lazy loading: https://fr.wordpress.org/plugins/wp-fastest-cache/ https://fr.wordpress.org/plugins/autoptimize/ We did not make any advanced configuration settings, we pretty much used the default conf. Edit: I tried to desactivate the option “optimise javascript” in the plugin Autoptimize. I also trun off the wp-fastest-cache. I can now display the homepage correctly in chrome mobile but not in firefox mobile view. The new error i see in the console is : jquery.min.js?ver=3.7.1:2 Uncaught TypeError: Cannot read properties of null (reading ‘width’) at e.setDimensions (slick.min.js?ver=2.4.2:1:29337) at e.setPosition (slick.min.js?ver=2.4.2:1:31314) at HTMLDocument.i (jquery.min.js?ver=3.7.1:2:86755) at e (jquery.min.js?ver=3.7.1:2:27028) at t (jquery.min.js?ver=3.7.1:2:27330) You just have to go on the site to check this. This reply was modified 1 year, 2 months ago by hecdev . This reply was modified 1 year, 2 months ago by hecdev .
Hi, Thanks again for the info! It seems like our slider initialization script might be running before the slider elements are fully available in your layout — possibly due to lazy loading or a layout shift. If you’re comfortable making a small edit, you can try this temporary fix: In the file: includes/class-tecslider-function.php Around line 939 , inside the inline script that begins like this: <script id="tecsb-slider-block-inline-j" type="text/javascript"> Add this line right after the opening <script id="tecsb-slider-block-inline-j" type="text/javascript" > tag : window.addEventListener('load', function () { Then, around line 1159 , just before the closing </script> tag, add: }); This will delay the script until the full page — including images and any lazy-loaded elements — is fully loaded. Let me know if this resolves the issue on your end. Since I wasn’t able to reproduce the problem locally, this will help us test further. Best regards, mywptrek