Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298085

Unable to change non-translatable field value on translatable content with content moderation enabled

$
0
0

Unable to change non-translatable field value on translatable content with content moderation enabled, because of EntityUntranslatableFieldsConstraintValidator::validate

To reproduce:
1) Install D8.5.0 with the standard profile in EN language.
2) Enable content moderation on Article node type.
3) Enable 'Content Translation' (with dependent Language) module.
3) Add another language.
4) Enable translation of Article content type at Configuration --> Content language and translation, set all fields translatable, except Tags.
5) On manage fields, disable 'Users may translate this field' for Tags field.
6) Add new Article node, with e.g. 'Test' tag and publish content.
7) Create new draft on the created node and change Tags field - e.g. delete 'Test' tag, or add another one.

You wouldn't be able to save the node because of validation error:
Non-translatable fields can only be changed when updating the current revision.

Solutions:
a) the EntityUntranslatableFieldsConstraintValidator::validate() should check if the content isModeratedEntity() or
b) content moderation module should extend EntityUntranslatableFieldsConstraintValidator::validate()


Viewing all articles
Browse latest Browse all 298085

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>