Jan

5

Joomla! 1.5 Pagination Problem

January 5, 2008 |

Recently I have found that Joomla! 1.5 RC4 has pagination problem. When I use it, the previous and start navigation links are not working properly. If you use pagination for front-end pages. You can’t get back to the “start” or page “1″. I traced all the way down to the JPagination class which you can find under root/libraries/joomla/html/pagination.php
Inside the file, there are many bugs, one is at around line 533, the original code is:


$offset = $offset == 0 ? '' : $offset;

while the correct code should be :

$offset = $offset == 0 ? '0' : $offset;

This is because the frontend uses links. The link for page 2 is something like “…&limitstart=20″ but this is left off “start”/”page 1″. The built in components just check for the request variable, they don’t do a getUserStateFromRequest. Hence clicking “start” does nothing. If you by hand append &limitstart=0 it works fine. I have uploaded a bug-free version (at least to me) can be downloaded from here.



Similar Posts

Comments

Name (required)

Email (required)

Website

Speak your mind

1 Comment so far

  1. m0dk1d on May 21, 2008 10:39 am

    the pagination simply sucks, Joomla! is full of bugs.

Sponsors




Links