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

[4.x]: 'Delete element for this site' removes the element for all sites in some conditions #13116

Closed
vnali opened this issue Apr 24, 2023 · 2 comments

Comments

@vnali
Copy link
Contributor

vnali commented Apr 24, 2023

What happened?

Description

'Delete element for this site' removes the element for all sites if all the other remaining sites are disabled or draft

It seems where the Craft 'Separate the multi-site elements from the single-site elements', it doesn't check for disabled items and drafts with ->status(null)->drafts(null), so Craft thinks it is single-site element and delete it completely if all other sites are disabled or drafts.
Another problem, i think, it is $firstElement::find()->id($multiSiteElementIds)->site('*')->unique() , where the Craft doesn't check disabled and drafts again, when try to create query and pass for resaving element and cache invalidation.

Craft CMS version

4.4.7.1

@vnali vnali changed the title [4.x]: Delete element for this site removes the element for all sites in some conditions [4.x]: 'Delete element for this site' removes the element for all sites in some conditions Apr 24, 2023
@brandonkelly
Copy link
Member

Thank you for reporting that! Fixed now for the next release.

@brandonkelly
Copy link
Member

Craft 4.4.8 is out with that fix. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants