Attempt to create a field storage with an name longer than 32 characters

Created on 6 February 2023, over 1 year ago
Updated 8 February 2023, over 1 year ago

Problem/Motivation

Creating new media type using the custom providers bucket as a source could result into the error:
Attempt to create a field storage with an name longer than 32 characters

Steps to reproduce

1. Install oEmbed Providers module.
2. Create provider bucket with not really long machine name, i.e. video_providers
3. Try to create new Media Type using the newly created bucket.
4. See the error: Drupal\Core\Field\FieldException: Attempt to create a field storage with an name longer than 32 characters: field_media_oembed_video_providers in Drupal\field\Entity\FieldStorageConfig->preSaveNew() (line 326 of /var/www/html/docroot/core/modules/field/src/Entity/FieldStorageConfig.php).

Proposed resolution

Restrict possible length for the name of the provider bucket or cut the machine name of the related field to 32 chars (field_media_oembed_video_providers in example above)

πŸ› Bug report
Status

Closed: duplicate

Version

2.1

Component

Code

Created by

πŸ‡΅πŸ‡±Poland nsavitsky

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024