Generated with the help of an LLM.
Problem/Motivation
Whenever an inline block is removed from the site, it is never deleted from the database in the following situations:
- When the block was on a non-revisionable entity, such as a user.
- When an entity revision or translation is deleted.
- When a Content Builder field is deleted.
Steps to reproduce
Non-revisionable entity:
- Add a "Content builder" field to users.
- Edit your account, add an inline "Basic block" and save.
- Remove the block and save again.
- The block is still in the database.
Entity revision:
- Add a "Content builder" field to the "Basic page" content type.
- Create a basic page with an inline "Basic block" and save it.
- Edit the page, remove the block and save it.
- On the Revisions tab, delete the first revision.
- The block is still in the database.
Entity translation:
- Install Content Translation, add a second language, and make basic pages and their "Content builder" field translatable.
- Create a basic page and save it.
- Translate it, add an inline "Basic block" to the translation and save it.
- Delete the translation.
- The block is still in the database.
- Create a basic page with an inline "Basic block" and save it.
- Delete the "Content builder" field on Manage fields.
- Run cron until the field is purged.
- The block is still in the database.
No error is shown in any of these.
Proposed resolution
In each situation, delete the inline blocks that belong to the entity, and that no revision, translation or other Content Builder field of the entity still shows.
Remaining tasks
None
User interface changes
None
API changes
None
Data model changes
None
Comments
Comment #2
gloriaswebtech commentedComment #3
gloriaswebtech commentedComment #4
gloriaswebtech commentedComment #7
gloriaswebtech commentedFixed in 1.0.2