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
Hi, thanks for reaching out! The relatedTo.field element query param needs to be set to the original field’s handle (not the overridden instance handle), and you can still use a field id (and an array). (This change was made in https://github.com/craftcms/cms/releases/tag/5.0.0-beta.8).
What happened?
Description
When trying to create a relation query and passing in the sourceElement field where the field handle has been changed, the
query won't return the expected result as only the global fields will be checked (https://github.com/craftcms/cms/blob/5.x/src/elements/db/ElementRelationParamParser.php#L528)
Steps to reproduce
when using a simple query:
It does return true, what is the expected result
Craft CMS version
5.1.4
PHP version
8.3.6
Operating system and version
Ubuntu 24.04
Database type and version
mysql 8.0
Image driver and version
No response
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered: