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.
Problem/Motivation
The addition of contextual links under #2231051: Add contextual links to OG Menu blocks introduced several bugs.
- An empty og menu displays
- Contextual module might not be enabled
Proposed resolution
- Check if contextual module is enabled.
- Add a variable that allows the ability to enable/disable contextual links.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#2 | og_menu-contextual_links_make-2395087-2.patch | 3.24 KB | heddn |
Comments
Comment #1
azinck CreditAttribution: azinck commentedFix attached. We should follow the lead set forth by menu_block_view() and only add the contextual links if there are menu links in the menu.
Comment #2
heddnSome improvements are included in this patch:
admin/structure/menu/manage
, but they do have access to thegroup/{group_type}/{gid}/admin/menus/{menu_name}
link.Comment #3
heddnI just did a fresh install of vanilla D7.34 and og_menu to test this. On my client's site, they are hiding contextual links on blocks so I wanted to test this on a site that wasn't hacked so much. The contextual links hide/show depending on if there are any menu items. I'm not going to mark RTBC, because I don't like doing that on my own patch, but the patch does have more than my typical testing.
Comment #4
azinck CreditAttribution: azinck commented#2 works well for me; thanks for updating my oversights, heddn.
Comment #5
rv0 CreditAttribution: rv0 commentedThanks guys!