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.
* Tested on Beta1 and Dev release with two different themes.
* Place any menu links block provided by Menu module in any region via a Context reaction.
* The contextual links for "configure block" appear in the hover links, but not "add item" or "configure links" links provided by Menu module.
* The same menu block placed in the same region via the blocks administration screen displays contextual links correctly.
Comment | File | Size | Author |
---|---|---|---|
#2 | context-block-contextual-links-1137794-2.patch | 811 bytes | fearlsgroove |
#1 | context-block-contextual-links-1137794-1.patch | 640 bytes | fearlsgroove |
Comments
Comment #1
fearlsgroove CreditAttribution: fearlsgroove commentedThis problem affects any contextual link other than the configuration block link. this is caused by the editable_block() function in context_reaction_block.inc, which wraps the block "content" element in order to insert the link tag that makes it editable at the end of the content element. Further down the block rendering pipeline, contextual links is in the wrong spot, so, except for the configure block link which is added very late in the pipeline, the other links aren't rendered (views, menus, etc).
Attached is a quick fix that leaves everything still functioning by grafting the "#contextual_links" into the render array in the spot it's expected to live, but as I suspect changing this render array like this will cause additional headaches down the road, a more robust solution may be in order. Such a solution would probably require changing the javascript code for admin.
Comment #2
fearlsgroove CreditAttribution: fearlsgroove commentedLast patch would produce errors if there were no contextual links.
Comment #3
thomjjames CreditAttribution: thomjjames commentedHi,
Also having this issue and patch in #2 seems to fix it.
Cheers
Tom
Comment #4
jsunsurn CreditAttribution: jsunsurn commentedI have noticed this issue as well, I added this patch to a development server I run, and it works well. Thank you!
Comment #5
rosberg CreditAttribution: rosberg commentedHi,
Patch works for me as well.
Thanks!
Comment #6
e2thex CreditAttribution: e2thex commentedPatch fixed it for me as well
Comment #7
febbraro CreditAttribution: febbraro commentedThanks. http://drupalcode.org/project/context.git/commit/51e5304