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

  1. Add a new activity type: admin/lms/activity_type/add.
  2. Give it a name longer than 32 characters.
  3. Select a plugin and Save.

Proposed resolution

Add a string length check and throw an error?

Comments

arvana created an issue. See original summary.

  • graber committed 5602624c on 1.0.x
    Issue #3507598: Error from longer machine-readable name
    
graber’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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