Joomla! Discussion Forums



It is currently Wed Nov 25, 2009 2:19 pm (All times are UTC )

 




Post new topic Reply to topic  [ 4 posts ] 
Author Message
Posted: Tue Jun 27, 2006 7:34 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon May 29, 2006 12:38 pm
Posts: 44
Location: Hungary
Description:
I found a bug in version 1.0.9 about the alt tags of images from the template. It has been resolved for the new version. But I found there another problem which hasn't been corrected. I turned on the voting for every content item on my page, and when I'm looking on a blog category page, and I got dozens of warnings because all voting stars have the same name="image" property, and the XHTML specs say, that the name attribute should be unique.

Reported on:
Joomla 1.0.10, freshly upgraded from 1.0.9

Classification:


Affected functions:


Related files:


Steps to replicate:
Turn on the voting option in the global configuration, and don't override it by the articles. I don't know, wether it matters if the stars are taken from the template or the built-in one, at my site it was taken from the template. Now all the stars are named image.

Analysis:


Proposed fix(es):
If no name is given as a parameter in the CheckImage function, don't output name="Image" but nothing in the output img tag.


Topic / Artifact ID:


System info:
I'm using Joomla 1.0.10 upgraded from 1.0.9., core SEF turned on, OpenSEF installed, but turned off (some other problems kicked in, but it has nothing to do with Joomla).


Last edited by toubkal on Wed Jun 28, 2006 9:30 am, edited 1 time in total.

Top
   
 
Posted: Wed Jun 28, 2006 8:39 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Aug 18, 2005 4:35 pm
Posts: 2838
Location: Cheshire, England
Hi Stampie, thanks for the report.

At first I thought that this was just down to how strict you go with compliance (my site validates with the w3c validator - no warnings) but when I looked at the imagecheck function again
/includes/joomla.php
Code:
   function ImageCheck( $file, $directory='/images/M_images/', $param=NULL, $param_directory='/images/M_images/', $alt=NULL, $name='image', $type=1, $align='middle', $title=NULL, $admin=NULL ) {
      global $mosConfig_absolute_path, $mosConfig_live_site, $mainframe;

      $cur_template = $mainframe->getTemplate();

      $name    = ( $name    ? ' name="'. $name .'"'    : '' );   


It does look like a bug as this
Code:
$name    = ( $name    ? ' name="'. $name .'"'    : '' );

seems to me to be trying to output the name attribute if one exists, otherwise do not output one.

which conflicts with the fact that a default value is assigned to $name in the function
Code:
function ImageCheck( $file, $directory='/images/M_images/', $param=NULL, $param_directory='/images/M_images/', $alt=NULL, $name='image', $type=1, $align='middle', $title=NULL, $admin=NULL )


I edited the function to have argument $name=NULL instead of $name='image' and this seems to do the trick

_________________
Look at the page source... Lots of useful info...


Top
   
 
Posted: Wed Jun 28, 2006 9:30 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Aug 18, 2005 4:35 pm
Posts: 2838
Location: Cheshire, England
I have added this to the tracker
http://forge.joomla.org/sf/go/artf5141?nav=1

_________________
Look at the page source... Lots of useful info...


Top
   
 
Posted: Fri Sep 08, 2006 10:34 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Mon Dec 05, 2005 10:17 am
Posts: 1318
Location: New Orleans, LA, USA
Resolved: http://forge.joomla.org/sf/go/artf5141?nav=1.  Moving to resolved forum.

_________________
Rob Schley - Open Source Matters
Webimagery - http://www.webimagery.net/ - Professional Consulting Services
JXtended - http://www.jxtended.com/ - Free and Commercial Joomla! Extensions


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group