Menu Link breaks this module (at least in Drupal 10)

Created on 29 June 2023, over 1 year ago

Problem/Motivation

I think it is somewhat likely that someone using the menu_link module may also want to use menu_link_weight. Additionally, their similar names may lead people to believe that menu_link_weight is in the menu_link ecosystem. However, just enabling the menu_link module (version 2,0) without doing any configuration at all, causes an unusable menu weight segment to be added to the node form.

It also removes the menu from its normal location on the node form.

Steps to reproduce

Install menu_link_weight, confirm it works on a node form. Install menu_link (potentially only on Drupal 10) reload the same node form, and observe how the form changes.

Proposed resolution

I propose detecting whether the menu link module is enabled and configured for the current Entity Type, and that there is a menu_link field enabled before doing any modification to the form.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇯🇵Japan ultrabob Japan

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

Comments & Activities

Production build 0.71.5 2024