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)
Comment | File | Size | Author |
---|---|---|---|
uc_product.module.patch | 1.68 KB | francisconi.org | |
Comments
Comment #1
TR CreditAttribution: TR commentedComment #2
TR CreditAttribution: TR commentedLooks 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 ... ?
Comment #3
francisconi.org CreditAttribution: francisconi.org commentedMr. 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
Comment #4
Island Usurper CreditAttribution: Island Usurper commentedNow I'm really confused. I see
alt="bisuteria-zarcillos-AAI0004-BsF55" title="codigo:AAI0004"
in the image, andtitle="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.
Comment #5
lesliewu CreditAttribution: lesliewu commentedI am having the same problem. I've tried tubisuteria patch but still get alt="" and title="".
Comment #6
dugnap CreditAttribution: dugnap commentedI also have this problem. It appears on product pages (http://example.org/store/books/illinoisdecisionsonsearchandseizure)
And views using imagecache (http://example.org/store/isbabooks)
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
Comment #7
graytoby CreditAttribution: graytoby commentedI have exactly identical issue. I'm using latest stable version of imagecache, imagefield and ubercart.
Comment #8
Island Usurper CreditAttribution: Island Usurper commentedOK, now using ['data']['alt'] is the only thing that works. Weird.
Fixed in the dev version now.
Comment #10
Dragolin CreditAttribution: Dragolin commentedI 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 :)
Comment #11
SchwebDesign CreditAttribution: SchwebDesign commentedsubscribing
Comment #12
fuerst CreditAttribution: fuerst commentedLooks 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 fortheme('imagecache'...)
are even missing.(No patch created since I don't use that functions so can not test it.)
Comment #13
TR CreditAttribution: TR commented@fuerst: Already fixed by #1238348: Undefined indexes in uc_product/uc_product.module uc_product_get_picture() function.
Comment #14
fuerst CreditAttribution: fuerst commentedGreat, thanks