All the alt and title tags seem to be empty. I've tried using Garland and it's also empty so it is not theme related. Having looked through the code I've pinpointed the problem and have created a patch. Basically when the image is getting themed, it uses $item['alt'] when the data is in $item['data']['alt'].

CommentFileSizeAuthor
imagefield_formatter_alt_title.patch635 byteskelvincool

Comments

kelvincool’s picture

Status: Active » Needs review
gorbeia’s picture

The patch works OK for me, Thanks

libeco’s picture

I have been having this problem for a while, it is discussed here: http://drupal.org/node/299329

I didn't use the patch, but simply replaced the line and it works perfectly.

Thanks!

scottrigby’s picture

Good on nodes, doesn't help on view displays...

This works well when viewing the imagefield images (formatted using imagecache) in the node itself... However, I still see alt="a" title="a" when the same imagecache formatted images are being called by Views. Has your experience been different, or do you have the same problem?

thanks for any advice :)
Scott

gorbeia’s picture

These are two different problems. The problem you have with views is discussed in the bug entry pointed by libeco above.

libeco’s picture

I have the same problem with views. Neither this patch or the solution supplied in the other mentioned topic helped me from not getting the a in views.

alexanderpas’s picture

Status: Needs review » Reviewed & tested by the community

Patch is good.

Views problem is unrelated to this patch.

scottrigby’s picture

Are any of you aware of an existing issue addressing the Views problem? I haven't found one so far, but the Views issue queue tends to get kind of bloated so it's not always easy to tell... Thanks for your suggestions on this –
...and yep, other than the Views issue, this patch works like a champ.

alexanderpas’s picture

for the 'a' problem, you can look here http://drupal.org/node/299329

pieterbezuijen’s picture

When enabling the user to fill in the 'alt', I get the 'alt' in the full node view. Using the solution described in #299329: No display of alt or title with images - Simple Workaround this fixes my views too.

The only thing, I prefer the user doesn't need to fill in the 'alt', because we're already asking quite some information. When disabling the 'alt' to be filled in by the user, the 'alt' doesn't ever show, even though the default alt is filled in.

Has this anything to do with this bug? Tnx.

alexanderpas’s picture

not related to this bug, please file as a seperate bug, thanks.

scottrigby’s picture

Hi Alexander
re: #9 --- yep --- the patch at that link fixes the views issue... and this one fixes the non-views issue -- we're all set! thanks ;)
Scott

alexanderpas’s picture

Title: Alt and title always empty » alt and title values always empty on nodes (non-Views)

improving title.

zoliky’s picture

I confirm, the patch is good.

openmind’s picture

Hi Guys,

I've run the patch but still am having no luck. I'm using Content Construction Kit (CCK) 6.x-2.1 which is the latest version.
I've had a quick peek into the database in the content_field_image table.

field_image_data doesn't seem to be storing any of the alt or title content??
a:5:{s:3:"fid";s:1:"3";s:5:"width";i:642;s:6:"height";i:360;s:8:"duration";N;s:11:"description";s:0:"";}

Any help or rough ideas of where to look would be greatly appreciated.

Thanks again,

Chris

drewish’s picture

Status: Reviewed & tested by the community » Closed (duplicate)