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

Bugfix/14757 deleting global sets #14759

Merged
merged 4 commits into from
Apr 5, 2024
Merged

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Apr 4, 2024

Description

This issue only occurs if you have the CKEditor plugin installed and the global set needs to have a field layout.

The CKEditor plugin hooks up to various events. In this case, the EVENT_BEFORE_DELETE event gets rightfully triggered because the Element (GlobalSet) is being deleted. Globals are special, though, and when the Element is deleted, its field layout is also deleted. The field layout was getting deleted before the element, so when that event was triggered, the field layout didn’t exist anymore, causing an Invalid field layout ID: exception. Moving the deletion of the field layout until after the element gets deleted (but within the same transaction) fixes the problem.

Related issues

#14757

@i-just i-just requested a review from brandonkelly April 4, 2024 15:51
@brandonkelly brandonkelly merged commit f7ddccc into 5.x Apr 5, 2024
@brandonkelly brandonkelly deleted the bugfix/14757-deleting-global-sets branch April 5, 2024 13: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.

2 participants