Domain Access: Missing Menu Item Links
Drupal's Domain Access module allows a developer to make menu items (through menu attributes in the node add/edit screens) that behave the same way their accompanying nodes behave. Either private access to a selected domain, or shared with all affiliate sites. I recently had a case where these links were not appearing for anonymous users, although all users had full access to any of the private nodes (if they had the exact URL.)
After clearing cache and rebuilding the permissions table with admin/content/node-settings -> rebuild permissions, something was still amiss. I looked at each node individually and found some debugging JavaScript in the body of one of these domain nodes. After clearing out the script, all my menu links appeared for all users!
It turned out that a PHP string containing $(document).ready(function(){ was causing the problem. I left the variable in place and commented out the drupal_add_js($script, 'inline') call, thinking it would simply ignore the variable I created. This isn't covered in any forums threads and no JavaScript error appeared in the error console, so I thought I'd post it here for everyone!
$script='
$(document).ready(function(){
$(".selector").click(function(){
$(this).fooToggle("bla")
return false;
});
});
';
//drupal_add_js($script, 'inline');
?>