0

After js merge carousels sliders are breaking in the site, followed no-conflict and other solutions, also in the console this is showing

Uncaught TypeError: jQueryowlCarousel is not a function

can you help me on this issue

  • Can you show your script for your carousel? – Shoaib Munir Jan 28 at 9:52
  • ya sure, can i give the screenshot? – Raghu Jan 28 at 9:53
  • yes, sure, please share – Shoaib Munir Jan 28 at 9:53
  • prntscr.com/md5v2l – Raghu Jan 28 at 9:54
  • no it is production – Raghu Jan 28 at 9:59
0

Uncaught TypeError: jQueryowlCarousel is not a function

This error means you called the function jQueryowlCarousel before it was defined.(Due to JS merge)

I assume you have a third party slider script and you calling it from your PHTML file.

Simple solution should work as move the slider script to the head tag of the page.

To debug the Issue:

  1. Open your merged JS file and find out the location of slider scripts where the function jQueryowlCarousel was defined and script where you calling the function. Script where you calling the function should come after the script where the function jQueryowlCarousel was defined. Or you can also check in Browser view source.

  2. Disable JS merge.

  3. Move that slider script to the head tag.

  4. Clear the cache and enable the JS merge.

  • when js is merged it is showing 3 files, jquery min is calling in one file and owl carousel file calling in another file – Raghu Jan 28 at 10:13
  • See in browser which sequence they are loading. – Akhil Gupta Jan 28 at 10:16
  • Basically the script where function not defined error showing, should be loaded after the function definition. – Akhil Gupta Jan 28 at 10:16
  • in that sequence first jquery is calling next is owlcarousel – Raghu Jan 28 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.