There seems to be a default limit to for loops in craft of 100.
I have a channel with quite a few entries.
How can I disable this without writing nasty things like .limit(100000000)
There seems to be a default limit to for loops in craft of 100.
I have a channel with quite a few entries.
How can I disable this without writing nasty things like .limit(100000000)
Set the limit to null limit(null).
limit to null is not necessary unless trying to override a previously set value.
Source: https://github.com/craftcms/cms/blob/develop/CHANGELOG-v3.md#300---2018-04-04
– Ben Croker
Jul 21 '20 at 17:58
As of Craft 3, there is no limit by default.
Per the CHANGELOG:
Element queries are no longer limited to 100 results by default.
(Credit to Ben Croker who originally added this answer as a comment above. Adding this here as it would be better as the upvoted answer.)
There very definitely is a default limit of 100 and using .limit(null) will definitely override it. I know this because I recently had the same issue myself!
.limit(null)work? – joep Apr 01 '16 at 10:43