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

July 29, 2010 2:00am

Subscribe [3]
  • #1 / Jul 29, 2010 2:00am

    melegaunt

    31 posts

    Having some trouble with my Pagination for Search results.

    It doesn’t do it lol.

    If I search my page for a word it will list all of the results (even if there is 100 of them)

    I have the exact Pagination Script listed in the docs.

    If i add the results=“20” line in my search script i get a PHP error on submission.

    Any idea whats wrong?


    Here is an example of what I have going on:

    Search Script:

    {exp:search:simple_form site="abs|ans|boi" result_page="search-results" show_future_entries="yes"}
       <span><label for="keywords">Search:</label></span>
       <span><input type="text" name="keywords" id="keywords" value="" size="18" maxlength="100" /></span>
       <span><input type="submit" value="Submit" class="submit" /></span>
    {/exp:search:simple_form}


    Search Results Page:

    <h2>Search Results for "{exp:search:keywords}{/exp:search:keywords}"</h2>
    
    <p> </p>
    
    <p><br />
    {exp:search:search_results switch="#000000|#003300"}<br />
       <div><br />
          <ul><br />
             <li><b><large><a href="http://{auto_path}">{title}</a></large></b><br />
                <ul><br />
                   <li><i>{excerpt}</i></li><br />
                </ul><br />
             </li><br />
          </ul><br />
       </div><br />
       </p>
    
    <p>{/exp:search:search_results}</p>
    
    <p> </p>
    
    <p> </p>
    
    <p>{if paginate}<br />
       <center><br />
          <div class='paginate'><br />
             <span class='pagecount'>{page_count}</span>  {paginate}<br />
          </div><br />
       </center><br />
       </p>
    
    <p>{/if}</p>
    
    <p>{exp:search:total_results}<br />
       {total_results}<br />
    {/exp:search:total_results}

  • #2 / Jul 29, 2010 3:47am

    melegaunt

    31 posts

    I also want to add the PHP error i get when i add results=“20” to my {exp:search:simple_form}

    Works fine without the results tag just doesn’t limit the results as it should.

    A PHP Error was encountered

    Severity: Notice

    Message: Undefined variable: dynamic

    Filename: search/mod.search.php

    Line Number: 1187
    A PHP Error was encountered

    Severity: Warning

    Message: Cannot modify header information - headers already sent by (output started at /home/aboutbs/public_html/system/codeigniter/system/core/Exceptions.php:166)

    Filename: core/Common.php

    Line Number: 428

    Fatal error: ob_start() [ref.outcontrol]: Cannot use output buffering in output buffering display handlers in /home/aboutbs/public_html/system/codeigniter/system/core/Exceptions.php on line 162

  • #3 / Jul 29, 2010 6:36pm

    melegaunt

    31 posts

    Still having this issue. Any idea why folks?

  • #4 / Jul 29, 2010 6:36pm

    Brandon Jones

    5500 posts

    I was able to reproduce this and I filed a bug report. Please keep an eye on that for further updates.

    Thanks, melegaunt!

  • #5 / Jul 31, 2010 7:33pm

    melegaunt

    31 posts

    Anytime lol!

  • #6 / Aug 01, 2010 4:31pm

    Greg Salt

    3988 posts

    Hi melegaunt,

    Thanks very much. I’ll close this thread but as Brandon says keep an eye on the bug report for updates.

    Cheers

    Greg

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

ExpressionEngine News!

#eecms, #events, #releases