Closed DavidKabelitz closed 4 months ago
The last update to the plugin was just under a year ago; so I'm not aware of anything changed on this end that could be causing the issue?
I can confirm this is an issue on my end as well. Something must have changed in Craft.
@Mosnar lmk if you come up with any details!
@Mosnar to still use it we set a limit at the for loop on top, limit at the criteria does not work anymore. Our quick fix solution... {% for item in similarEntriesByTagsAndCategories[:column.limit] %}
@DavidKabelitz Thanks! I'm digging into the source of the problem. I can see that it emerged after updating from 3.7.55.3 to 3.8.5, so that narrows it down a bit.
@khalwat I found the culprit - this change is nullifying the limit
from the criteria: https://github.com/craftcms/cms/commit/c6666293d0be56668389a2cc558a773d9a409e39
Sorry for the blast of comments! Turns out this is due to a field within a matrix block with the handle limit
. After renaming all of those field handles, everything seems to be working as expected. This makes sense in the context of Brandon's aforementioned change.
So... should I close this up?
@DavidKabelitz I closed this issue due to @Mosnar 's comments, but if the issue persists, we can continue looking to address it.
Describe the bug
Something we recognized at all our projects the limits are not working. I am not sure when it stopped working but instead of just displaying 6 entries the code below shows all entries that were found.
Does something changed we need to adjust? Code worked fine for a very long time.
Regards!
Code example we usually work with:
` {% set timeAgo = now|date_modify('-1 month') %}
{% set postDateParam = '> ' ~ timeAgo|date('U') %}
{% set ids = entry.contentTags.ids() | merge(entry.categoryLatest.ids()) %}
{% set limitCriteria = craft.entries.section(['aktuelles']).with(['video','imageLatest','categoryLatest','title','postDate','caption']).postDate(postDateParam).limit(6) %}
{% set similarEntriesByTagsAndCategories = craft.similar.find({ element: entry, context: ids, criteria: limitCriteria }) %}`
Versions