There are some bugs with category page canonical URLs:
Bug #1: There are 2 canonical URLs - first is added by Joomla SEF plugin, second - by Virtuemart View (\components\com_virtuemart\views\category\view.html.php).
To fix this need to "connect" virtuemart and plugin. I think, it uses router.php to generate URL, we need to look in router.
I have disabled this plugin, but the the second URL is wrong.
Bug #2: The Virtuemart SEF url in view is wrong - there is "manufacturer" suffix (in my case - translated).
The problem is in function setCanonicalLink:
Original file:
$link = 'index.php?option=com_virtuemart&view=category';
if($categoryId!==-1){
$link .= '&virtuemart_category_id='.$categoryId;
}
if($manId!==-1){
$link .= '&virtuemart_manufacturer_id='.$manId;
}
Fixed file:
$link = 'index.php?option=com_virtuemart&view=category';
if(($categoryId!==-1)&&($categoryId!=0)){
$link .= '&virtuemart_category_id='.$categoryId;
}
if(($manId!==-1)&&($manId!=0)){
$link .= '&virtuemart_manufacturer_id='.$manId;
}
[attachment cleanup by admin]
These bugs are still present in VM3.0.6 & not just in category pages as also discussed here - http://forum.virtuemart.net/index.php?topic=127441.0
I tested with Joomla 3.4RC & VM3.0.6 and 2 canonical URLS still show there.
Is there a best practice workaround or override, that anybody can suggest?
See http://forum.virtuemart.net/index.php?topic=127441.msg441398#msg441398