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

alanburke - September 5, 2009 - 13:31

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.

AttachmentSize
565774.patch 857 bytes

#2

alanburke - September 5, 2009 - 13:45
Assigned to:Anonymous» alanburke
Status:active» needs review

#3

joachim - September 5, 2009 - 13:49
Status:needs review» fixed

Thanks for the patch!
Committed.

#565774 by alanburke: Fixed thickbox on galleries.

#4

edadasiewicz - September 6, 2009 - 14:15

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

alanburke - September 6, 2009 - 22:28
Status:fixed» active

I'll have another look

#6

alanburke - September 7, 2009 - 20:02

Hmm,
I thought we had sorted this.

This takes responsibility for rendering the node as a link back from views module.

AttachmentSize
565774-b.patch 1.13 KB

#7

alanburke - September 7, 2009 - 20:08
Version:6.x-1.0-alpha6» 6.x-1.x-dev

Hi Joachim
Did the patch at #2 make it in?
It looks to be missing - at least on my system

Alan

#8

alanburke - September 7, 2009 - 20:24
Status:active» needs review

Revised version of #6 less dsm statement

AttachmentSize
565774-b.patch 1.11 KB

#9

joachim - September 8, 2009 - 12:03
Status:needs review» needs work

@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

alanburke - September 8, 2009 - 12:54

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?

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

joachim - September 8, 2009 - 12:57

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

alanburke - September 8, 2009 - 16:16

Yep, Thats the one.
I had forgotten about the fact that it is to be fixed in views.

Alan

#13

wayne57 - September 11, 2009 - 12:24

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

edadasiewicz - September 16, 2009 - 02:01

I just upgraded to beta3 and thickbox now works again. Thank you.

#15

joachim - September 16, 2009 - 07:08

@alanburke: do we still need to fix the ALT text that Views provides?

#16

alanburke - September 16, 2009 - 08:10

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

edadasiewicz - September 19, 2009 - 14:02

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

draeck - October 26, 2009 - 19:56
Title:Thickbox paging no longer works after upgrade from alpha5» Thickbox printing curious <img>-tag instead of title of image

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

joachim - October 27, 2009 - 08:41

Try the latest Views dev -- that fixed problems with ALT and TITLE.

PS. Please report back here if it works!

 
 

Drupal is a registered trademark of Dries Buytaert.