ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Pagination when Limit is less than 10

August 05, 2010 7:49am

Subscribe [2]
  • #1 / Aug 05, 2010 7:49am

    Chessie

    20 posts

    After updating to the 2.1.0 I found that my home page, which limits number of visible entries to six, was not working correctly.  Clicking on the next page link (which shows up fine) would take it to a “Page not found”.  Through experimentation I found that if I raised the limit above single digits it worked fine.  Then I realized that if I manually changed the URL ending in /P6 to /P06, it displayed page 2 the way I expected.  How do I cause the pagination to create the links with a minimum of 2 digits, or is there something else obvious I’m doing wrong?

  • #2 / Aug 05, 2010 4:25pm

    Ingmar

    29245 posts

    Are you removing index.php from your URLs or using .htaccess / mod_rewrite in any other way?

  • #3 / Aug 05, 2010 4:27pm

    Chessie

    20 posts

    Yes.  Perhaps I need to change something there?

  • #4 / Aug 05, 2010 4:32pm

    Ingmar

    29245 posts

    Perhaps. The quickest way to find out would be to try without the .htaccess, see if that changes anything. Also while we don’t officially support server side rewriting can you paste the contents of your file here? Perhaps it’s something quick and obvious.

  • #5 / Aug 05, 2010 6:06pm

    Chessie

    20 posts

    Apparently it does have something to do with my .htaccess file.  Works fine when I take it out of the equation.  Here’s what’s in it:

    RewriteEngine On
    
    RewriteCond $1 ^(site|search|current|about|groups|info|sermons|gallery|photos|page-comps|seek|build|commit|calendar|weblog|P[0-9]{2,8}) [NC]
    
    RewriteRule ^(.*)$ /index.php/$1 [L]

    Maybe something to do with it being the site home page?

  • #6 / Aug 05, 2010 6:16pm

    Ingmar

    29245 posts

    ... P[0-9]{2,8}...

    ... is a regular expression which expects a “P” followed by 2 to 8 digits. Try to change “2” to “1” here.

  • #7 / Aug 05, 2010 6:27pm

    Chessie

    20 posts

    That was it!  I know really nothing about .htaccess, but most of this I followed.  Didn’t really know what those numbers were though.  Thanks for your help Ingmar!

  • #8 / Aug 06, 2010 5:00am

    John Henry Donovan

    12339 posts

    Glad Ingmar was able to help. Feel free as always to start a new thread if you have any more questions

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases