Duplicate menu item settings with menu_link_attributes

Created on 15 May 2020, about 4 years ago
Updated 22 June 2023, about 1 year ago

First of all thank you very much for this wonderful module! We love it and use it in all our projects.

One thing our customers again and again run into and have a lot of trouble with to understand is, that when using link_attributes AND menu_link_attributes β†’ module, there are duplicate settings in the menu UI.

This is due to the reason, that the modules intersect in their functionality. Anyway both provide benefits the other module doesn't provide.

  • Link Attributes is required to set link (field) attributes, but has the side-effect of also adding menu item settings. It handles the <a href>'s
  • Menu Link Attributes β†’ offers menu link option enhancements (It handles the <li>'s and <a href>'s, but doesn't help with link_fields (<a href>'s).

So there is demand for both modules! But they do not work well together.

The screenshot below shows perfectly why users are confused in menu items:

So I see two ways to solve this:
a) Move the menu link options into a submodule link_attributes_menu_attributes or something similiar, keep all config variable names and enable that module by default through an update hook for users who installed link_attributes. So users who run into this conflict can disable the submodule to solve the conflict and existing installations are not affected.

b) Join efforts with menu_link_attributes, merge settings names and remove the link handling functionality from that module completely, only adding the <li> handling and let this module do the rest.

c) ?

Let's please discuss this problem first. If a) is a a good option, I'm willing to create a patch for that, if you wish my assistance.

Thank you very much in advance.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

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.69.0 2024