Problem/Motivation
When adding an activity type, if the machine-readable name is longer than 32 characters, a fatal error is caused:
Drupal\Core\Config\Entity\Exception\ConfigEntityIdLengthException: Attempt to create a bundle with an ID longer than 32 characters: true_false_with_immediate_feedback(). in Drupal\Core\Entity\EntityBase->preSave() (line 398 of core/lib/Drupal/Core/Entity/EntityBase.php).
Drupal\lms\Entity\Form\ActivityTypeForm->save()
call_user_func_array() (Line: 129)
Steps to reproduce
- Add a new activity type: admin/lms/activity_type/add.
- Give it a name longer than 32 characters.
- Select a plugin and Save.
Proposed resolution
Add a string length check and throw an error?
Comments
Comment #3
graber commented