Closed (fixed)
Project:
Lightbox2
Version:
7.x-2.0
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Sep 2011 at 00:59 UTC
Updated:
13 Apr 2016 at 14:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
yukare commentedI just commited a fix for this, is only change the api version from 2.0 to 3.0. I did some basic testing and it works, but not a real use case, so please, try to use it and report again if it do not work or have any error.
Comment #2
swirtI'm using the September 19th 2011 version of lightbox2 7.x-1.x-dev along with views 7.x-3.0-rc1.
Upon trying to add the lightbox trigger field to a view, I am getting the same result error as the original poster.
"The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item."
Is there a solution to this?
Comment #3
yukare commentedThis is strange because i commited a fix for this (http://drupalcode.org/project/lightbox2.git/commit/ae40acd) so it is in git, but it is not in last dev, in the line 1527 of the lightbox.module file, change where is '2.0' with '3.0'.
Please make this change or get the code from git, i do now know why the last dev do not have it. I will do some others changes today and see if the next dev contains it.
Thanks.
Comment #4
swirtThanks. I will make that change and give it a try.
Comment #5
yukare commentedThis is closed on git, just wait for the next dev.
Comment #6
kappaluppa commentedAny idea when the next dev is coming out? I needed this too, but used a work around.
thx
Comment #7
Sinan Erdem commentedI am using the latest version. I checked that the API is written as 3.0. Nevertheless, the same error continues for me...
Comment #8
circuscowboy commentedI am using the latest dev as well - I even un-installed and re enabled the module
I still get the same error (the 3.0 is included in the dev)
The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.
this is with views 7.x-3.0-rc3
Comment #9
troyer commentedSame problem here, using latest Lightbox2 dev 10/13/2011, Views 7.x-3.0-rc3 and CTools 7.x-1.0-rc1.
Comment #10
leon kessler commentedThe issue is because of the new autoload functionality in D7 core. Handlers are now defined in a modules .info file and not via the hook_views_handlers().
Here's a patch to fix the problem.
Thanks
Comment #11
troyer commentedI've tested the patch, it works fine now. Only thing I had to correct was the closing curly bracket. Here's the adjusted patch from http://drupal.org/node/1271456#comment-5286170
You might have to clean the views cache to see it working.
Comment #12
troyer commentedBecause I only added one curly bracket to the patch I've tested, I'm setting the status to review & tested.
Comment #13
d_hall commentedI got the patch to work. But can't get anything to appear in the caption field. :(
Comment #14
troyer commentedCould you please file a separate issue as a support request? This is a bug report that's already reviewed and tested.
Learn more about token here: http://drupal.org/project/token
Comment #15
caligan commentedIs this still applicable to the most recent update of Views? I've applied the patch with no success - still no trigger handler available.
Comment #16
circuscowboy commentedYes - works here - did you clear cache?
Comment #17
Souvent22 commentedThe hook_views_data isn't loaded as it seems lightbox2.views.inc isn't parsed at all.
Comment #18
leon kessler commentedSouvent22 that's the problem my patch solves. Have you tried clearing your cache?
Comment #19
markhalliwellPatch in #11 worked. Please commit so the field works in Views.
Comment #20
attheshow commented#11 worked for me too.
Comment #21
stevedc commented#11 worked for me as well. Great job troyer.
Comment #22
cwithout commented#11 patch works. Thanks, troyer.
Comment #23
carn1x commentedPatch in #11 works great.
However in the Popup description for the field config it says "Combine tokens from the "Replacement patterns" below and html to create what the lightbox popup will become." however I'm not seeing any Replacement Patterns below.
Comment #24
serkuz commentedYes. The patch works.
I could figure out the replacment pattern in my case by entering the field name in brackets - e.g.: [field_content_image_1] and it works for me.
Comment #25
cmiguel commentedYes. The patch in #11 works, for me too.
Thank you
Troyer
Newbies to patching (like me), might try manually patching with a text editor such a Notepad.
This is a small patch, and is really easy to follow.
Have a look here, for some manual patching tips:
http://drupal.org/node/534548
Backup, be careful, try at testing site first. Good luck!!
Comment #26
cabita commentedThe patch #11 doesn't work for me. The field "Lightbox" in the list of view filters is not shown after the application of patch. I have tried clearing the cache. I have tried the patch on the version dev and version beta of lightbox2. I have the version of views 7.x.3.3. and drupal version is 7.14
Thanks for your help.
Comment #27
eeyorr@cabita - Are you looking in fields or filters? The lightbox trigger is a field.
I'm also not seeing replacement patterns.
Comment #28
mark@redhorseinteractive.com commentedI don't see replacement patterns either. I can open a lightbox window with nothing in it now.
Comment #29
xturgorex commentedApplied #11 on lightbox2-7.x-1.x (Janurary 1, 2012) and it works.
Comment #30
gandhiano commentedPatch #11 works here as well. Please commit.
Comment #31
jakew commentedSame problem... patch fixed it - 7.x-1.0-beta1
Comment #32
Po3t commentedI'm running 7.x-1.0-beta1 and I'm still encountering this issue. It's been over a year since this was originally reported. Can we get this patch committed to the official release yet?
Comment #33
jjjjack commentedThe patch in #11 allows the trigger to show up and work, but as others have noted, replacement patterns aren't visible. In my case, Token is installed and working fine with other modules.
Comment #34
matthew1585 commentedI got sick of wasting many hours fiddling with broken lightboxes. I found most of them aren't compatible with many browsers anyways. This one works in every browser I've used: jQuery Combo Pack. It's also super lightweight and fast.
Comment #35
kentjames1980 commentedCan this pleaseeeeeeeeeeee be fixed and committed, I need my lightbox working with views so I can attempt to attach it to node gallery!
The more I try to get on with D7 the more frustrated I get and wondering why I bothered
Comment #36
nally commentedComment #37
freebug commentedThe patch from #11 worked for me.
After replying the patch, do not forget to clear the cache.
One more thing, if the replacement tokens do not appear, get it from the field added above this field in the view.
Thanks
Comment #38
bshaddad commented+1
Comment #39
rdrh555 commentedUsing Lightbox2 7.x-1.0-beta1 and Views 7.x-3.6 and got the same error as original poster. Patch #11 works for me.
Comment #40
milekium commented+1 Patch #11 fix also for me. thanks
Comment #41
kapis commentedpatch works but I'm not seeing the image in views. Am i missing something?
Comment #42
scottzee commentedPatch worked (thanks!), but the replacement patterns don't appear.
When I try to add them based on the other fields ([title], say, for the caption), nothing happens at all.
Any ideas, anyone?
Comment #43
TomasBru commentedWhat exactly should I change manually if I don't have the possibility to apply the patch? Thanks.
Comment #44
Sinan Erdem commented@TomasBru, just remove the lines with - sign and add the lines with + sign to the relevant files (do not add + in front of the new lines). Each relevant file is indicated on the lines like this:
diff --git a/lightbox2.info b/lightbox2.info
(Patch on comment #11 has two files to edit)
Comment #45
yukare commentedThanks to everyone, and to troyer by this path.
It is commited now: http://drupalcode.org/project/lightbox2.git/commit/14275a5
I plan a stable release next weekend so please test the current dev, as there are some other changes on it.
Comment #47
saurabh.arya commentedHi Yukare,
Please release the stable version.
Comment #48
kentjames1980 commented+ 1 for the stable release version, Ive got a website that needs lightbox and I cannot make it work!
Comment #49
hwasem commentedReopening as this seems to have gotten auto-closed. I just installed the latest dev and had to patch with #11 to get it to work.
The replacement patterns, however, are still not showing up. I was able to get them from opening a different field and copying/pasting the patterns from that field. Would be nice if it was included in the same screen.
Comment #50
yukare commentedPlease, are you sure about it not working with latest dev? Because we comited another change and it was working with views in a very improved way than this patch does. Please tell me the version you have(you can see it on lightbox.info file).
Comment #51
hwasem commentedThanks so much for your quick reply.
My apologies. I thought I was using the dev, but I was using the beta. It is working without the patch with views on dev. I'm still not seeing the replacement patterns. Should they be there?
Do you have an ETA on the full release of the module?
Comment #52
vwX commentedAttached is a patch that adds replacement patterns, borrowed from colorbox module. It also fixes the trigger to work correctly with grouping.
To get the trigger to work:
1. Define two fields in your view, one for the thumbnail and one for the original. Hide these fields from display. Formatter should be image, not lightbox2.
2. On the lightbox trigger, make sure it is set to display. Point the trigger field to the thumbnail and in the popup add the replacement pattern for the original image.
3. If you want a custom group, set the custom lightbox group.
4. Save your view.
Comment #53
freebug commentedLook at the comment
https://drupal.org/node/1271456#comment-7128948
Comment #54
zerobyte commentedThe patch #52 finally made the replacement patterns available and Lightbox2 works now.
The only problem I'm seeing after applying this patch is that I'm getting an error message:
Notice: Undefined offset: 1 in lightbox2_handler_field_lightbox2->render() (line 189 of /var/www/sites/all/modules/contrib/lightbox2/lightbox2_handler_field_lightbox2.inc).Line 189 shows this piece of new code that was added as part of the patch:
$imgsrc = $matches[1];Anyone have any idea why I might be getting this error?
Comment #55
swirtI am not sure what would be causing $matches[1] to be non-existent but its use is making an unsafe assumption.
could be made assumption proof by
Comment #58
joseph.olstadfixed in 7.x-2.0
if you want this fix then please upgrade to 7.x-2.0
Comment #59
joseph.olstad