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 Breaks when used with Session ID

January 08, 2009 3:36pm

Subscribe [1]
  • #1 / Jan 08, 2009 3:36pm

    Cameron Corda

    31 posts

    This is the only thread I could find on this issue, I suspect it’s not an issue because not too many people run with session on their website.

    However we need to for some government sites (which can’t use cookies).

    When this happens, a user logged into the control who is browsing the site will have pagination and search forms with the added session code, and they’ll trigger 404s.

    I’m not sure why pagination links would need session code added, any insight anyone?

      [Moderator Note: Split from this thread.]

  • #2 / Jan 08, 2009 3:43pm

    KeithW

    138 posts

    If you are tracking whether a user is a logged-in member or not, then such session info. is usually stored in cookies.
    If cookies are disabled, then session strings are added to the URL to identify the user. Could this be the issue?

  • #3 / Jan 08, 2009 3:51pm

    Cameron Corda

    31 posts

    we’re not testing for if logged_in, if member_group, anything like that.  Here is our pagination code:

    {paginate}
    {if "{total_pages}" != 1}{!-- only show pagination code if more than one page --}
      Page {current_page} of {total_pages} pages {pagination_links}
    {/if}
    {/paginate}

    And in our settings:

    CP Session Type: “Cookies and session ID”
    And User Session Type “Sessions Only”

  • #4 / Jan 08, 2009 8:53pm

    KeithW

    138 posts

    If users are logged in and using sessions, not cookies, then sid (session ID) is displayed in the URL.
    So presumably visiting a page that requires the user to be logged in—then browsing an area that
    is spread over several pages—causes the problem.
    Ideally either the SID should appear at the end of the URL, or the paging code should ignore any SID part. Bug?

  • #5 / Jan 09, 2009 1:50pm

    Cameron Corda

    31 posts

    That’s what I was thinking Keith.  I think it’s related to the htaccess rewrite rules to remove index.php.

    I can think of three fixes:
    * adding exclusions for session ID as the first path to the htaccess rules
    * not having it as a part of pagination (session is not added to permalink=”” rules for example)
    * moving session to the end of the url

  • #6 / Jan 09, 2009 1:53pm

    Pascal Kriete

    2589 posts

    Hey Cameron,

    I’ve split this off from the old thread.  What version and build are you running?  Also, does your htaccess file add a question mark to the url?

    Can you temporarily remove the htaccess to see if that fixes it?

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

ExpressionEngine News!

#eecms, #events, #releases