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.

Search Pagination Doesn't Advance

April 29, 2011 6:00pm

Subscribe [4]
  • #1 / Apr 29, 2011 6:00pm

    Unifusion

    103 posts

    Hello,

    I have a simple search form, marked up thusly:

    {exp:search:simple_form result_page="/search/results" no_result_page="/search/no_results" search_in="everywhere" results="3"}
                <input type="search" name="keywords" placeholder="SEARCH">
                <input type="submit" value="">
            {/exp:search:simple_form}

    And my results page, marked up thusly:

    {exp:search:search_results switch="even|odd"}
        <div class="result {switch}">
        <h2><a href="http://{page_url}">{title}</a></h2>
    <p>    {exp:search_hilite}{excerpt}{/exp:search_hilite} <a href="http://{page_url}">View Page</a><br />
        </div><!--/.result--><br />
        {/exp:search:search_results}</p>
    
    <p>{if paginate}<br />
    {page_count} {paginate}<br />
    {/if}

    When I perform a search, I am taken to the results page, and 3 entries display. The pagination shows that I am on page 1 of X pages. When I click on page 2, for example, the URL is appended with “P3”, the page refreshes to show the same 3 results from the first page, and the pagination still shows that I am on page 1 of X pages. If I click on page 3, the URL is appended with “P6”, and the same thing happens.

    No idea what’s going on here. I’m running EE 2.1.3.

  • #2 / May 02, 2011 4:03pm

    Brandon Jones

    5500 posts

    Hi Unifusion,

    The URLs you’re seeing are correct (P is not short for “page”). But with only 3 results, the pagination shouldn’t be showing at all.

    1.Can you try with only the above code by itself in the templates?
    2. What happens if there are, say, 4 results?
    3. Any extensions?

  • #3 / May 02, 2011 4:09pm

    Unifusion

    103 posts

    Hi Brandon,

    I don’t understand. I have the search set to limit the results to 3 per page, so the pagination shows up because there are more than 3 total results.

    In the example I used before, I was using a search term that returned 7 total results, so the pagination showed “page 1 of 3”.

  • #4 / May 03, 2011 2:02am

    John Henry Donovan

    12339 posts

    Unifusion,

    Are you removing index.php via a htaccess file? If so please disable temporarily and reinstate index.php back into your General Configuration settings. Now test again.

    Have you got a link where we could see this happen for ourselves?

  • #5 / May 03, 2011 12:06pm

    Unifusion

    103 posts

    It’s still happening even with index.php inserted.

    I’ll PM you a URL.

  • #6 / May 04, 2011 11:23am

    Sue Crocker

    26054 posts

    Hi, Unifusion. We work in shifts, so if you sent something to John Henry, he won’t be back again for about 12 hours. Please click MSG next to my avatar, and I’ll put the info into a user record we keep so other TSS can assist if I go off shift.

  • #7 / May 05, 2011 3:22am

    John Henry Donovan

    12339 posts

    Hi Unifusion,

    Sorry I missed those emails from you. I can see the behaviour you are experiencing but cannot replicate on my own install.

    Are you using any add-ons? Anything that might interfere with a URL like Structure or Freebie?

  • #8 / May 05, 2011 12:04pm

    Unifusion

    103 posts

    Hi John,

    Yes, I have Structure installed, but it’s not controlling the search results pages. Those are static templates.

    Please let me know what you need to get this issue resolved, and I’ll get it to you immediately. I really need to get this fixed soon. This support request has been open for 6 days now.

  • #9 / May 05, 2011 12:07pm

    John Henry Donovan

    12339 posts

    Unifusion,

    Structure controls a lot of the URLs when installed through it’s extension, not just entry pages.
    Can you try and disable the Structure extension please? Just the extension, not the module or accessory.
    Make a db backup for piece of mind first.

    Now try the search results again

  • #10 / May 05, 2011 12:25pm

    Unifusion

    103 posts

    Yup, disabling the Structure extension fixed the problem. Looks like the guys have pushed out a fix for it.

    Thanks for the quick response John, I appreciate it.

  • #11 / May 06, 2011 7:59am

    John Henry Donovan

    12339 posts

    No problems. 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