Normally, I would not alter an outside library. However, seeing as how the version of jcarousel is so outdated, I feel like this modules jcarousel js is almost at the point of being its own thing.

The javascript exception that is thrown, warning of an infinite loop, is pointless. The error it is trying to prevent does not happen in any modern browsers. However, the exception it throws does break js in all modern browsers. I suggest we just remove it. In my case, it is breaking my panels pages admin panel, and for no reason.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mrmikedewolf’s picture

Don't use this actually. I'm re-working it.

mrmikedewolf’s picture

mrmikedewolf’s picture

Here is a better one. Instead of throwing the exception and cancelling the show, we'll set the width to a fallback. Keep in mind, I am not patching the minified js. This makes makes future patches fail because it is all one line. You will have to minify the js yourself. I'm not sure of any ways around this.

mrmikedewolf’s picture

If any one knows of a more elegant workaround to the minification issue, I would love to hear it. There's always something to learn.

Until then here is an option to minify once applying the patch.

jscompress.com/

markpavlitski’s picture

Version: 7.x-2.6 » 7.x-2.x-dev
Assigned: mrmikedewolf » Unassigned
Status: Active » Needs review
Issue tags: -jcarousel, -infinite loops, -JavaScript, -exception

jcarousel.js (and jcarousel.min.js) are patched in the latest stable release to fix other outstanding bugs, so I'm open to it for this issue too, once it's RTBC.