Thickbox printing curious <img>-tag instead of title of image
edadasiewicz - September 1, 2009 - 23:21
| Project: | Image |
| Version: | 6.x-1.x-dev |
| Component: | image_gallery |
| Category: | support request |
| Priority: | normal |
| Assigned: | alanburke |
| Status: | needs work |
Description
I upgraded from alpha5 to alpha6 and I cannot seem to get thickbox paging to work. Rather than seeing title, image counts and next/previous; I only see html similar to . I tried enabling paging in the views but still had no luck. Can someone point me in the correct direction. Thanks.

#1
It is likely that this is caused because the output for the gallery page is not being provided directly by the image_gallery module.
Image Gallery module now uses views to output it's code by default.
Explained here
http://drupal.org/node/569162
Thickbox module relies on the presence of particular markup.
20 // find the categories.21 $("ul.images").each(function(i) {
22 var group = "gallery-g" + i;
23 TB_drupal_rewrite(this, group);
24 });
to make a gallery.
We'll just add that class to our views output.
#2
#3
Thanks for the patch!
Committed.
#565774 by alanburke: Fixed thickbox on galleries.
#4
I have upgraded to beta2 and now the html I originally referred to (but did not include correctly since it was an img tag) is not displayed but Thickbox seems to be inactive. If I click on an image I get the same results as if I click on the title. After upgrading, I ran the update.php and reverted both views since I had been experimenting previously. I scanned the docs could not find anything new that I should do.
#5
I'll have another look
#6
Hmm,
I thought we had sorted this.
This takes responsibility for rendering the node as a link back from views module.
#7
Hi Joachim
Did the patch at #2 make it in?
It looks to be missing - at least on my system
Alan
#8
Revised version of #6 less dsm statement
#9
@alanburke: your patch in #1 is this commit here: http://drupal.org/cvs?commit=259660
It looks okay to me, I think?
As for your patch in #8:
It seems to be the same as the parent render_link() but without the ALT text. Is the existing ALT the cause of the breakage? Shouldn't we provide ALT text of some sort anyway?
I would rather we call the parent::render_link() and then unset the 'alt' key. It's more roundabout, but it's clearer what we are doing and why we aren't just letting it use the inherited method.
#10
Yep, that's correct.
No, we shouldn't provide alt text.
Alt text is only for an element that cannot be rendered ie images when browsing in text only mode.
The IMG shoud have an alt attribute, but not a link.
Your method is better. I'll have a look later.
#11
Oh duh -- it's what we talked about at sprint, isn't it? I'm being dense :)
Is the surplus ALT fixed by that patch in Views -- in other words, are we fixing something that the next release of views will fix anyway? I'm still happy to fix it here, as it's important we support *boxes, but if that's the case, I can make a note to remove it again once the next version of Views is out.
#12
Yep, Thats the one.
I had forgotten about the fact that it is to be fixed in views.
Alan
#13
I dont know if this is related, but thickbox stopped working on my site. I tried Lightbox 2 and that also does not work.
#14
I just upgraded to beta3 and thickbox now works again. Thank you.
#15
@alanburke: do we still need to fix the ALT text that Views provides?
#16
Hi joachim
Sorry I've been so inactive of late...
We have two options as I see it.
1. Accept that it has been sorted in Views, and when views has a release, it will be covered.
We'd mark it a known issue on the project page perhaps.
Views hasn't had a release since June, so I'd expect one soonish?
2. Accept that most people will see this problem, and then report it here. Again. And again.
We might save some hassle if we fix it ourselves,
and make a point release rolling back that fix whenever the views release arrives.
#17
My previous comment was perhaps premature. Thickbox now does work fine, but there is still a large img tag displayed below the picture and above the prev/next controls. I'm not sure if this is something with image or thickbox, or it it's something I need to set somewhere.
#18
Hello, its about #17...
I posted this problem on the german site drupalcenter.de - without any senseless answer.
I tried to find the code where that is created but i'm a bit dizzy about whether its in the view for gallery or somewhere in the modules ore theme-template-files ....
... but i think that could also be sth. with the "alt" - thing? Maybe there is some failure in getting the name of the image? Maybe some alt-issue is used instead of the title ... would be great to get fixed!
Thanks
Dirk
#19
Try the latest Views dev -- that fixed problems with ALT and TITLE.
PS. Please report back here if it works!