Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
#2 | og_vocab_exists_machine_name-1814188-2.patch | 695 bytes | RoySegall |
og_vocab_exists_machine_name.patch | 475 bytes | RoySegall | |
Comments
Comment #1
amitaibuIt would be better not to
$form['machine_name']['#element_validate'][] = 'og_vocab_machine_name_validate';
if the vocab already exists.Comment #2
RoySegall CreditAttribution: RoySegall commentedI fixes the patch.
Comment #3
amitaibuI've changed to check the VID instead of Name. Committed, thanks.