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.
For one of the modules draggable view I want to set the contextual link "Order View" but the hook provided by the contextual module api is not getting called even after cache rebuild.
/**
* Implements hook_contextual_links_view_alter().
*/
function mymodule_contextual_links_view_alter(&$element, $items) {
dsm($element);
}
Can't get the above hook to work.
Comments
Comment #2
tedbowThere is some client side caching for contextual links.
Have you tried placing a new block and seeing if you hook get called. Or updating an existing one.
I am running into so other caching issue with Contextual module so I found this out.
Comment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI also just got caught by this issue working on #286655: A newsletter with multiple related contents layout with @tedbow. I am going bald but this issue just made me pull some hair out.
I am marking this as 'Major" because I literally can not get a cached contextual link to clear/reset. Even [shift + crtl +R] does not work.
Comment #6
tedbowI talked to @jrockowitz and the issue we were working on is actually #2866554: Add Quick Edit off canvas form.(nid off by 1 error ;) )
Comment #9
gngn CreditAttribution: gngn commentedI don't knwo why [shift + crtl +R] does not help, but really clearing the browser cache helps on Firefox. I installed the Empty Cache Button addon just for this one...
UPDATE: Hm. Not so sure now. Sometimes it helps...(?).
Browser restart helps. sic.
Comment #11
jidrone CreditAttribution: jidrone at Mobomo for Vibrent Health commentedFor Chrome users I was able to clear the cache following next steps:
Comment #18
larowlanPer 11, this uses session storage, so you either need to close your browser, or clear it manually