Problem/Motivation
Steps to reproduce:
- Create an English entity
- Create an Italian translation in a new default revision
- Create a new English pending revision
- Remove the Italian translation in a new default revision
- Create a new English default revision starting from the previous pending one
Expected result: only the English translation is available in the default revision
Actual result: both English and Italian are available in the default revision, as the Italian translation was restored
Proposed resolution
Make sure that, when creating a new revision, only creating a new translation for the active language is allowed, so that only the current translation is affected, as usual.
Remaining tasks
Validate the proposed solutionWrite a patch- Reviews
User interface changes
None
API changes
None
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | entity-removed_revision_translations-2949619-16.patch | 3.71 KB | plach |
| #17 | entity-removed_revision_translations-2949619-16.interdiff.txt | 853 bytes | plach |
| #2 | entity-removed_revision_translations-2949619-2.test.patch | 2.11 KB | plach |
Comments
Comment #2
plachHere is a test-only patch.
Comment #3
plachAnd here's the fix
Comment #4
plachSetting back to RTBC, as this code was already reviewed/approved in #2940890: Don’t allow deleting revision translations in pending revisions.
Comment #6
plachActually no, I slightly tweaked tests to match the STR more closely. Nbd, but needs review...
Interdiff coming soon
Comment #7
plachComment #8
plachComment #9
berdirHm, what if you *do* want to restore a deleted translation? I'm not up to do date with all revision/translation changes, but shouldn't we still allow that if you want to?
Comment #10
plachYou don't do that as part of creating a new revision for another translation :)
Comment #11
plachI mean, if you wish to add back the Italian translation you should create a new revision starting from a translation object with Italian as the active language.
Comment #12
berdirI guess, yes, just asking. AFAIK, the problem is that you actually can't get a revision list of that translation anymore ;)
Comment #13
plachWell, that introduces a new discussion around what a removed translation and how the UI should treat it in the pending revision world. Probably to be discussed in #2945956: Allow removing translations in pending revisions.
Comment #14
timmillwoodLooks fine to me.
It might be nice to see a test only patch.
Comment #15
plach@timmillwood
Thanks!
The test-only patch is the one in #2, the interdiff was referring to the parent issue, no code changes in tests between #2 and #3.
Comment #16
timmillwoodah ha, sorry for the confusion, thanks for the clarification.
Comment #17
plach@catch suggested a comment improvement in Slack
Comment #20
catchCommitted/pushed to 8.6.x and cherry-picked to 8.5.x. Thanks!