Problem/Motivation
Maybe this is because we are using a patch from #3020448: Invalid translations of the ContentModerationState entity created before #2946402 exist in some installations of content_moderation and have some inconsistent data, but it I imagine it might also be possible to reproduce when the langcode of the default translation changes.
Proposed resolution
As a quickfix, don't delete that that "translation". Not sure what else we could do.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3109772-test-only.patch | 1.86 KB | sam152 |
| #2 | content-moderation-translation-delete-3109772-2.patch | 1.12 KB | berdir |
Comments
Comment #2
berdirThis is also basically the same fix as #3003238: EntityStorageException: Default revision can not be deleted in content_moderation_entity_revision_delete() just for translations instead of revisions.
Comment #3
berdirComment #4
sam152 commentedI didn't think it was possible to remove the default translation of an entity, seems to be the first link in
removeTranslation:I also think that when the default language of the host entity is changed, the CMS entity default language changes as well, so I'm not totally sure how to reproduce this in a test.
Comment #5
berdirI'll see if I can find a way to reproduce it, could be related to the other issue that we're using as I said.
Comment #6
sam152 commentedFair enough. Here is the test-case that led me to #4 if that's helpful.
Comment #8
sam152 commented