Author Topic: Pagination broken in category 0(root)  (Read 770 times)

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2410
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Pagination broken in category 0(root)
« on: October 18, 2017, 15:49:24 pm »
HI,
I use a test site with VM 3.2.4 and pagination is really strange in the home page.
Each page the pagination is multiplied *2
eg when you go in this page http://pro.st42.fr
pagination for page
2 : http://pro.st42.fr/results,25-48
3 : http://pro.st42.fr/results,49-96
...
99: http://pro.st42.fr/results,2353-4704
Yes 2353-4704 for last page 99!

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2410
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Pagination broken in category 0(root)
« Reply #1 on: October 18, 2017, 15:56:00 pm »
HI,
I use a test site with VM 3.2.4 and pagination is really strange in the home page.
Each page the pagination is multiplied *2
eg when you go in this page http://pro.st42.fr
pagination for page
2 : http://pro.st42.fr/results,25-48
3 : http://pro.st42.fr/results,49-96
...
99: http://pro.st42.fr/results,2353-4704
Yes 2353-4704 for last page 99!
I checked exactly and pagination have pagination+ pagination eg 24(25-48) then 48 (49-96),72(73-144),96...

ermes

  • Beginner
  • *
  • Posts: 20
Re: Pagination broken in category 0(root)
« Reply #2 on: November 02, 2017, 12:53:19 pm »
I have same problem. There isn't a fix yet?

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2410
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Pagination broken in category 0(root)
« Reply #3 on: November 02, 2017, 13:54:47 pm »
You need to set same pagination in menu link and in Virtuemart default config for pagination and it should work

ermes

  • Beginner
  • *
  • Posts: 20
Re: Pagination broken in category 0(root)
« Reply #4 on: November 02, 2017, 15:39:10 pm »
Sorry can you send me a screen?

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2410
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Pagination broken in category 0(root)
« Reply #5 on: November 02, 2017, 18:46:17 pm »
It not work better. I tried all settings
So it's a bug.

ermes

  • Beginner
  • *
  • Posts: 20
Re: Pagination broken in category 0(root)
« Reply #6 on: November 03, 2017, 10:01:01 am »
Yes, I also tried but did not work. I asked you the screen shot just to see if I put the correct parameters. Hopefully they will solve it soon!

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9415
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Pagination broken in category 0(root)
« Reply #7 on: November 04, 2017, 00:07:42 am »
For me it looks like the max page is set in the joomla pagination to 100, so the last page shows then the remaining products.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ermes

  • Beginner
  • *
  • Posts: 20
Re: Pagination broken in category 0(root)
« Reply #8 on: November 06, 2017, 10:13:49 am »
And have you fixed it somehow? If yes, can you show me as?

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2410
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Pagination broken in category 0(root)
« Reply #9 on: November 06, 2017, 10:26:10 am »
pagination is set to 24
See page 3 it should be 48-72 and its 48-96, each new pagination is x2 excluded first page.
page 1 1-24 = 24
page 2 24-48 = 24
page 3 48-96 = 48(24+24)
page 4 73-144 = 72(24+24+24)
....
If you go to page 3 for eg. number of result is set to 72
And trying to go back to 24 do not work.


ermes

  • Beginner
  • *
  • Posts: 20
Re: Pagination broken in category 0(root)
« Reply #10 on: November 07, 2017, 11:13:29 am »
News?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9415
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Pagination broken in category 0(root)
« Reply #11 on: November 09, 2017, 10:34:07 am »
What do you set as pagination sequence? and do you have the same effect also in the Backend?
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2410
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Pagination broken in category 0(root)
« Reply #12 on: November 09, 2017, 12:04:39 pm »
I have set all paginations to 24,admin, front ... only max items with image is set to 48

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9415
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Pagination broken in category 0(root)
« Reply #13 on: November 09, 2017, 15:06:11 pm »
I think I found it, the error was in the router

Code: [Select]
// Joomla replace before route limitstart by start but without SEF this is start !
if ( isset($query['limitstart'] ) ) {
$limitstart = (int)$query['limitstart'] ;
unset($query['limitstart']);
}
if ( isset($query['start'] ) ) {
$start = (int)$query['start'] ;
unset($query['start']);
}
if ( isset($query['limit'] ) ) {
$limit = (int)$query['limit'] ;
unset($query['limit']);
}

if ($start !== null &&  $limitstart!== null ) {
vmdebug('Pagination limits $start !== null &&  $limitstart!== null',$start,$limitstart);
//$segments[] = $helper->lang('results') .',1-'.$start ;
} else if ( $start>0 ) {
//For the urls leading to the paginated pages
// using general limit if $limit is not set
if ($limit === null) $limit= vmrouterHelper::$limit ;
$segments[] = $helper->lang('results') .','. ($start+1).'-'.($start+$limit);
} else if ($limit !== null && $limit != vmrouterHelper::$limit ) {
//for the urls of the list where the user sets the pagination size/limit
$segments[] = $helper->lang('results') .',1-'.$limit ;
}
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ermes

  • Beginner
  • *
  • Posts: 20
Re: Pagination broken in category 0(root)
« Reply #14 on: November 16, 2017, 17:57:32 pm »
So, how i can fix it?