- Open on Drupal.org →Core: 7.x + Environment: PHP 5.6 & MySQL 5.5last update
about 1 year ago Waiting for branch to pass - 🇷🇴Romania MirceaP
Encountered the same issue while using version 2.0.x.
When trying to save a node that previously didn't use Term Reference Tree as widget, we get an error and can not save the node (the parent terms are added and on the translations this field is hidden (#access set to FALSE)).Created a patch to check against #access set to FALSE.
- First commit to issue fork.
- Merge request !27Prevented validation if user is not allowed to access element → (Open) created by Denist3r
- First commit to issue fork.
- 🇧🇪Belgium andreasderijcke Antwerpen / Gent
I've expanded the patch, as the previous version was did non suffice on D10.4 when the widget is hidden on entity translation forms due to the field being not translatable.
Core field constraints on the field are still fired, thus blocking creation of the entity translation. In the process, access check on the field returns 'allowed' causing the field to be taken into account for validation, even though it should not.
Have not found a solution to prevent this from happening, but discovered along the way that when the widget is hidden, the field submission values contain the options and current value, which cause the field constraint validation to fail.
By massaging the field submission values, or cleaning, this can be prevented and translation submission proceed.This solution is added to the MR, including note that it is only a workaround until a better/real fix can be found.