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 Broken

January 19, 2011 10:35am

Subscribe [2]
  • #1 / Jan 19, 2011 10:35am

    Moe 2.0

    24 posts

    I upgrade to EE 2.1.3 Build 20101220 and noticed an issue with pagination.

    The channel:entries query is returning the correct number of entries—and the pagination links display correctly on Page 1—example: Your search returned 17 article—Page 1 of 2

    When I click the Next link the result set now shows ALL articles in the channel—Your search returned 24 articles—Page 1 of 3

    What I did notice is that the Next Link is going to /news/results/P10—wasn’t this P1 in the previous version?

    In either case pagination was working in EE 2.1.1

    {exp:channel:entries channel="news" limit="10" paginate="top" dynamic_parameters="category"}
      {if paginate}{paginate}
        <div id="paginatation-top">
          <div class="paginate">
            {if previous_page}<a href="http://{auto_path}" class="prev">Prev</a>{/if}
            Page {current_page} of {total_pages}
            {if next_page}<a href="http://{auto_path}" class="next">Next</a>{/if}
          </div>
        </div>
      {/paginate}{/if}
      {if {count} == 1}
        <div id="titlebox">
          <table>
            <tr>
              <td class="alignleft">{site_url}images/site/news_header.png</td>
              <td class="aligncenter">Your search returned <strong>{absolute_results} article{if {absolute_results} > 1}s{/if}</strong>.</td>
              <td class="alignright"></td>
            </tr>
          </table>
        </div>
      {/if}
      {snp_article}
    {/exp:channel:entries}
  • #2 / Jan 20, 2011 3:56am

    Ingmar

    29245 posts

    No, P10 is fine if you’re starting off at entry #11. How and where are you performing this search? Do you’ve got a link to the site?

  • #3 / Jan 20, 2011 9:23am

    Moe 2.0

    24 posts

    Yeah, I realized that about P10 afterwords, but didn’t want to bump my posting down in the queue.

    It’s definitely related to dynamic_parameters=“category”.  I changed that to category=“28” and the pagination works without a problem.

    If I use dynamic_parameters=“category” and select only 28 checkbox from the search page, then page 1 of the search is correct.  When I click Next it is appears to lose the category argument and shows all entries in the category.

    Unfortunately it’s a secured site with proprietary/sensitive content.  I need to check with the client before giving you access; they’ve been pretty strict on keeping it locked.  If it’s OK I’ll PM you.

    In the meantime I would appreciate it if you could look further into the dynamic_parameter issue.  If it helps I could send Template Debug and SQL Output.

  • #4 / Jan 20, 2011 4:18pm

    Ingmar

    29245 posts

    If I use dynamic_parameters=“category” and select only 28 checkbox from the search page, then page 1 of the search is correct.  When I click Next it is appears to lose the category argument and shows all entries in the category.

    Yes, it looks like the dynamic parameter does not carry over to the next page: it’s set “on the fly” using POST data submitted via a form for the very next page only. I’m not sure this is supposed to work, I don’t recall anybody trying before. Let me bring this up with the devs.

  • #5 / Jan 20, 2011 6:04pm

    Ingmar

    29245 posts

    Unfortunately, to quote from the docs:

    If you have pagination links on your page they will not retain the page layout options created dynamically using this feature.

    So for now, dynamic parameters won’t work with pagination, sorry.

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

ExpressionEngine News!

#eecms, #events, #releases