- Issue created by @mmv93
- @mmv93 opened merge request.
- @mmv93 opened merge request.
- @mmv93 opened merge request.
You are not allowed to use taxonomy terms like: "@termNames". Remove the restricted taxonomy terms from the form field and try again.
/**
* Implements hook_form_alter().
*/
function permissions_by_term_form_alter(&$form, FormStateInterface $formState, $form_id) {
$form['#validate'][] = 'permissions_by_term_validate';
if (isNodeEditForm()) {
$form['permissions_by_term_info'] = [
Validation is added for all forms but it should be added just for nodes.
Solution: move $form['#validate'][] = 'permissions_by_term_validate';
inside if statement.
Active
3.1
Code