Closed (fixed)
Project:
Image
Version:
6.x-1.0-beta3
Component:
image_gallery
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Dec 2009 at 20:37 UTC
Updated:
14 Oct 2010 at 07:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
joachim commentedIt's caused by this in the image_gallery_handler_field_gallery_cover_thumbnail class:
What is happening is that we depend on Views to make the actual link. That means the A element goes around whatever we output in render() -- render_link() doesn't actually make the link there and then, it just raises a flag for it to happen later on in advanced_render().
I put the DIV in because I felt it was necessary to have a reliable way to grab that image thumbnail no matter what field it is -- so if you change the field to another of the gallery cover selection methods, you still have your styles.
However, given the amount of hoop-jumping that would be involved to get this in, I am inclined to simply remove that DIV. There is a class 'image-thumbnail' on the image, after all, and that can be selected within the term view.
Any objections to my removing it?
(PS. Good catch by the way!)
Comment #2
drunkencelt commentedHi Joachim,
I see what you were trying to do which makes sense. I think the 'image-thumbnail' class will be enough though. More and more people are looking for validation with Drupal (as in my case) so I think I'd just take the 'div' out altogether.
Great module though. Simple to use for users which was my goal in choosing it.
Cheers
Comment #3
joachim commentedCould you test this patch?
Comment #4
grn commentedHmm, the patch will not fix my validation problem. I removed the
<h3>tag from these files:image/contrib/image_gallery/views/theme/image-gallery-view-image-gallery-terms.tpl.php
image/contrib/image_gallery/image_gallery.pages.inc
image/contrib/image_gallery/views/image_gallery.views_default.inc
And I validate perfectly! sample
Comment #5
joachim commentedUrgh, but I really want the H3 to be on terms, for backwards compatibility and for semantic HTML!
Comment #6
grn commentedOkay, you should have your H3 like this:
<h3><a href="link">term</a></h3>and not like this:
<a href="link"><h3>term</h3></a>Comment #7
joachim commented...which we can't do because of reasons in #1 above.
I'll look into Semantic Views perhaps, see if bits of that can be applied.
Alternatively, we ditch the H3s completely and direct users to install Semantic Views themselves.
(Though: st00pid HTML: why can't a block element entirely be a link???)
Comment #8
grn commentedSorry, didn't see that in #1
Good idea.
I think valid (x)HTML is 1. priority.
Comment #9
joachim commentedAgreed.
But wait till all the themers start complaining about DIV soup though :/
Comment #10
grn commentedHi.
I just upgraded to Image 6.x-1.0-beta5. Now my gallery overview does not validate. Validating manually.
How can I help with this?
Comment #11
joachim commentedI haven't got round to fixing this I'm afraid...
Comment #12
sp3boy commentedBefore I make a patch, can I just check I've not missed anything obvious?
Is there any problem changing the div.image-gallery-view-cover-thumbnail to a span? Apart from requiring restyling by anybody who has styled div.image-gallery-view-cover-thumbnail of course.
As far as I know, although a span is notionally in-line, it can take any styling that a div can and the W3 validator was happy when I tried it with the span.
Just a thought.
Comment #13
joachim commentedAm I right in thinking it can't be a DIV because it's inside an A? (In which, frankly, HTML is being st00pid.)
Regarding the title, maybe if we make our own handler for the gallery title we can keep the H3. We'd need to implement our own advanced_render() and co.
Comment #14
grn commentedGood idea with the span.
Comment #15
sp3boy commentedOK well here's a patch to change to a span.
Comment #17
sp3boy commentedRevised patch *sigh*
Comment #18
sp3boy commentedHmm... think I need to change the status? I'm not up to speed with this automated testing.
Comment #20
sp3boy commentedRTFM I suppose... new patch.
Comment #21
sp3boy commented#20: image-gallery-649384-20.patch queued for re-testing.
Comment #22
joachim commentedCommitted the patch in #20:
#649384 by sp3boy: Fixed gallery thumbnail HTML to pass W3C validation.
Is this issue fixed now, or do other problems remain?
Comment #24
joachim commentedChanging title to keep track of duplicates.