Skip to content

[6.x] Fix per-site statuses for saved elements - #19868

Merged
riasvdv merged 1 commit into
6.xfrom
fix/6.x-site-statuses-for-element
Oct 7, 2026
Merged

riasvdv merged 1 commit into
6.xfrom
fix/6.x-site-statuses-for-element

Conversation

@riasvdv

@riasvdv riasvdv commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Description

ElementHelper::siteStatusesForElement() selected the bare enabled column, which the element query maps to elements.enabled. For a saved, enabled element, every site reported as enabled, including sites where it's disabled. 5.x avoids this by selecting elements_sites.enabled explicitly; this restores that.

This affected the per-site status toggles on element edit pages, and resave with --propagate-to, which could re-enable entries on sites where they were disabled.

Extracted from #19665.

ElementHelper::siteStatusesForElement() selected the bare `enabled`
column, which the element query maps to `elements.enabled`, so every
site reported the element's global status instead of its own.

Co-authored-by: Nathaniel Hammond <nathaniel@pixelandtonic.com>
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

📚 Storybook previews

@craftcms/ui — open Storybook

No changed components detected in this Storybook.

resources/js — open Storybook

No changed components detected in this Storybook.

@riasvdv
riasvdv merged commit f955b40 into 6.x Oct 7, 2026
19 checks passed
@riasvdv
riasvdv deleted the fix/6.x-site-statuses-for-element branch October 7, 2026 08:22
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