Open mitchclarkson opened 2 years ago
This was fixed in one of the recent update we did 👍 Thanks for creating the issue and letting us know.
Re-opening this. Issue was reported again and I was able to reproduce on Dawn 8.0.0 with 50+ collections when sorted by any other method than A-Z.
I think that might be something we shouldn't have introduced 🤔 That sorting option for the collections. Cause it doesn't seem like paginate will work with it. So we could do our own custom pagination in JS. Not sure if it's worth the effort though. When I look at other themes I think it's the same issue. Debut doesn't paginate, I see some other themes limiting the amount of collections to 48
This issue is still present in August 2024 @kmeleta @ludoboludo any insight into this? Is there an internal ticket to deal with the underlying issue that causes this?
Introduced in #1745.
Steps to reproduce
Observed behaviour
Collections are sorted correctly and pagination produces the expected number of pages, but all collections are output on each page. Oddly, more than 50 collections can be output on each page (I tested up to 51 collections), even though for loops are supposed to have a limit of 50 iterations per page.
Expected behaviour
Collections would be sorted correctly and pagination would produce the expected number of pages, but collections would be paginated correctly across each page.
What's causing the issue?
Lines 6–24 of sections/main-list-collections.liquid are:
I think the issue is caused by a combination of assigning the global
collections
object to a variable of the same name, and using this variable in thepaginate
tag.Out of interest, I renamed the variable and received this error, Liquid error (sections/main-list-collections.liquid line 24): Array '_collections' is not paginateable., which leads me to believe the
paginate
tag is still using the globalcollections
object while we're looping through the sorted collections in the local variable.