Closed (fixed)
Project:
Field Slideshow
Version:
7.x-1.6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2012 at 03:07 UTC
Updated:
24 Jan 2013 at 12:24 UTC
D7.12 core image
Field Slideshow is not displaying image alt/title tags. The field slideshow generated img tag includes an empty alt=”” but no title tag. The image alt and title contain data but are not being used by field slideshow. As a test the same image can be displayed on the same node as a regular field and the alt and title tags are present with data.
I checked though issues but could not find any other mention of this. Is it a bug or something I am missing in configuration or use?
Comments
Comment #1
idflood commentedThis should work out of the box without configuration. So obviously something is wrong but I've also commited a patch two days ago that fixed a related but in some sense opposite issue: #1496610: Image alt/title text gets carried between images
I will try to verify again tomorrow the alt and titles. To be sure, you have drupal core + field_slideshow and dependencies but no other modules?
Comment #2
idflood commentedI tried again to reproduce the issue, this time with drupal 7.12 and field_slideshow 1.6 but it is still working (last time I tried with the dev versions).
Can you give more details about your setup, or even better, a step by step procedure to reproduce this with a clean install?
Comment #3
jmoruziI can confirm that alt and title tags are not being output. I set up a fresh Drupal 7.18 install with the following modules:
Field Collection 7.x-1.0-beta5
Field Slideshow 7.x-1.8
Entity 7.x-1.0
Libraries 7.x-2.0
Latest jQuery Cycle plugin (from the link in the tutorial mentioned on the project page)
As described above by WiredEscape there is no title tag output, and just empty alt="" tag.
Hopefully we can find a solution to this soon. We all know how important alt tags are to accessibility and SEO.
Comment #4
jmoruziOK, a little bit of trouble shooting. If I set the display in 'MANAGE DISPLAY' of my content type displaying the field collection, (not the 'Field collections' content type created in the tutorial) to anything other than 'Slideshow' the alt and title tags appear properly. Once I set the display to Slideshow, no title tag is output, and the alt tag is an empty string (alt='').
This is line 860 of field_slideshow.module:
$image['alt'] = isset($item['alt']) ? $item['alt'] : '';
If I replace it with:
$image['alt'] = 'some text';
then the alt tag is written correctly in all cases, including when the 'Slideshow' display is selected. The same applies to the title tag. Line 876 in field_slideshow.module:
if (isset($item['title']) && drupal_strlen($item['title']) > 0) $image['title'] = $item['title'];
if I replace it with:
$image['title'] = 'some text';
Then the title tag is output correctly in all cases. It appears as though $item['alt'] and $item['title'] are returning 'NULL', but only if the display in set to 'Slideshow', which makes no sense to me. Anyone have some ideas on what's happening here?
Comment #5
idflood commentedThanks for the detailed report. I've pushed a fix to the dev release, it will be available in less than 24 hours.
http://drupalcode.org/project/field_slideshow.git/commitdiff/a31cc237171...
Comment #6
jmoruziThat fixed it, thanks for the quick response David.
Comment #7
idflood commentedManually closing this to cleanup the issue queue. Feel free to reopen if there are still some bug with this.