Latest dev, jquery 1.7.1, this error:

Chrome:

Uncaught TypeError: Cannot call method 'data' of undefined VM36173:1
r.logIn VM36173:1
r.loadContent VM36173:1
r.init VM36173:1
(anonymous function) VM36173:1
e.extend.each jquery.min.js?v=1.7.1:2
e.fn.e.each jquery.min.js?v=1.7.1:2
e.fn.owlCarousel VM36173:1
Drupal.behaviors.owlcarousel.attach owlcarousel.settings.js?n2khfv:27
(anonymous function) drupal.js?n2khfv:76
e.extend.each jquery.min.js?v=1.7.1:2
Drupal.attachBehaviors drupal.js?n2khfv:74
(anonymous function) drupal.js?n2khfv:412
n jquery.min.js?v=1.7.1:2
o.fireWith jquery.min.js?v=1.7.1:2
e.extend.ready jquery.min.js?v=1.7.1:2
c.addEventListener.B

Safari:
TypeError: 'undefined' is not an object (evaluating 'e.$elem.data("owl-originalStyles",e.$elem.attr("style")).data')

There's no visible output at all.

Switching to jquery 1.8 solves the problem with Owl Carousel, but leads to some other issues, so I'm not sure what to do.

Comments

swim’s picture

Hey Scoff,

have a read of this issue, https://drupal.org/node/2179577. jQuery plugins with higher version requirements always need a little bit of a push.

scoff’s picture

Yes, thank you, I'm aware of that solution and have used it on one site. I just wanted to clarify if jquery 1.8+ is a requirement now or something can be done to make it work with 1.7. From the docs — "Load jQuery(1.7+) and include Owl Carousel plugin files".

swim’s picture

Het Scoff,

no jQuery 1.8 is not a requirement; I have a number of sites which are running 1.7 with Owl Carousel just fine. The issue which jQuery 1.7.1 encounters is documented here https://github.com/OwlFonk/OwlCarousel/issues/169 & https://github.com/OwlFonk/OwlCarousel/pull/210

Thanks @ ryancastle for posting the issue.

SdP’s picture

I've the same issue:
With jquery 1.7.1 doesn't work, 1.8.2 does
I've modified the JS as suggested by swim
https://github.com/OwlFonk/OwlCarousel/pull/197/files
with the sare result: it doesn't work until I switch to jquery 1.8.2

Error:
Uncaught TypeError: Cannot call method 'data' of undefined VM1241:1
r.logIn VM1241:1
r.loadContent VM1241:1
r.init VM1241:1
(anonymous function) VM1241:1
jQuery.extend.each jquery.js?v=1.7.1:658
jQuery.fn.jQuery.each jquery.js?v=1.7.1:271
e.fn.owlCarousel VM1241:1
Drupal.behaviors.owlcarousel.attach owlcarousel.settings.js?n2s70r:27
(anonymous function) drupal.js?n2s70r:76
jQuery.extend.each jquery.js?v=1.7.1:652
Drupal.attachBehaviors drupal.js?n2s70r:74
(anonymous function) drupal.js?n2s70r:412
fire jquery.js?v=1.7.1:1046
self.fireWith jquery.js?v=1.7.1:1164
jQuery.extend.ready jquery.js?v=1.7.1:435
DOMContentLoaded
swim’s picture

Status: Active » Closed (works as designed)

The data attribute bug is certainly annoying but it's not something we can fix from the module end.

arruk’s picture

I'm getting "The installed jQuery version is not supported by Owl Carousel." I have jQuery 1.10.2 installed. Should I reopen this ticket or create a new one?

ekkljs’s picture

same problem. "The installed jQuery version is not supported by Owl Carousel." with jQuery 1.10.2