Limit and RangeStart queries do not work intuitively #104
joshwalsh
started this conversation in
Feature Requests
Replies: 1 comment
-
Thanks for your suggestion and details on this one, @joshwalsh. We'll give this one some thought and see if we should make any adjustments. 🙂 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
If you create an event that repeats, I expected you could use a query like the following to see the next 10 events:
In fact, this gives you 10 events starting at the date the defined on the calendar event, not 10 from the supplied rangeStart. If your event repeated weekly with a limit of 10, on week 11 you wouldn't see any new events. Rather, I expected to see the next 10 repeating events from the supplied rangeStart.
Knowing Craft/Yii inner workings, this makes sense to me as its just adding a LIMIT to the SQL query, but it was a bit unintuitive and caused us some troubleshooting.
I'm not sure if I'd recommend changing the plugin to accommodate this situation or not. It feels like it could be relatively common. But, it also would make it act differently than other Craft query builders. I leave it in your capable hands to decide.
In case anyone else runs into a similar issue, we solved our need by replacing the limit with a rangeEnd instead:
Josh
Beta Was this translation helpful? Give feedback.
All reactions