Menu classes stripped

Created on 11 August 2016, over 8 years ago
Updated 29 July 2023, almost 2 years ago

When implementing 'Link Attributes' module and adding a class to a standard menu item, I find that previous <li> classes are all removed AND the class that I assign via the UI does not show.

Example before assigning a class to a menu item:

<li class="mmenu-mm-list-mlid-4 mmenu-mm-list-path-sample">
    <a href="/sample" class="mmenu-mm-list ">
      <i class="icon-list2"></i>
      <span class="mmenu-block-title">Support Services</span>  
    </a>
</li>

Example after assigning a class:

<li class="">
  <a href="/sample" class="mmenu-mm-list ">
    <i class="icon-list2"></i>
    <span class="mmenu-block-title">Support Services</span>
  </a>
</li>

Not sure if its my use of the 'Mobile Sliding Menu' module or not, but the issue continued even after I uninstalled that module and cleared cache. Whenever I set a menu item attribute, not only does it remove all previous classes (permanently), it never adds the class that I assign via this module.

Is this happening to anyone else?

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇦🇺Australia Stephen Ollman Canberra

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.

  • 🇪🇸Spain rcodina Barcelona

    With Drupal 10.2.3, Menu Link Attributes 1.5.0 and Superfish 1.7.0 my superfish menu is printing the classes without applying any patch.

  • Status changed to Closed: works as designed 16 days ago
  • 🇧🇪Belgium lobsterr

    I have tested both "Menu Link Attributes" and "Link Attributes widget". They both have similar functionality.
    I see that superfish module correctly uses classes and attributes provided by these modules.
    I will close the ticket please feel free to open it, if it doesn't work for you and provide more details

Production build 0.71.5 2024