Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm using lightbox 2, imagecache and default image option in cck imagefield. Everything works perfectly until i try to show default image, if user doesn't post his, in created preview (views). I managed somehow to avoid "broken link" picture, but now it show only empty space. I'm using table view with multiple nodes, each of them can have 2 pictures. It's easier to explain if i show you picture :) Thank you for this module.
Comment | File | Size | Author |
---|---|---|---|
#8 | lightbox2_198760.patch | 1.17 KB | stella |
#6 | lightbox2_198760.patch | 1.13 KB | stella |
#4 | lightbox2_198760.patch | 1.62 KB | stella |
empty field.JPG | 10.35 KB | baja_tz |
Comments
Comment #1
baja_tz CreditAttribution: baja_tz commentedSorry but this might be issue for imagefield?
Comment #2
stella CreditAttribution: stella commentedI'd need to see the page source in order to know what's happening. Is this a public site?
You mention it may be an issue with the imagefield module - does it work if you disable the lightbox module?
Cheers,
Stella
Comment #3
baja_tz CreditAttribution: baja_tz commentedI didn't disable lightbox but I tried other options for image in my view (default, thumbnail...) without using lightbox and it doesn't work.
When viewing full node it works with lightbox, so i suppose it's not lightbox. Btw. I had to change some code to avoid broken link image when using default image, if you want to see this, it might be usefull for you: http://drupal.org/node/180592#comment-650042 and http://drupal.org/node/198311. Thank's for your answer.
Cheers,
Sasa
Comment #4
stella CreditAttribution: stella commentedHi,
I've created a similar patch to the provided at #198311. Please use the attached patch or the latest dev release (should be available later today). If this doesn't resolve the issue, then I will need to see the page source.
Cheers,
Stella
Comment #5
baja_tz CreditAttribution: baja_tz commentedIt doesn't. I think that you made some typos in your patch. It should be:
return theme('imagefield_image_imagecache_lightbox2', $namespace, $field, $item);
not
return theme('imagefield_image_imagecache_lightbox2', $namespace, $field, $filepath, $item, $item['alt'], $item['title']);
there is not point to pass $filepath value to your theme because $filepath variable is not set in theme declaration.
function theme_imagefield_image_imagecache_lightbox2($namespace, $field, $item, $attributes = NULL)
.With excluded (commented)
$item = array_merge($item, $file);
there is no "Text for Node Link" on the bottom of the image. On live site i'm using "v 1.16.2.17.2.17" but i tried newer versions on my localhost and there is no differencies except some minor issues i didn't like so i choosed older version. anyway this is what i've done:There is no differencies even if i don't change theme function but i did it because i think it will be important once when this issue with imagefield will be solved. I installed thickbox to check how it works and everything is same. For further explanation please check isuue that i've posted on imagefield: http://drupal.org/node/199647.
I'll sent you address and login for site to check page source. Thank you for your patience.
Comment #6
stella CreditAttribution: stella commentedAttached is a fixed version of the patch.
Comment #7
baja_tz CreditAttribution: baja_tz commentedThere is no "Text for Node Link (view image details)" on the bottom of the image without $item = array_merge($item, $file);
I put
$item = array_merge($item, (array)$file);
and it works without throwing error "array_merge() [function.array-merge]: Argument #2 is not an array in..." when using lightbox2 for images in full node preview.
Comment #8
stella CreditAttribution: stella commentedWould you mind trying out the attached patch? Thanks for helping me test this.
Cheers,
Stella
Comment #9
baja_tz CreditAttribution: baja_tz commentedI already have that so i can tell you that it works...for now :) I've sent you address and login on my site via your contact so if you want to see ... but i'm sure it's imagefield issue. I can't get that default image on my view, as I said when viewing full node it works with imagecache and lightbox now.
Comment #10
stella CreditAttribution: stella commentedComment #11
stella CreditAttribution: stella commentedReleased in Lightbox V2 5.x-2.2.
Cheers,
Stella
Comment #12
(not verified) CreditAttribution: commentedAutomatically closed -- issue fixed for two weeks with no activity.