Hi there -- I've been using VBO to bulk-update the taxonomy terms of nodes using "taxonomy autocomplete deluxe" widgets. Couldn't do this for awhile--kept getting the attached error. I looked at the offending function, and the nodes that were causing problems, and saw that content_taxonomy_autocomplete_validate_deny_new_terms() was choking without a check to be sure that the array being foreach'ed had some values in it. I altered the function accordingly (see below), and VBO works fine now. Happy to roll a patch here if it helps, but my only change was to add the line at 106 checking for empty. -- Ben

function content_taxonomy_autocomplete_validate_deny_new_terms($element, &$form_state) {
  // taxonomy_field_validate() is invoked before.
  $field_name = $element[$element['#language']]['#field_name'];
  if(!empty($form_state['values'][$field_name][$element['#language']])) {
    foreach ($form_state['values'][$field_name][$element['#language']] as $delta => $value) {
      if ($value['tid'] == 'autocreate') {
        form_error($element, t('%name: new terms are not allowed.', array('%name' => $element[$element['#language']]['#title'])));
      }
    }
  }
}

Comments

damienmckenna’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new786 bytes

This ought to fix the problem.

  • DamienMcKenna committed 70e0318 on 7.x-1.x
    Issue #1558050 by bdimaggio, DamienMcKenna: The 'array_parents' element...
damienmckenna’s picture

Status: Needs review » Fixed
Parent issue: » #2691633: Plan for Content Taxonomy 7.x-1.0-rc1 release

Committed. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.