Page 1 of 1

[solved] Album Page Count Broken?

Posted: Sat Nov 29, 2008 11:24 pm
by jcolvard
???

Hello, anyone know why Album module page count dosent work?  

Followed all advice found on forum and still have no luck getting previous nexct to work.  next page link goes too last page and first/previous page links do nothing.  

Kind of a significant bug. Nothing in bugtracker = CMSMS 1.4.1 and Album 0.9.3

Thanks
J

Re: Album Page Count Broken?

Posted: Wed Jan 07, 2009 7:03 am
by Acornweb
There is an ambiguous note in the bug tracker.

This bug may be caused by Elija using a variable 'page' to denote the page of the album while the CMS is also using page to denote the page of the CMS page.

The error needs to be fixed within the PHP of the module which is a bit beyond my current PHP skills - BUT!!

TEMPORARY WORKAROUND!!

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

e.g.
/index.php?mact=Album,,default,1&albumid=1&page=2&returnid=53&page=53

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

These two variables need to be disambiguated in the module code

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

Code: Select all

|regex_replace:'/&page=\d+$/':''
an example is given below

Code: Select all

{$link.page.previous|regex_replace:'/&page=\d+$/':''}
this uses a regular expression to remove the offending string

the URL becomes /index.php?mact=Album,,default,1&albumid=1&page=2&returnid=53

which works for me at least

[SOLVED] Re: Album Page Count Broken?

Posted: Mon Jun 15, 2009 4:11 pm
by jcolvard
Yea, this is an old post but I had a heck of a time with this so i wanted to add a solution anyway.

My problem was  pagination failing in photo album and not being able to navigate through the album gallery image pages. 

I think that pretty URLS conflicts with displaying links inline. Soto fix the issue in my install i simply unchecked the box next to : Use Inline Links - This will make the content of the page always be shown with the Album tag above all pictures. In addition this will make Album work correctly when placed in additional page content blocks. NOTE: Enabling this option will disable Album's use of pretty URLs.:

I'm on CentOS 5
PHP 5.1.x
mysql 5.x
apache 2.2.x
safe mode on
0755 for everything but tmp

hope this helps someone
peace