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 links display "Page 1 of 2" but there is only one page

October 15, 2010 1:00pm

Subscribe [2]
  • #1 / Oct 15, 2010 1:00pm

    *

    20 posts

    EE: 2.1.0
    Build: 20100712

    -
    Hello,

    I’m having and odd behaviour with pagination links, it says “Page 1 of 2” when there is only one page. This is the code:

    <div id="main">
    <div class="content">
    
    <h1 class="etiquetas_cuadros">Soporte: <strong>{exp:channel:category_heading channel="cuadros_contenido"}{category_name}{/exp:channel:category_heading}</strong></h1>
    
    {exp:channel:entries channel="{my_channel}" orderby="date" sort="desc" limit="12" disable="member_data" paginate="bottom"}  
    
    {item_wrapper}
    
    {paginate}
    <br class="clearfloat" >
    <div id="pagination">
    [ Página {current_page} de {total_pages} ] {pagination_links}
    </div>
    {/paginate}
    
    {/exp:channel:entries}
    
    </div>
    </div>

     
    There are only three results for that code at this moment, but pagination links display “Page 1 of 2”, please note that there are no links for page one or two, just the text.


    Thank you,

    Abraham

  • #2 / Oct 15, 2010 6:13pm

    Sue Crocker

    26054 posts

    Hi, Abraham.

    What happens if you just use a simpler template? Just the exp:channel:entries loop and the paginate code.

    Here’s a link to one of my play sites with your pagination code.

    http://test-ee.com/index.php/recipes

    Notice I’m only specifying the title, and my limit is set to 10. I have two items in there right now.

  • #3 / Oct 15, 2010 7:48pm

    *

    20 posts

    Hello Sue,

    It seems that with less code the result is the same, I have tried with this:

    {exp:channel:entries channel="{my_channel}" orderby="date" sort="desc" limit="12" disable="member_data" paginate="bottom"}  
    
    {paginate}
    <br class="clearfloat" >
    <div id="pagination">
    [ Página {current_page} de {total_pages} ] {pagination_links}
    </div>
    {/paginate}
    
    {/exp:channel:entries}


    But I have noticed something interesting with the parameter “limit” (remember that there are only three results):

    I have attached screen captures with the results:

    a. limit=1 - First page [incorrect - left] and second page [correct - right]
    b. limit=2 - First page [correct - top] and limit=3 - Only page [correct - bottom]
    c. limit=4 - Only page [incorrect]


    Thank you,

    Abraham

  • #4 / Oct 17, 2010 1:26pm

    Greg Salt

    3988 posts

    Hi Abraham,

    Please update to the latest build. This bug was fixed in build 20100720.

    Cheers

    Greg

  • #5 / Oct 17, 2010 4:23pm

    *

    20 posts

    Hi Greg,

    I have updated to the latest build and now pagination links are ok.


    Thank you,

    Abraham

  • #6 / Oct 17, 2010 4:42pm

    Greg Salt

    3988 posts

    Hi Abraham,

    Excellent. Please post back if you have further questions or problems.

    Cheers

    Greg

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

ExpressionEngine News!

#eecms, #events, #releases