picandocodigo / List-Category-Posts

WordPress plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode.
http://wordpress.org/extend/plugins/list-category-posts/
GNU General Public License v2.0
241 stars 112 forks source link

Pagination giving bad links after first use #511

Closed OllieA closed 8 months ago

OllieA commented 8 months ago

Expected behavior

With pagination=yes pagination links at bottom should be of the form: https://www.arboretumfriends.org/gallery-test/?lcp_page0=2#lcp_instance_0

and each click of Next should increment the lcp_page0 value

Actual behavior

On the first click of Next, I get https://www.arboretumfriends.org/gallery-test/?lcp_page0=2#lcp_instance_0 which correctly shows the 2nd page of posts.

However, while on that 2nd page and I click Next, I get https://www.arboretumfriends.org/gallery-test/#038;lcp_page0=3#lcp_instance_0 which displays the initial page again, not the expected 3rd page.

Note the #038; entity has replaced the question mark that should precede the lcp_page0 value.

This behavior is repeated on subsequent clicks of either page numbers or Next or Previous until I reload the page.

Shortcode used and steps to reproduce the behavior

The shortcode is: [catlist name=photogallery date=no dateformat="m/d/Y" author=no excerpt=no title_class=lcp_title title_tag=h3 pagination=yes numberposts=5 content=full template=photo-gallery ]

I have tried with and without pagination_bookmarks=no, and with and without instance=1, all with the same results.

WP version, LCP plugin version (versions of other software if relevant, e.g. PHP)

WP 6.4.2 PHP 7.4.3-4ubuntu2.19 LCP 0.89.4

Thanks for your help.

klemens-st commented 8 months ago

Thanks for reporting. The fix is included in 0.89.5.

OllieA commented 8 months ago

Thanks for the prompt fix.