When creating a new OG vocabulary with a name that already exists the 1 number is attached to the machine name for preventing duplication of vocabularies with the same machine name.

When editing a vocabulary and submitting the form, the 1 number is attached again. When editing the vocabulary for 10 times you'll get a vocabulary with the name 'foo1111111111'.

The patch check if we dealing with a new vocabulary, if so continue with the validation action(attaching the 1 number).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amitaibu’s picture

Status: Needs review » Needs work

It would be better not to $form['machine_name']['#element_validate'][] = 'og_vocab_machine_name_validate'; if the vocab already exists.

RoySegall’s picture

I fixes the patch.

amitaibu’s picture

Status: Needs work » Fixed

I've changed to check the VID instead of Name. Committed, thanks.

Status: Fixed » Closed (fixed)

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