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 Results Pagination Not Working

June 25, 2014 9:59pm

Subscribe [2]
  • #1 / Jun 25, 2014 9:59pm

    design132

    101 posts

    Is anyone out there able to reproduce this?  I’ve upgraded to EE 2.8.1 and my client realized the search results are not paginating and I’m sure my markup is correct—can anyone replicate this?

    <h2>Search Results</h2>
    
    <p><br />
    <table border="0" cellpadding="6" cellspacing="1" width="100%"><br />
    <tr><br />
    <td bgcolor="#110C09" class="resultHead"  font-size:20px; font-weight:bold; text-shadow:#000;">Trade Title</td><br />
    <td bgcolor="#110C09" class="resultHead"  font-size:20px; font-weight:bold; text-shadow:#000;">Broker</td><br />
    <td bgcolor="#110C09" class="resultHead"  font-size:20px; font-weight:bold; text-shadow:#000;">Trade Date</td><br />
    </tr></p>
    
    <p>{exp:search:search_results switch="resultRowOne|resultRowTwo" limit="2"  paginate="bottom"}</p>
    
    <p><tr><br />
    <td class="{switch}" width="29%" valign="top"  font-size:15px;"><b><a href="http://{auto_path}">{title}</a></b></td><br />
    <td class="{switch}" width="42%" valign="top"  font-size:15px;">{author}</td><br />
    <td class="{switch}" width="29%" valign="top"  font-size:15px;">{entry_date format="%m/%d/%y"}</td><br />
    </tr></p>
    
    <p> </p>
    
    <p>    {paginate}<br />
            Page {current_page} of {total_pages} pages {pagination_links}<br />
        {/paginate}</p>
    
    <p>{/exp:search:search_results}</p>
    
    <p></table>

  • #2 / Jun 26, 2014 2:00am

    Rob Allen

    3105 posts

    Does the pagination show up in your source code? I’m saying that because it may not display, you really need it inside a TR/TD cell.

  • #3 / Jun 26, 2014 3:03am

    design132

    101 posts

    Thank you for the fast reply.  Actually it does not show up in my source code, and I took it out of tables altogether just to see if it would render and it’s still not observing the limit parameter nor the pagination.  Here would be my code with it still not working:

    <h2>Search Results</h2>
    
    <p>{exp:search:search_results switch="resultRowOne|resultRowTwo" limit="2"  paginate="bottom"}<br />
    <b><a href="http://{auto_path}">{title}</a></b></p>
    
    <p><br />
     {paginate}<br />
            Page {current_page} of {total_pages} pages {pagination_links}<br />
        {/paginate}<br />
    {/exp:search:search_results}

  • #4 / Jun 26, 2014 7:15am

    Rob Allen

    3105 posts

    ok, try removing limit=“2” and paginate=“bottom” from the search results tag (you don’t actually need to declare paginate ‘bottom’ because it defaults there anyway).

    Try a search query where you know you will have several results.

    Do you get more than 1 result? If you do then add limit=“1” back to the search results tag, do you see pagination now?

  • #5 / Jun 26, 2014 12:33pm

    design132

    101 posts

    I have followed your steps by removing both the limit and paginate parameter, ran a search where I could see like 10 results and then I added the limit parameter back in and ran the search again but still no pagination. ;-(

  • #6 / Jun 26, 2014 5:32pm

    design132

    101 posts

    I’m just wondering if this is a bug and if I should submit it as a bug report?

  • #7 / Jun 27, 2014 1:12am

    Rob Allen

    3105 posts

    That is strange I have search working fine on 2.8.1

    You have some invalid syntax in your code above, try a bare bones tag like this…

    {exp:search:search_results}
    <a href="http://{auto_path}">{title}</a>
    
    
     {paginate}
            Page {current_page} of {total_pages} pages {pagination_links}
        {/paginate}
    {/exp:search:search_results}

    If that fails it could be a bug, are you sure you updated all files when you upgraded?

  • #8 / Jun 27, 2014 1:54am

    design132

    101 posts

    Still no pagination ;-(  and I’m for sure replaced all files when I uploaded, nothing failed.  But just to be sure I re-uploaded all files and still no pagination.

  • #9 / Jun 27, 2014 2:55am

    Rob Allen

    3105 posts

    Very strange, I’d submit a bug report and see if EL can offer a fix…

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

ExpressionEngine News!

#eecms, #events, #releases