Overview
- Content entity
-
- Create a page
- Make some changes to the page
- Delete that page
- Try to publish
- Receive a 500 error
- Config entity
- See #6

Proposed resolution
Clean up autosave entries when an entity is updated/saved or deleted.
User interface changes
The status badge now always works correctly (#3505118: The status badge should indicate if there are changes to the page), plus the Add to components
button (#3500071: Adding code components to components) now always appears when appropriate.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3507334.patch | 2.79 KB | wim leers |
| Screenshot from 2025-02-18 13-51-54.png | 230.13 KB | larowlan |
Issue fork experience_builder-3507334
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
wim leersThis implements the "update" part — just needs one added hook to implement this part.
Comment #3
lauriiiI'm not sure we should be just deleting the autosave entry when an entity is updated. I realize this is an edge case but this could still result in loss of data for the user. I think in this situation it might make sense to provide the user an option to choose if they want to continue from the autosave state of the latest revision.
Comment #6
wim leers@balintbrews and @hooroomoo reported the following bug:
That's another symptom of the same root cause. Confirmed through manual testing.
Comment #8
wim leersComment #9
wim leersGiven how many issues we've recently been working on in the auto-save realm, including this one and the critical #3502902: Only auto-save content entities/PageRegion config entities when there are actual changes: simply previewing incorrectly causes them to appear in "Review x changes", I think it's time to carve out an explicit issue queue component for it. #3489743: Create AutoSave service and HTTP API to retrieve all entities with pending changes introduced it, and was led by @tedbow and @larowlan, so assigning to @larowlan for review.
Comment #10
balintbrewsComment #11
wim leersNice catch on the title! 😄
Comment #12
wim leersComment #13
wim leersI'm very glad_ I asked you to review this! 😄 You managed to avoid the content entity data loss @lauriii was worried about in #3 in an elegant way while still allowing the main issue to be fixed.
Comment #14
larowlanI think is ready to go now, will merge on green.
Get some rest 🛌
Updating issue credits.
Comment #16
larowlanMerged, thanks all
Comment #17
nagwani commented