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.

Channel Entires Pagination links not working

April 16, 2012 5:54am

Subscribe [9]
  • #1 / Apr 16, 2012 5:54am

    ppm

    10 posts

    Hi

    I am having a few difficulties with pagination with version 2.4.0. I have used pagination before an have had no issues, yet for soem reason the links all link to the same page even though I have multiple entires in my channel.

    My code is as follows:

    {exp:channel:entries channel="blog_articles" limit="2" paginate="bottom" dynamic="no"}
    
    <small>Posted - {entry_date format="%l %j%S %F %Y"}</small>
      
    
    
    {article_image}
    
    <div class="article">
    
    
    {article}
    
    </div>
    
    
    {paginate}
    {pagination_links}
    {/paginate}
    
    
    {/exp:channel:entries}

    I have also tried removing the dynamic=“no” etc but the same page still loads, seems strange as I have pagination working elsewhere using the same code :/

    Any thought would be appreciated.

    Thanks

  • #2 / Apr 16, 2012 12:55pm

    nomoretables

    42 posts

    Is this on your blog index template?

  • #3 / Apr 17, 2012 5:48am

    ppm

    10 posts

    Hi nomoretables

    Yes this is on my blog index template.

    Thanks

  • #4 / Apr 17, 2012 10:20am

    Dan Decker

    7338 posts

    Hi Matt,

    Let’s get you what you are after!

    Can you copy and paste the HTML output you are seeing? Or at least a sample link of the {pagination_links} tag?

    Go to Admin->Channel Administration->Channels: Edit Preferences

    What do you have set for “Channel URL” for this channel?

    I look forward to your response!

    Cheers,

  • #5 / Apr 22, 2012 9:44pm

    ppm

    10 posts

    Hi there,

    The pagination worked absolutely fine before we upgraded the site to 2.4.  No code has changed.

    This has happened on al our sites we have just upgraded. 

    The code we have is:

    {exp:channel:entries channel="news" dynamic="no" paginate="both" limit="5" category="10"}
    {paginate}
    
    <div class="pagination">Page {current_page} of {total_pages} pages {pagination_links}</div>
    
    {/paginate}
    .....

    In the channel URL we have:  http://www.ctcwings.com/news

    The website in question is http://www.ctcwings.com - go to http://www.ctcwings.com/news and click on page 2.  It changes the URL to http://www.ctcwings.com/news/p5, but the same news articles are showing, and it still says ‘Page 1’ in the pagination links.

    All happened upon upgrade to 2.4.

  • #6 / Apr 24, 2012 5:57pm

    Dan Decker

    7338 posts

    Hi Matt,

    In the channel URL we have:  http://www.ctcwings.com/news

    Is that the actual value? That may be the booger. That needs to have the protocol and trailing slash:

    <a href="http://www.ctcwings.com/news/">http://www.ctcwings.com/news/</a>

    Also, what is the template name in the “news” group that is displaying these results?

    Are you using Structure?

    Cheers,

  • #7 / Apr 25, 2012 7:45am

    ppm

    10 posts

    Yes the actual value is:  http://www.ctcwings.com/news/

    The template group and template is actually ‘Europe’ and ‘News’ - we are using Structure.  As I said, this was working perfectly until we upgraded to 2.4.  No code has changed and the same has happened on a few of our sites we have upgraded.

  • #8 / Apr 25, 2012 12:17pm

    ppm

    10 posts

    Also, this problem has happened on sites where Structure is not installed - therefore this is not the culprit.

  • #9 / Apr 26, 2012 2:19pm

    Dan Decker

    7338 posts

    Hi Matt,

    Ok, try this for me. I found this bug report, and it seems that despite the User Guide, pagination may not dig the dynamic parameter.

    {exp:channel:entries channel="news" dynamic="no" paginate="top|bottom|both" limit="5" category="10"}

    What version did you update from? This seems to affect 2.3, and now 2.4?

    Cheers,

  • #10 / Apr 27, 2012 5:58am

    ppm

    10 posts

    Hi…

    We have tried that and it doesn’t seem to work.  Removing the dynamic parameter does not show any news articles at all…. 

    We upgraded from 2.2 - 2.4.  Is this an EE bug?  If so do you have any indication on when a fix will be available?

    Many thanks!

  • #11 / Apr 30, 2012 3:47pm

    Dan Decker

    7338 posts

    Hi Matt,

    Is this an EE bug?

    Possible, but did you try the code as I posted above? It still includes the dynamic parameter, but specifies all there values for the paginate parameter. That is stated as the current workaround.

    Let me know for sure.

    Cheers,

  • #12 / May 03, 2012 1:33pm

    JohnGribben

    111 posts

    Hi Matt & Dan,

    I’m having the same problem, pagination not working in 2.4.0.

    My build is 20120123.

    I am also using Structure (3.1.3)

    I tried the workaround above, and it didn’t help:

    {exp:channel:entries dynamic="off" status="not closed" channel="in-the-news|of-interest|press-releases" disable="categories,category_fields,member_data" orderby="news-post-date" sort="desc" paginate="top|bottom|both" limit="10"}
    
    ...
    
    {paginate}
    {pagination_links}
    {/paginate}
    
    {/exp:channel:entries}

    Thanks!
    John

  • #13 / May 04, 2012 11:22am

    mathalete

    86 posts

    Hi all,

    Same for me.

    EE v2.4.0, build 20120123.
    Structure 3.2.0

    {!-- There are 2 entries in this channel, just display 1 to get pagination to work --}
    
    
    {exp:channel:entries channel="{segment_2}" dynamic="off" limit="1" orderby="date" sort="desc" paginate="bottom"}  
                                
                    
                    {if count=="1"}
                      <ol class="slats">
                    {/if}
                    
                      <li class="group">
                        <h3><a href="http://{page_url}">http://placehold.it/60x60{title}</a></h3>
    <p>                    <span class="meta">{entry_date format="%d %M %Y"}</span>{news-snippet}<br />
                      </li><br />
                      <br />
                    {if count == total_results}  <br />
                      </ol><br />
                    {/if}<br />
                    <br />
                    {paginate}{pagination_links}{/paginate}<br />
                    <br />
                                    <br />
                    {/exp:channel:entries}

    This code displays the pagination list, which in this case is 2 pages.

     <a href="http://website.org.uk/who-we-are/news/P1"><</a> <a href="http://website.org.uk/who-we-are/news/P1">1</a> <strong>2</strong>

    But clicking on the pagination link ‘2’ doesn’t display the second page of results.

    Not sure if this is structure of EE.

  • #14 / May 04, 2012 4:47pm

    Dan Decker

    7338 posts

    Hi John, mathalete,

    You will probably need to update Structure as the first step. 3.1.3 is a bit out of date.

    A quick search on the Structure support site shows quite a few recent issues with pagination. You might need to file a ticket there.

    If you test pagination on a template outside of Structure, does it behave properly?

    Cheers,

  • #15 / Sep 10, 2012 1:57pm

    Shane Eckert

    7174 posts

    Hey there mathalete,

    Do you have an update for us? How are things going?

    Would love you help if I can.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases