Author Topic: There is a bug in categoryChildlist.tpl.php  (Read 5234 times)

MiRcOv

  • Beginner
  • *
  • Posts: 12
There is a bug in categoryChildlist.tpl.php
« on: January 20, 2009, 16:54:41 pm »
Hi, while i'm modifiyng my VM installation i noticed that there is a bug in the file componente/com_virtuemart/themes/default/templates/common/categoryChildlist.tpl.php

If i set in the file that i want 3 categories per row and i create 7 categories the last tag </tr> wasn't created correctly. The problem is in the way the script calculates the correct number of cells. Infatc it not considers the colspan attribute and also calculates wrong the current number of cells and rows.

The result is an invalid table and errors in validator.w3.org

Becuse i think Virtue Mart have to be w3 standards compliant.

Thanks for the attention, bye :D

MiRcOv

  • Beginner
  • *
  • Posts: 12
Re: There is a bug in categoryChildlist.tpl.php
« Reply #1 on: January 20, 2009, 17:12:42 pm »
The problem is in this line:
Code: [Select]
// Do we need a final closing row tag?
if (sizeof( $categories ) < $categories_per_row) {
echo $categories . "</tr>\n";
}

Infact $categories is an array and using sizeof we count how elements it contains. But the array ever contains the same number of elements because we don't delete them while the array is cicled. So when we do sizeof($categories) the result is ever the same, is the number of categories (in my case 7). So the if will be ever false and will be never called by the script and the table isn't closed correctly.

For now i've not the time to close this bug, but it isn't a great job.

Reply me for confirm or negate(?) my thesys so we can speak about and solve the problem. Bye bye!

mauri

  • Quality&Testing Team
  • Jr. Member
  • *
  • Posts: 297
Re: There is a bug in categoryChildlist.tpl.php
« Reply #2 on: January 21, 2009, 15:06:22 pm »
I think it´s fixed in VirtueMart 1.1.3 version

Code: [Select]
// Do we need a final closing row tag?
if ($iCol != 1) {
echo "</tr>\n";
}
?>
VirtueMart,(Joomla-phpShop, mambo-phpShop) since 2004-03-11

MiRcOv

  • Beginner
  • *
  • Posts: 12
Re: There is a bug in categoryChildlist.tpl.php
« Reply #3 on: January 27, 2009, 17:53:15 pm »
Mmhh, it seems not be fixed :(
The validator still tells me the error :(

ex3mist

  • Jr. Member
  • **
  • Posts: 71
Re: There is a bug in categoryChildlist.tpl.php
« Reply #4 on: September 19, 2011, 08:07:02 am »
Hello,

It's more than two years have passed since this last post and I'm using VM 1.1.8 but I see the problem hasn't been solved. I think that <td></td> tags are missing in the code generated by the categoryChildlist.tpl.php file and that's why the pages can't pass the validation process. Can anyone suggest a solution so that the code could be validated by the validator.w3.org?