TransWikia.com

Adding Pagination causes 500 Server Error

ExpressionEngine® Answers Asked on October 2, 2021

I am running EE 5.3.2.

Using the following code I am have issues with page loads that end in 500 Server Error

{exp:channel:entries channel="blog" category="184" limit="21" paginate="bottom" }       
    <div class="col-lg-4 position-relative">
        <img class="img-fluid" src="{entry_thumbnail}" alt="{title}" />
        <h2 class="text-center double-row">{title}</h2>
        <p class="summary-block">{brief_summary}</p>
        
        <div class="text-center center-bottom">
            <a class="btn read" href="/new/blog/{url_title}" role="button">View details &raquo;</a>
        </div>
    </div><!-- /.col-lg-4 -->
    
    {paginate}
    <div class="col-12">
        <p class="text-right">Page {current_page} of {total_pages} pages {pagination_links}</p>
    </div>
    {/paginate}
{/exp:channel:entries}

If I remove the pagination code everything works fine. Any clues what may be causing this and how to resolve it?

One Answer

Pagination in EE works by adding a segment to the end of your URI - so my guess is that you have an issue with routing.

Try loading your template with the pagination block removed (i.e. so you get the page) and then add /P5to the end of your URI and see what you get. If you get the 500 error, then that would confirm the issue.

What you do next depends a bit on whether the site as a whole is working - if you can navigate between pages OK then it would suggest the issue is pagination itself, if you cannot navigate easily within the site, either the EE config or the .htaccess file might be the issue.

Just to eliminate such from your consideration, also have a look at whether there is any routing over-rides in use (e.g. from the EE Template Routes area, or an add-on such as Detour Pro); if you have such check to make sure that the routes being changed include consideration of the EE pagination slugs.

HTH

Answered by JCOGS Design on October 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP