Remove truncation from parent menu

Created on 23 May 2011, almost 14 years ago
Updated 15 January 2023, over 2 years ago

Problem/Motivation

When I add a new link in a menu and I select the parent link. The option list with the links appears truncated.

The function that truncate the title with a maximum of 30 characters is parentSelectOptionsTreeWalk in core/lib/Drupal/Core/Menu/MenuParentFormSelector.php. (Line 163)

$title = $indent . ' ' . Unicode::truncate($link->getTitle(), 30, TRUE, FALSE);

Does this limit exist for some special reason? And what would be the best way to override it?

Steps to reproduce

From #19

Steps to test -
1. Go to the admin site.
2. Go to admin/structure/menu/manage/admin/add?destination=/drupal9.1.x-dev/admin/structure/menu.
3. Create a menu link.
4. Again Go to admin/structure/menu/manage/admin/add?destination=/drupal9.1.x-dev/admin/structure/menu.
5. Verify the parent link field.

Proposed resolution

#24 :

we should just remove the truncation altogether.

Before:

After:

Remaining tasks

Write tests

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

None

πŸ“Œ Task
Status

RTBC

Version

10.1 ✨

Component
Menu moduleΒ  β†’

Last updated about 1 month ago

Created by

πŸ‡ͺπŸ‡ΈSpain mordonez

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

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