Can not reference terms to media entity.

Created on 28 April 2023, over 1 year ago

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.

πŸ› Bug report
Status

Active

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine mmv93

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024