Please Disable Your Browser Adblock Extension for our site and Refresh This Page!

our ads are user friendly, we do not serve popup ads. We serve responsible ads!

Refresh Page
Skip to main content
On . By CodimTh
Category:

Unable to change non-translatable field value on translatable content in Drupal

 

Question:

How to solve this issue:

"Unable to change non-translatable field value on translatable content in Drupal"

 

Solution:

Per https://www.drupal.org/node/2938191 it should be possible to disable the validation that causes this error.

you can disable the validation logic by implementing hook_entity_type_alter():

function MODULE_NAME_entity_type_alter(array &$entity_types) {
    foreach ($entity_types as $entity_type)
    {
        $constraints = $entity_type->getConstraints();
        unset($constraints['EntityUntranslatableFields']);
        $entity_type->setConstraints($constraints);
    }
}

Comments

Add new comment

Restricted HTML

Search

Page Facebook

Become a patron

If you need some help or you search a Drupal freelancer don't hesitate to contact us.

 

Contact Us

All the content is FREE but I still need your help

 

Become a patreon