menu_name max length is too long

Created on 13 October 2019, over 5 years ago
Updated 11 February 2023, over 2 years ago

Problem/Motivation

MenuLinkContent::baseFieldDefinitions does not define a max_length which gets set to 255 but MenuTreeStorage::schemaDefinition onyl allows for 32 characters. When running createWithSampleValues this blows up.

Proposed resolution

  1. ->setSetting('max_length', \Drupal::state()->get('menu_link_content_menu_name_max_length', 32))
  2. In an update hook retrieve menu name (MenuTreeStorageInterface::getMenuNames) and if there is anything over 32, set the state to 255 and trigger a deprecation error for 10.0

Remaining tasks

User interface changes

API changes

Is there a BC problem here? If someone used a different menu tree storage service then, in theory, they can have longer than 32 menu names.

Data model changes

Release notes snippet

๐Ÿ› Bug report
Status

Needs work

Version

10.1 โœจ

Component
Menu systemย  โ†’

Last updated 2 days ago

Created by

๐Ÿ‡จ๐Ÿ‡ฆCanada Charlie ChX Negyesi ๐ŸCanada

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024