I'm wondering if anybody has gotten the 6.x version of this to work properly for Drupal 6 CCK/Imagefield/Imagecache? When I enable it, I get the correct list of display formatters for a field, but when I select any of the Lightbox2 options, the field simply disappears.

I can't be certain this is a bug, but looking at hook_theme, none of the dynamic themes (one for each imagecache preset combination etc) are defined, and the formatter names are of the form

lightbox2][medium][original

which then defines #theme of the form:

 lightbox2_formatter_lightbox2][medium][original

which then get passed into drupal_render via content.module as:

        // Append formatter information either on each item ('single-value' formatter)
        // or at the upper 'items' level ('multiple-value' formatter)
        $format_info = array(
          '#theme' => $theme,
          '#field_name' => $field['field_name'],
          '#type_name' => $node->type,
          '#formatter' => $formatter_name,
          '#node' => $node,
        );

Any help would be much appreciated.

Cheers,
Jonathan

CommentFileSizeAuthor
#15 lightbox2.png21.72 KBpetrovichby
#11 Picture 1.png23.18 KBcapellic
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stella’s picture

Status: Active » Fixed

There isn't a D6 version of the imagefield module yet. When there is, some changes will obviously be required to the lightbox2 module to account for the changes in the API. Until then, this feature can not be used or supported.

Cheers,
Stella

jhedstrom’s picture

For what it's worth, the conflicts are less with imagefield (which is in 6 in cvs head) than with the way cck handles formatters, and the way core handles theme functions.

stella’s picture

Not sure what you mean by that. However, the latest dev version of lightbox2 should work with the filefield module - though I've just found out that its api has changed in the last few days, so that may not be necessarily true any more... This is why I want to wait for stable versions!

Cheers,
Stella

jhedstrom’s picture

This is why I want to wait for stable versions!

Indeed :)

I mainly just wanted to make sure I wasn't just doing something wrong in my setup...which you addressed in #1.

ugerhard’s picture

Status: Fixed » Active

It looks to me as if the current CCK 2 doesn't use hook_field_formatter() anymore at all, just hook_field_formatter_info() and theme_-functions.

The hook is still present in the example fields, but not anywhere else in cck as far as I can see.

stella’s picture

Status: Active » Postponed

Yes, and once there's a stable D6 version of the imagefield module I will update lightbox2 to work with it. Until then, I'm marking this issue as postponed.

stella’s picture

Category: support » feature
Status: Postponed » Fixed

Implemented in the latest dev release, available later today.

Cheers,
Stella

freshaspect’s picture

Fantastic news. I have a project all good to go to test this as soon as the release is out.

jhedstrom’s picture

Awesome. Thanks Stella.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

capellic’s picture

Status: Closed (fixed) » Active
FileSize
23.18 KB

I just upgraded to the latest alpha versions of FileField (6.x-3.0-alpha4) and ImageField (6.x-3.0-alpha2) and I don't see Lightbox options in my Display Fields. I am wondering if something has changed in the newest versions of these modules that broke something?

To be clear, I didn't have it working before the upgrade - I hadn't tried until now which happened to be after the latest release of FileField and ImageField on August 27.

Thanks!!!!

stella’s picture

Are you using the latest 6.x dev version of lightbox2?

capellic’s picture

Status: Active » Closed (fixed)

May this be a lesson to anybody coding well past their bedtime. It should have occurred to me to use the dev version, but I was using the official release. Sorry for wasting your time --- and thanks for the immediate response.

stella’s picture

I do plan on releasing an official version very very soon. I just haven't had the time to focus on lightbox2 in the last couple of weeks, what with preparing for my Drupalcon presentations and being here in Szeged too. So gimme a couple of weeks and fingers crossed I'll have an official release made.

Cheers,
Stella

petrovichby’s picture

FileSize
21.72 KB

I use latest versions of Lightbox2, imagecache, imagefield and cck.
Currently, I'm able to see Lightbox2 settings at Display fields page (see attachment), but the resulting node with images is empty :(

stella’s picture

petrovichby: please open a new issue for your problem. However first check it's not the same issue as posted at #309464: Drupal 6.x - no option for lightbox2 in CCK "display fields" which is still open.

petrovichby’s picture

stella, I've opened the new issue http://drupal.org/node/314173, because in my case I do able to see Lighbox2 options at Display fields page.

Francewhoa’s picture

Thanks stella. I installed the dev version and it's working fine now. I installed Lightbox2 dev version 6.x-1.x-dev (2008-Sep-06).

I had the same issue with Lightbox2 version 6.x-1.8 (2008-Jun-29). I get the correct list of display formatters for a CCK field (for both 'teaser' and 'full-page mode'), but the images aren't displaying in the page.

I found a workaround if the Lightbox2 list of display formatters for a CCK field aren't showing. I open ALL lightbox2 settings page, change nothing and click SAVE button. Same thing for CCK just open ALL CCK field settings page and click SAVE button. Works for me.

kirilius’s picture

This issue is closed but I still have the described problem. Can it be reopened again?

stella’s picture

kirilius: have you tried the latest dev release? and cleared your Drupal and browser cache? If so and it's still not working, please open a new issue.

Bevan’s picture

gagarine’s picture

Status: Closed (fixed) » Active

With 6.x-1.x-dev 2009-Jan-05 I get the correct list of display formatters for a CCK field (for both 'teaser' and 'full-page mode'), but the images aren't displaying in the page.

gagarine’s picture

Status: Active » Closed (fixed)

OK i juste clear drupal cach (like you say in comment #20, sorry...) and all work good. Perhaps is good that tickbox automatically clear the cache if is needen no? And certenly not all the cach need to bee cleared.

stella’s picture

Status: Closed (fixed) » Fixed

gagarine: you probably just need to clear your Drupal cache. If you don't have the devel module installed, the easiest way to ensure this gets done is by running update.php. After clearing the cache, you may need to resave your CCK display settings.

Cheers,
Stella

stella’s picture

Status: Fixed » Closed (fixed)

It won't be an issue once the next release is made, later this week. The dev version is stable, but if you have time, please test it and report back any problems you find asap.

Cheers,
Stella

stella’s picture

Released in Lightbox2 6.x-1.9 and 5.x-2.9.

Cheers,
Stella

medlife’s picture

Title: Drupal 6, Lightbox2, imagecache, imagefield and cck issue » Drupal 6.16, Lightbox2, imagecache, imagefield and cck issue
Version: 6.x-1.x-dev » 6.x-1.9

I just upgraded from 6.15 to drupal 6.16. In the process I also updated my lightbox2 from the 6.x-1.x dev to security patch 6.x-1.9 for security issues. I have cck 2.6 and the latest version of imagecache, imagefiled, filefield etc. I am also using ddblock version 6.x-1.0-rc6. After upgrade my lightbox2 doesn't work. If I keep the module enabled, it impacts ddblock as well and that won't work as a result.

Any insights? Should I go back to the dev version?

thanks for help!