Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There could be class attribute in list items, in this case menu_local_task, that has no value. So it looks like this in the result HTML:
<li class=""><a href="/taxonomy/term/566/devel">Devel</a></li>
Change the way return value is calculated in bootstrap_menu_local_task() in menu-local-task.func.php would solve this issue.
Comment | File | Size | Author |
---|---|---|---|
#2 | bootstrap-list-attribute-2226359.patch | 678 bytes | burkeker |
Comments
Comment #1
burkeker CreditAttribution: burkeker commentedComment #2
burkeker CreditAttribution: burkeker commentedAttaching a patch here. Including the "class" into the condition statement so it's not printed if $classes doesn't have any value.
Comment #3
markhalliwellActually, this should be handled like bootstrap_menu_link() (making sure that
$element['#attributes']
exists or at the very least is an empty array):Comment #4
burkeker CreditAttribution: burkeker commentedThanks - indeed it looks like a more reasonable solution. :)
Comment #5
markhalliwellComment #8
markhalliwell