News:

Looking for documentation? Take a look on our wiki

Main Menu

There is a bug in categoryChildlist.tpl.php

Started by MiRcOv, January 20, 2009, 16:54:41 PM

Previous topic - Next topic

MiRcOv

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

The problem is in this line:

// 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

I think it´s fixed in VirtueMart 1.1.3 version

// Do we need a final closing row tag?
if ($iCol != 1) {
echo "</tr>\n";
}
?>

VirtueMart,(Joomla-phpShop, mambo-phpShop) since 2004-03-11

MiRcOv

Mmhh, it seems not be fixed :(
The validator still tells me the error :(

ex3mist

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?