
By nitrospectide on
I have a D7 site where the contextual links on my blocks are not showing up. I see the proper markup and classes in my source. The Contextual Links module is activated. My browser inspector shows the contextual.js is loading. It just doesn't seem to register when I roll over the block (the classes don't change, like on a site where it works).
What might be happening, and what can I do to test?
Comments
=-=
core theme?
Custom theme
It's a custom theme. If I switch to Bartik, they show up. The custom theme is a homebrew responsive framework, and I have another site that uses it, but that one shows the contextual links.
But, since we know the links show in Bartik, we know that it's not the Contextual Links module, or the permissions, or the version of jQuery.
When I look between the two sites (one working, one not), I am just not seeing what could be the issue. Markup looks the same, and styles look the same.
=-=
and if you take the theme from the working site and plug it in on the non working?
I decided to disable all of
I decided to disable all of the scripts being included in the theme.info, so see if any were colliding with the contextual links, and I found the issue. Now I have to figure out why in the world the following, which is just supposed to find ® signs in text and wrap them in <super>, is taking out my contextual links ;\
// rewrite ® in body text so it's resizable
$('section#sectionOne').each(function () {
$(this).html($(this).html().replace(/(\®)/g, '<span class="super">®</span>'));
});
// rewrite ® in sidebar text so it's resizable
$('aside#asideOne').each(function () {
$(this).html($(this).html().replace(/(\®)/g, '<span class="super">®</span>'));
});
Figured it out
I figured it out. My jQuery had to more directly target what I was looking for, like so:
section#sectionOne p,section#sectionOne h2,section#sectionOne h3,section#sectionOne h4
I don't know why a less targeted version blew up the Contextual Links jQuery, but... it did.