The reason for this bug is that the value to $style_name is '0' when no preset is used.
This bug is is fixed by using the uri to the item directly when the value to $style_name is '0'.

Here is my patch for it:

--- fancybox.module
+++ fancybox.module

@@ -514,11 +514,16 @@

//$href_uri = 'public://styles/fancybox/' . $item['filename'];
$style_name = isset($settings['imagefield']['imagecache_preset']) ? $settings['imagefield']['imagecache_preset'] : 0;
- $style_path = image_style_path($style_name, $item['uri']);
- if (!file_exists($style_path)) {
- $style_path = image_style_url($style_name, $item['uri']);
+ if ($style_name) {
+ $style_path = image_style_path($style_name, $item['uri']);
+ if (!file_exists($style_path)) {
+ $style_path = image_style_url($style_name, $item['uri']);
+ }
+ $variables['path'] = file_create_url($style_path);
+ }
+ else {
+ $style_path = file_create_url($item['uri']);
}
- $variables['path'] = file_create_url($style_path);
$href = file_create_url($style_path);

$element[$delta] = array(

CommentFileSizeAuthor
#1 fancybox.diff968 bytesmaximiliam

Comments

maximiliam’s picture

StatusFileSize
new968 bytes
bas.hr’s picture

Status: Active » Fixed

Patch applied. Thanks

Status: Fixed » Closed (fixed)

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

BenK’s picture

Keeping track of this thread...