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.

{auto_path} problem - sometimes adds forward slash, sometimes doesn't

February 11, 2011 8:17pm

Subscribe [4]
  • #1 / Feb 11, 2011 8:17pm

    Mark Wushu

    58 posts

    Hi all,

    I’ve got a problem with the {auto_path} variable in my multi-post pagination pages. The “next” link includes an extra “/” for page 2 onwards, which although looks wrong with “//” in the url, still does navigate ok. You can see this happening at:

    http://www.ipcn.co.uk/en/news/P1

    The main problem I’m having is that on a deeper page where I’m running the “archives” and “category” requests through the “news” index page, pagination behaves differently, in that the “next” links work fine, but “previous” links leave the “/” out entirely! So that the url page segment e.g. “P0” or “P1”, merges with the previous segment. You can see this happening at:

    http://www.ipcn.co.uk/en/news/archives/2011/P1

    In fact, clicking “next” and “previous” several times turns the last segment into something like “2011P1P0P0P0P0P0”!

    Can anyone help figure out what is wrong?

    One possible clue is that the site is bilingual, and I amended the index.php pages according to the following:
    http://expressionengine.com/wiki/Multi_language_site_alternative/

    Thanks,

    Mark

  • #2 / Feb 12, 2011 4:26pm

    Greg Salt

    3988 posts

    Hi Mark,

    Which version and build of EE are you using? Can you please test this with your .htaccess rewrite rules disabled?

    Cheers

    Greg

  • #3 / Feb 17, 2011 7:25pm

    Mark Wushu

    58 posts

    Hi Greg,

    I’m using v2.1.3, Build:  20101220 (which I believe is the latest stable version).

    I disabled the .htaccess rewrite rules, and then tried deleting all the contents of the .htaccess file, but it still acts the same. What I can say is that it’s something in the changes made to make it bilingual as per the expression engine wiki link, as if you look at the page without the language url segment (below), the pagination works perfectly:

    http://www.ipcn.co.uk/news/archives/2011/P3

    Could there be a fix in the index.php files? (the 2 in the additional language folders?)

    Thanks in advance for any help!

    Mark

  • #4 / Feb 18, 2011 4:42am

    John Henry Donovan

    12339 posts

    Mark ,

    After disabling your htaccess. Add index.php back into your General Configuration. Then test

    Also try adding paginate_base= parameter to see if that makes a difference

  • #5 / Feb 20, 2011 5:44pm

    Mark Wushu

    58 posts

    Hi John,

    I’d never seen the parameter ‘paginate_base=’ before so gave that a go and managed to make that work! (My bad - should have looked it up, although I only checked the paginate tags in the manual.)

    It does what it says in that it sets the base template, but I had initial problems since I needed to put in the segments “archive”, “category” or nothing at all based on the url, into the pagination links (whether the user was looking at the index page or a dynamic filter of archives or categories.

    However, it seems ‘paginate_base=’ can also include segment variables and conditionals too.

    Superb - thanks again John!

  • #6 / Feb 21, 2011 9:57am

    Sue Crocker

    26054 posts

    Glad John was able to help. Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases