Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug where element would disappear in a condition rule on reload. #16005

Closed
wants to merge 1 commit into from

Conversation

lukeholder
Copy link
Member

@lukeholder lukeholder commented Nov 4, 2024

Description

When making a condition rule that uses BaseElementSelectConditionRule (like the "Related To" rule) the element would not show up after page reload. This is due to the element query looking for the $sitesService->getCurrentSite()->id by default.

Fixed by changing the query to look for all sites. This also mimics the rule’s matching logic, which only matches on element ID.

CleanShot.2024-11-04.at.17.36.18.mp4

Related Issue

craftcms/commerce#3739

@brandonkelly brandonkelly deleted the bugfix/element-select-site branch November 6, 2024 18:57
@brandonkelly
Copy link
Member

Thanks! Fixed on 4.x via 233d23c.

@brandonkelly
Copy link
Member

Craft 4.12.9 and 5.4.10 are out with that fix.

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.

2 participants