If you try to create a term with a name longer than 32 characters it will result in the following error:

messageFieldException: Attempt to create a field with a name longer than 32 characters: <em class="placeholder">field_really_really_really_really_long_name</em> in field_create_field() (line 74 of modules/field/field.crud.inc).

This is because newsletter_taxonomy_vocabulary_insert() automatically uses the vocabulary's machine name without checking its length.

I suggest adding a custom validation callback to the taxonomy edit form to check the length and give a warning if it's longer than 26 characters (32 - 'value_'), possibly also an extra message on the machine name field.

Comments

ParisLiakos’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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