I started getting this error when i tried to change the ImageCache preset under the Imagefield Module section:
Property 'onStart' of object #<Object> is not a function
The error occurs when trying to utilize fancybox after changing the settings, I get this error when clicking on an image.
Resetting the settings to default removes the error, but trying to set the ImageCache preset again will reproduce the error.

I'm using jQuery 1.4.4 with fancybox 1.3.4.

The readme recommends 1.3.1, perhaps this is the source of the issue. I'm going to try switching to that version and see if it fixes this issue.

Comments

shixish’s picture

Priority: Major » Minor

Going to 1.3.1 solved the crashing problem but it appears that the ImageCache setting has no effect on the image being displayed (it's still showing the original image).

pzerimars’s picture

StatusFileSize
new436 bytes

Just bumped into this problem myself. Here's a patch to fix the Property 'onStart' of object #<Object> is not a function error against 6.x-1.x-dev.

Edit: Please note, this is for version 6.x-1.x-dev. I didn't notice this issue was for 7.x-1.x-dev. Appropriate patch for 7.x-1.x-dev may be found below.

Andrew Schulman’s picture

I also have this problem, with fancybox 1.3.4.

pzerimars, I'm confused by your patch - it doesn't apply to fancybox-7.x-1.x-dev of 2011-Feb-25. Is it supposed to patch sites/all/modules/fancybox/js/fancybox.js?

pzerimars’s picture

StatusFileSize
new551 bytes

Sorry about that. Didn't see this was for 7.x-1.x-dev.

Here's a patch for this version. It's a module patch instead of a javascript patch. It strips out the empty option values before they get added javascript.

Andrew Schulman’s picture

Priority: Minor » Normal

pzerimars, thanks. I applied your patch, and the 'onStart' error has gone away. But, now when I click on an image, all I get is a popup that says: "The requested content cannot be loaded. Please try again later." Is this part of the same problem, or a different problem? Caused by the patch?

Javascript console and Apache error log are both empty after I get this message.

Andrew Schulman’s picture

Nevermind about the "requested content cannot be loaded" - it was caused by a bad jQuery selector. The module doesn't tell you anything about what should be selected, so you're more likely to get it wrong than right, but that's a separate bug.

bas.hr’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.