CMS MADE SIMPLE FORGE

Album

 

[#1626] No next links in Album for second page

avatar
Created By: Michael Kenis (michaelk85)
Date Submitted: Wed Jul 11 17:09:05 -0400 2007

Assigned To: Elijah Lofgren (elijahlofgren)
Version: None
CMSMS Version: None
Severity: None
Resolution: Accepted
State: Open
Summary:
No next links in Album for second page
Detailed Description:
I'm using CMSMS 1.0.8 and Album 9.2.

When I set the max of 5 by 4 pictures at 1 page and confirm that.

Then I go to the album but there's no link showing with the "page 1 of 2" . The
whole
link don't appaers.


History

Comments
avatar
Date: 2007-07-16 14:24
Posted By: Elijah Lofgren (elijahlofgren)

Hi Michael,

Sadly I didn't get around to looking into this problem this weekend (had people
over and went places I hadn't on).

Hopefully I will look into this next weekend (I'm quite busy with my summer
programming job during the week).

Thanks for the understanding,

Elijah
      
avatar
Date: 2008-02-11 08:02
Posted By: Saulo Padilha (spadilha)

Hi there,

I have the same problem. I've tried somethings and I realized that $pagecount
aways return "1", even there is more tham one page.

I changed {if $pagecount>1} to {if $pagecount>0} and the Page Navigation
appears. But it shows like:

 <<   <  page 1/1  >  >>  
 <<   <  page 2/1  >  >>
 <<   <  page 3/1  >  >>    

that's cause $pagecount returns "1" instead of the correctly "3".

Well, the bug is on $pagecount, but I don't know how to fix that.

if anyone can help I'll be glad.


sorry about my english.
thanks.
      
avatar
Date: 2008-02-14 13:42
Posted By: Elijah Lofgren (elijahlofgren)

> Well, the bug is on $pagecount, but I don't know how to
fix that.

Hi Saulo,

Thanks for your work on narrowing down the problem! :)

I'm planning to try and schedule 20 minutes on Friday to look into and hopefully
fix this bug.

Hopefully, with your help, I can finally fix this longstanding bug! ;)

Sincerely,

Elijah Lofgren
      
avatar
Date: 2008-02-16 01:39
Posted By: Elijah Lofgren (elijahlofgren)

This bug has finally been fixed! :)

http://viewsvn.cmsmadesimple.org/viewsvn?rev=338&root=album&view=rev

------------------------------------------------------------------------
r338 | elijahlofgren | 2008-02-16 00:03:53 -0600 (Sat, 16 Feb 2008) | 6 lines

Fix bug: [#1626] No next links in Album for second page
http://dev.cmsmadesimple.org/tracker/?func=detail&aid=1626&group_id=167&atid=725
Thanks to Michael Kenis for reporting it.
A BIG THANKS to Saulo Padilha for narrowing down the source of the bug which
made it very easy to fix! :)

------------------------------------------------------------------------

Album 0.9.3 which includes this bug fix can be downloaded here:
http://dev.cmsmadesimple.org/frs/?group_id=167&release_id=1181

Thanks to both of you for your input and help on this bug.

Sincerely,

Elijah Lofgren
      
avatar
Date: 2008-03-11 16:41
Posted By: Elijah Lofgren (elijahlofgren)

Oops! Looks like this bug still exists!

From #cms today:
"(03:43:52 PM) reneh: elijahlofgren: I just tested by re-importing the default
template to Album - still no pagination. tested with fresh Tables to and still
no påagination. Just so you are informed.  ;-)"

I'll have to look into this before the next release. ;)
      
avatar
Date: 2009-01-07 01:56
Posted By: Stuart Steel (acornweb)

TEMPORARY WORKAROUND!!

The problem is in the url string written for the next and previous page URLS

index.php?mact=Album,,default,1&albumid=1&page=1&returnid=53&page=53

The correct value for page is being overwritten by the later value which is set
to the CMS page, not the album page.

These two variables need to be disambiguated

In the meantime add the following smarty code to your smarty template


|regex_replace:'/&amp;page=\d+$/':''

an example is given below

{$link.page.previous|regex_replace:'/&amp;page=\d+$/':''}

this uses a regular expression to remove the offending string

      
avatar
Date: 2009-08-25 09:52
Posted By: sn3p  (sn3p)

Maybe this post is will help you:
http://forum.cmsmadesimple.org/index.php/topic,13617.msg173917.html#msg173917