hello, please help me.
I have joomla 3 last version and virtuemart 4
from the last upgrade to virtuemart 4, my canonical is not correct, to the homepage shop and to the category page it is added this /results,1-0.html
https://www.mysite.com/results,1-0.html
please help me, where to look at
thanks
Milbo told me is comes from around the router.php ~ 753
if ( self::compareKey($splitted[0] ,'results')){
array_pop($segments);
$results = explode('-',$splitted[1],2);
//Pagination has changed, removed the -1 note by Max Milbers NOTE: Works on j1.5, but NOT j1.7
// limitstart is swapped by joomla to start ! See includes/route.php
if ($start = intval($results[0])-1) $vars['limitstart'] = $start;
else $vars['limitstart'] = 0 ;
$vars['limit'] = (int)$results[1]-$results[0]+1;
} else {
$vars['limitstart'] = 0 ;
}
Quotethe side effect of the fix "unsupported operand types ... " in router.
Haven't had time to look at any of this ....
sorry can you explain it please? thanks
I resolved commenting this code in file:
router.php
moreover i have not idea what this code is for, and if it is good what I did, anyway it resolved the canonical problem with results,1-0.html
at line 482
/****
$limitstart = intval($limitstart);
$limit = intval($limit);
if ( $limitstart>0 ) {
//For the urls leading to the paginated pages
// using general limit if $limit is not set
if ($limit === null) $limit= vmrouterHelper::$limit ;
$segments[] = self::lang('results') .','. ($limitstart+1).'-'.($limitstart+$limit);
} else if ($limit !== null && $limit != vmrouterHelper::$limit ) {
//for the urls of the list where the user sets the pagination size/limit
$segments[] = self::lang('results') .',1-'.$limit ;
} else if(!empty($query['search']) or !empty($query['keyword'])){
$segments[] = self::lang('results') .',1-'.vmrouterHelper::$limit ;
}
if(self::$debug)vmdebug('category link segments',$query, $segments);
****/
If you remove this
if ( $limitstart>0 ) {
Then pagination is not working anymore
yes, my pagination is not working now.
please help me, how to resolved this problem of the canonical.
I have resolved adding this line of code testing
if limit is != 0
this is preventing to have in url this results,1-0.html
else if ($limit !== null && $limit != vmrouterHelper::$limit ) {
//for the urls of the list where the user sets the pagination size/limit
if( $limit != 0) //I HAVE ADDED THIS LINE
$segments[] = self::lang('results') .',1-'.$limit ;
please let me know if this is ok and if this is a VM bug resolved.
I have another question:
why some of my category page are paginated in URL by
?start=44
and others by
/results,45-44.html
??????
thanks
my idea was to use instead
else if ($limit !== null &&
just
if (!empty($limit) &&
I have implemented with your code, and it is working fine.
Will this be a bug fixed in next VM realease?
thanks
The topic is locked as it has become a target for Russian spambots.