News:

Looking for documentation? Take a look on our wiki

Main Menu

Router bug

Started by DayCounts, October 23, 2012, 14:33:49 PM

Previous topic - Next topic

DayCounts

Using VM2 on a Joomla 1.5 instance generates a bug in the SEF router.

The category route is an object that cannot be stored in cache :

in component/com_virtuemart/router.php
Replace
public function getCategoryRoute($virtuemart_category_id){

$cache = JFactory::getCache('_virtuemart','');
$key = $virtuemart_category_id. $this->vmlang ; // internal cache key
if (!($CategoryRoute = $cache->get($key))) {
$CategoryRoute = $this->getCategoryRouteNocache($virtuemart_category_id);
$cache->store($CategoryRoute, $key);
}
return $CategoryRoute ;
}

with
public function getCategoryRoute($virtuemart_category_id){

$cache = JFactory::getCache('_virtuemart','');
$key = $virtuemart_category_id. $this->vmlang ; // internal cache key
if (!($CategoryRoute = $cache->get($key))) {
$CategoryRoute = serialize($this->getCategoryRouteNocache($virtuemart_category_id));
$cache->store($CategoryRoute, $key);
}
return unserialize($CategoryRoute) ;
}

to prevent any issue