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(
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | fancybox.diff | 968 bytes | maximiliam |
Comments
Comment #1
maximiliam commentedComment #2
bas.hr commentedPatch applied. Thanks
Comment #4
BenK commentedKeeping track of this thread...