-
Notifications
You must be signed in to change notification settings - Fork 681
Closed
Description
What happened?
Description
It seems to be impossible to delete sections and entry types in Craft 4.
By the looks of it, the Sections::deleteEntryType method isn't actually deleting anything...
Lines 1323 to 1334 in 5d6f656
| public function deleteEntryType(EntryType $entryType): bool | |
| { | |
| // Fire a 'beforeDeleteEntryType' event | |
| if ($this->hasEventHandlers(self::EVENT_BEFORE_DELETE_ENTRY_TYPE)) { | |
| $this->trigger(self::EVENT_BEFORE_DELETE_ENTRY_TYPE, new EntryTypeEvent([ | |
| 'entryType' => $entryType, | |
| ])); | |
| } | |
| Craft::$app->getProjectConfig()->remove(ProjectConfig::PATH_ENTRY_TYPES . '.' . $entryType->uid, "Delete the “{$entryType->handle}” entry type"); | |
| return true; | |
| } |
Steps to reproduce
- In Craft 4, create a section and/or entry type.
- Try to delete that section and/or entry type.
- Refresh the page to see that it still exists!
Expected behavior
Deleting a section/entry type should delete the section/entry type.
Actual behavior
Deleting a section/entry type does not delete the section/entry type.
Craft CMS version
4.14.11.1
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
Reactions are currently unavailable