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);
    }
}

Riadh Rahmi

Senior Web Developer (Drupal & Laravel)

I am a senior web developer, I have experience in planning and developing large scale dynamic web applications especially in Drupal and Laravel.

Web Posts

Search

Page Facebook