Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Prevent incompatible pagination parameter combinations #10415

Merged
merged 7 commits into from
Jul 10, 2024

Conversation

jesseleite
Copy link
Member

@jesseleite jesseleite commented Jul 8, 2024

Throw an error, as per Jason's suggestion here when trying to use paginate collection tag parameter with incompatible params like limit and chunk...

{{ collection:articles paginate="10" limit="50" }}
{{ collection:articles paginate="10" chunk="50" }}

This is obviously kinda confusing because limit and chunk are completely and silently ignored in the above scenarios.

Introducing exceptions may seem like a breaking change, but technically these params were never meant to work together like this; It would only be breaking if people are relying on this already non-functional combo of tag params.

@jesseleite jesseleite requested a review from jasonvarga July 8, 2024 19:11
@jasonvarga jasonvarga merged commit 65e0c5b into 5.x Jul 10, 2024
17 checks passed
@jasonvarga jasonvarga deleted the fix/prevent-ambiguous-limit-or-offset-with-paginate branch July 10, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants