Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

[SmartyPaginate] Wrong Page count, Page missing

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
NeXXt
Smarty Rookie


Joined: 22 May 2005
Posts: 25

PostPosted: Tue Jun 07, 2005 5:26 pm    Post subject: [SmartyPaginate] Wrong Page count, Page missing Reply with quote

Ok. I have 56 News items. 5 Items on each page.

{$paginate.page_total} gives me 12 Pages. if I click on {paginate_last} He jumps to page 11 and the Page 11 in {paginate_middle} is not linked (I think this Page 11). But {$paginate.page_current} shows me the current is page 12 and Ive got 2 news items (the oldest).

If I Click on page 10. Then current shows me Iam on 11 but paginate_middle tells me Iam on page 10

If I Click on page 9. Then current shows me Iam on 10 but paginate_middle tells me Iam on page 9
...

If Iam on page 1 and click {paginate_next}. Iam on page 2 and paginate_middle show me the same. I click on next again...till Iam on page 11 and there is no page 12 (But total is 12) an but I can click on Next then iam on page 12 but it isnt in paginate_middle (It shows me 1 newsentry)

I Think It counts wrong. Page 1 link last=55 but if I click through till page 11 it shows next=56

Template
Code:
{$paginate.page_current} / {$paginate.page_total}

   {paginate_first}
   {paginate_prev}

{paginate_middle format="page" prefix="" suffix="" link_suffix=" " page_limit="5"}

   {paginate_next}
   {paginate_last}
Back to top
View user's profile Send private message
NeXXt
Smarty Rookie


Joined: 22 May 2005
Posts: 25

PostPosted: Tue Jun 07, 2005 7:12 pm    Post subject: Reply with quote

I tested it again Ive got 56 items with page limit 4 -> It works without missing link or something. no erros or else

I tested it with 55 items and page limit 5 and it works fine, too


Ive add one new item 57 items total an page limit 5 -> on last page 12 is missing again

58, 59 page limit 5 -> 12 is missing

now Ive got 60 item limit 5 and ive got page 12

Arrow Maybe I can help with my experiments if its a bug or something.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Tue Jun 07, 2005 7:26 pm    Post subject: Reply with quote

See if you can take the simple example that ships with SmartyPaginate and get the same behavior.
Back to top
View user's profile Send private message Visit poster's website
NeXXt
Smarty Rookie


Joined: 22 May 2005
Posts: 25

PostPosted: Wed Jun 08, 2005 7:28 pm    Post subject: Reply with quote

If have used the demo code with
Code:
SmartyPaginate::setLimit(5);
$_data = range(1, 56);


and the same problem happens!
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Wed Jun 08, 2005 9:30 pm    Post subject: Reply with quote

I take the vanilla example, change those two parameters and it works fine. All the numbers are present (?)
Back to top
View user's profile Send private message Visit poster's website
NeXXt
Smarty Rookie


Joined: 22 May 2005
Posts: 25

PostPosted: Thu Jun 09, 2005 2:28 pm    Post subject: Reply with quote

Hm...what should we do? It goes till 60 items then Page 12 appears. Its ok its not a critical problem. Thanks for help.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu Jun 09, 2005 3:24 pm    Post subject: Reply with quote

Make sure you are using the latest release, or even grab CVS. Otherwise I'm not sure what to make of it, works for me Smile
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP