Thought I would post this here for others who need it.
When upgrading EE to EE2.3 or higher you may encounter an issue whereby you pagination may not work. One of the highlighted features of 2.3 was the new pagination features but take note that pages that templates that worked before 2.3 may not work with pagination once you do the upgrade.
If your channel entry tag and pagination are in separate locations, like so:
<ul>
{exp:channel:entries channel="articles" limit="10" }
<li>{title}</li>
{/exp:channel:entries}
</ul>
<!-- Some code -->
{exp:channel:entries channel="articles" limit="10" paginate="bottom"}
{paginate}
{pagination_links}
{/paginate}
{/exp:channel:entries}If you’ve never seen this pattern before then dont worry as it is merely a neat way of having your pagination in a location separate from your entry listing (which is handy if you’re looping inside an unordered list). If you have used this in you templates then be aware that this will break in 2.3.
The channel entry tag now scans its contents to try and detect the {paginate} tags. If it cant find them then it disables its pagination detection and will simply display the first page of results. The solution is to simply add an empty paginate tag pair to the {exp:channel:entries} tag pair:
<ul>
{exp:channel:entries channel="articles" limit="10" paginate="bottom" }
<li>{title}</li>
<!-- Empty Tag Pair to force pagination -->
{paginate}{/paginate}
{/exp:channel:entries}
</ul>
<!-- Some code -->
{exp:channel:entries channel="articles" limit="10" paginate="bottom"}
{paginate}
{pagination_links}
{/paginate}
{/exp:channel:entries}Took me a heck of a long time to come to realise this was the issue, so I hope this is of use to someone.
@EllisLab:
During debugging to try and resolve this issue I was noticing that the {exp:channel:entries} tag correctly queries the database for the paginated data but then it attempts to find the {paginate} tags, fails and so does another database query for the non-paginated data. Is this correct?
I was convinced this was a bug since I could see the correctly paginated DB query, yet the template was showing results for a non-paginated DB query!