Problem/Motivation
[...] it's the logic in
EntityUntranslatableFieldsConstraintValidator
that's buggy, I didn't realize that earlier because field widgets are hidden in that case, but here's an example of what might happen if widgets weren't hidden:
- Create an English article and publish it
- Create an Italian translation and publish it
- Save an English draft with untranslatable fields/synchronized property changes
- Save a new Italian default revision with untranslatable fields/synchronized property changes
- Publish the English draft -> you just overrode the Italian changes
Depending on the selected mode, you can only perform untranslatable field/sync property changes to the default revision XOR the default translation.
Proposed resolution
- Make sure changes in non-default translations are not allowed, when only the default translation is affected by untranslatable field changes, regardless of the revision being pending or default.
- Use different validation error messages for the two modes, as suggested by @Gábor Hojtsy.
Remaining tasks
- Validate the proposed solution
Write a patch- Reviews
User interface changes
None
API changes
None, the affected validator was not released in any stable release yet.
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#5 | et-untranslatable_fields_fix-2941062-5.patch | 5.69 KB | plach |
#2 | et-untranslatable_fields_fix-2941062-2.test.patch | 2.1 KB | plach |
Comments
Comment #2
plachHere's a patch
Comment #5
plachWrong @covers annotation, the failing patch is failing legitimately though.
Comment #6
Wim LeersComment #8
effulgentsia CreditAttribution: effulgentsia at Acquia commentedLooks good. Pushed to 8.6.x. Leaving at RTBC for 8.5.x to discuss with other committers whether to allow this into either the RC phase or in a patch release.
Comment #10
plachComment #11
webchickTalked about this on the core committer call, and there was agreement among Alex + Alex + plach to backport this to 8.5.0 prior to release, since it's fixing a bug that hasn't yet hit a tagged release.
Comment #12
plachComment #14
effulgentsia CreditAttribution: effulgentsia at Acquia commentedCorrection: hasn't yet hit a stable release. But the rest of #11 still holds, so cherry picked this to 8.5.x.