In ubercart 6.x-2.2

ALT and title attributes are always gaps within the img element (which has class="imagecache imagecache-product")

<img height="100" width="70" class="imagecache imagecache-product" title="" alt="" src="">

In ubercart/uc_product/uc_product.module remplace

in line 1325
$data['image'] = array('#value' => l(theme('imagecache', 'product_list', $image['filepath'], $image['alt'], $image['title']), 'node/'. $node->nid, array('html' => TRUE)));
for
$data['image'] = array('#value' => l(theme('imagecache', 'product_list', $image['filepath'], $image['data']['alt'], $image['data']['title']), 'node/'. $node->nid, array('html' => TRUE)));

In line 1592
$output .= theme('imagecache', 'product', $first['filepath'], $first['alt'], $first['title']);
for
$output .= theme('imagecache', 'product', $first['filepath'], $first['data']['alt'], $first['data']['title']);

in line 1604
$output .= theme('imagecache', 'uc_thumbnail', $thumbnail['filepath'], $thumbnail['alt'], $thumbnail['title']);
for
$output .= theme('imagecache', 'uc_thumbnail', $thumbnail['filepath'], $thumbnail['data']['alt'], $thumbnail['data']['title']);

Also if you want that you can use PHP 5.3 (this is not implemented in the file patch)

line 819
function uc_product_form_alter(&$form, &$form_state, $form_id) {
for
function uc_product_form_alter($form, $form_state, $form_id) {

Sorry for my English (ne will use an English traductoc)

CommentFileSizeAuthor
uc_product.module.patch1.68 KBfrancisconi.org
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TR’s picture

Status: Fixed » Needs review
TR’s picture

Status: Needs review » Postponed (maintainer needs more info)

Looks like a regression. See #457716: Product image alt and title attributes - what you're proposing is the exact opposite of what was done in that issue. And I can't reproduce this problem on my machine - alt and title tags show up properly for me. So my question is, are you using an old version of Imagefield or has Imagefield changed things again? Please post what version you're using. Also, *what* images are missing the alt and title for you - the images on the catalog pages (grid or list catalog?), on the product pages, in the cart ... ?

francisconi.org’s picture

Mr. First of all sorry for my English (not English)...

Yo me to solve this vase in: http://www.ubercart.org/forum/support/8988/cant_get_titles_imagefield_di...

both shown that image are displayed together many products but not the catalog .mm.. look see: http://tubisuteria.com.ve/bisuteria/menu/zarcillos-artesanales-fimo

And in any of the products, ie if you enter eg http://tubisuteria.com.ve/bisuteria/codigoaai0004

but regardless of where it is caught in the part that said, for example HTML

<img height="100" width="69" class="imagecache imagecache-product" title="codigo:AAI0004" alt="bisuteria-zarcillos-AAI0004-BsF55" src="http://tubisuteria.com.ve/sites/default/files/imagecache/product/bisuteria-zarcillos-AAI0004-BsF55.jpg">

there were empty attribute alt and title (title="" alt="")

I'm using the latest stable versions of all modules I have installed
Then he sent some version numbers

Drupal 6.16
Auto Assign Role 6.x-1.1
CAPTCHA 6.x-2.1
Content Construction Kit (CCK) 6.x-2.6
CSS Injector 6.x-1.3
Devel 6.x-1.18
FileField 6.x-3.2
Global Redirect 6.x-1.2
ImageAPI 6.x-1.6
ImageCache 6.x-2.0-beta10
ImageField 6.x-3.2
Lightbox2 6.x-1.9
LoginToboggan 6.x-1.6
Ubercart 6.x-2.2
Ubercart Product Power Tools 6.x-1.10
Views 6.x-2.8

If you want I can send the complete list of modules and versions. For it would be interesting to solve the problem at its root.

From already thank you for your patience and time

Island Usurper’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Now I'm really confused. I see alt="bisuteria-zarcillos-AAI0004-BsF55" title="codigo:AAI0004" in the image, and title="codigo:AAI0004" in the lightbox link surrounding it, but the first one comes from $first['title'] and the second is $first['data']['title'].

Maybe now it doesn't matter if you find the alt and title in 'data' or not. Either way, it's working like it should.

lesliewu’s picture

I am having the same problem. I've tried tubisuteria patch but still get alt="" and title="".

dugnap’s picture

Version: 6.x-2.4 » 6.x-2.2
Status: Closed (fixed) » Closed (works as designed)

I also have this problem. It appears on product pages (http://example.org/store/books/illinoisdecisionsonsearchandseizure)

Only local images are allowed.

And views using imagecache (http://example.org/store/isbabooks)

Only local images are allowed.

I have filled in the description field when uploading the image in ubercart.

I have the following module versions:
Drupal 6.16
ImageAPI 6.x-1.6
ImageCache 6.x-2.0-beta10
ImageField 6.x-3.3
Ubercart 6.x-2.2

I have also noticed on Ubercart's demo the alt tag is empty (don't know if text was filled in for the demo though) http://demo.ubercart.org/ as well as Lullabot's site http://store.lullabot.com/products/learning-views

graytoby’s picture

Version: 6.x-2.2 » 6.x-2.4
Status: Closed (works as designed) » Active

I have exactly identical issue. I'm using latest stable version of imagecache, imagefield and ubercart.

Island Usurper’s picture

Status: Active » Fixed

OK, now using ['data']['alt'] is the only thing that works. Weird.

Fixed in the dev version now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Dragolin’s picture

I also have the same empty alt text issue, are you recommending that we upgrade to the latest dev version then?

EDIT: I upgraded and now it works! Thx :)

SchwebDesign’s picture

subscribing

fuerst’s picture

Version: 6.x-2.4 » 6.x-2.6
Status: Closed (fixed) » Active

Looks like in 2.6 it is not fixed everywhere: found the wrong parameters still used in uc_product_table().
In theme_uc_catalog_browse() the title/alt parameters for theme('imagecache'...) are even missing.

(No patch created since I don't use that functions so can not test it.)

TR’s picture

Version: 6.x-2.6 » 6.x-2.4
Status: Active » Closed (fixed)
fuerst’s picture

Great, thanks

Status: Closed (works as designed) » Closed (fixed)