Drupal 6, Lightbox2, imagecache, imagefield and cck issue

jhedstrom - July 17, 2008 - 00:26
Project:Lightbox2
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

#1

stella - July 17, 2008 - 09:24
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

#2

jhedstrom - July 17, 2008 - 15:34

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.

#3

stella - July 17, 2008 - 16:08

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

#4

jhedstrom - July 17, 2008 - 16:36

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.

#5

ugerhard - July 31, 2008 - 13:27
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.

#6

stella - August 3, 2008 - 19:29
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.

#7

stella - August 8, 2008 - 13:45
Category:support request» feature request
Status:postponed» fixed

Implemented in the latest dev release, available later today.

Cheers,
Stella

#8

freshaspect - August 8, 2008 - 16:08

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

#9

jhedstrom - August 8, 2008 - 16:08

Awesome. Thanks Stella.

#10

Anonymous (not verified) - August 22, 2008 - 16:14
Status:fixed» closed

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

#11

capellic - August 30, 2008 - 06:36
Status:closed» active

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!!!!

AttachmentSize
Picture 1.png 23.18 KB

#12

stella - August 30, 2008 - 07:21

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

#13

capellic - August 30, 2008 - 14:32
Status:active» closed

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.

#14

stella - August 30, 2008 - 16:20

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

#15

petrovichby - September 26, 2008 - 13:15

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 :(

AttachmentSize
lightbox2.png 21.72 KB

#16

stella - September 26, 2008 - 13:18

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.

#17

petrovichby - September 27, 2008 - 12:38

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.

#18

Onopoc - October 1, 2008 - 16:48

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.

#19

kirilius - October 21, 2008 - 19:40

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

#20

stella - October 22, 2008 - 11:33

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.

#21

Bevan - December 2, 2008 - 22:41

#22

gagarine - January 5, 2009 - 16:41
Status:closed» 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.

#23

gagarine - January 5, 2009 - 16:50
Status:active» closed

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.

#24

stella - January 5, 2009 - 16:50
Status:closed» 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

#25

stella - January 5, 2009 - 16:52
Status:fixed» closed

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

#26

stella - January 8, 2009 - 14:07

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

Cheers,
Stella

 
 

Drupal is a registered trademark of Dries Buytaert.