You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an entry in my PRODUCTS section which has a ENTRIES field added to it to load an entry from my COLLECTION section. My collection entry then has two ENTRIES field added to it (using the same field) but with two different handles.
When running this code to fetch the related eager-loaded entries from the collection entry they return the same entries even if one of the fields doesn't even have entries selected.
{% set collection = entry.collectionEntry.eagerly().one() %}
{% set relatedEntries = collection.relatedEntries.eagerly().all() %}
{% set moreRelatedEntries = collection.moreRelatedEntries.eagerly().all() %}
... so "relatedEntries" and "moreRelatedEntries" pull the same entries - but only entries are selected for field "moreRelatedEntries". They are both the same field added to the section COLLECTION multiple times.
What happened?
Description
I have an entry in my PRODUCTS section which has a ENTRIES field added to it to load an entry from my COLLECTION section. My collection entry then has two ENTRIES field added to it (using the same field) but with two different handles.
When running this code to fetch the related eager-loaded entries from the collection entry they return the same entries even if one of the fields doesn't even have entries selected.
... so "relatedEntries" and "moreRelatedEntries" pull the same entries - but only entries are selected for field "moreRelatedEntries". They are both the same field added to the section COLLECTION multiple times.
Related to: #15890
Expected behavior
Only the actual entries selected in the related ENTRIES field type should return for each specific field.
Craft CMS version
5.5.x
PHP version
8.3
Operating system and version
Ubuntu 22.x
Database type and version
MySQL 8.0+
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: