Skip to content

BaseRelationField queryCondition and ElementQuery's siteId#18796

Open
i-just wants to merge 1 commit into5.xfrom
bugfix/18781-base-relation-field-querying-and-sites
Open

BaseRelationField queryCondition and ElementQuery's siteId#18796
i-just wants to merge 1 commit into5.xfrom
bugfix/18781-base-relation-field-querying-and-sites

Conversation

@i-just
Copy link
Copy Markdown
Contributor

@i-just i-just commented May 6, 2026

Description

Querying for an element related to another element via a relation field can return results based on relations that don’t exist on the site the user is querying.

This PR ensures that the BaseRelationField::queryCondition() uses the same siteId as the ElementQuery.

Related issues

#18781

@i-just i-just requested a review from brandonkelly May 6, 2026 10:29
@craftcms craftcms deleted a comment from semanticdiff-com Bot May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant