No HREF on Content menu on admin toolbar I have a very odd problem that cropped up yesterday on one my sites.  The site is Drupal 7 with the stock toolbar module installed.  When you access the site for the first time logged in as an admin user, the Content menu link does not work.  All the other menu links work fine.  When you go to the Structure page next, the Content menu works correctly.

Looking at the source, the A tag for the Content menu does not have an HREF attribute. All the other menu links do.  When you go to the Structure page, the Content menu has an HREF attribute as expected.

I looked at the menu_links table and everything looks good.

I ran debug through the toolbar.module and the array data is correct.

I ran debug into the toolbar.tpl.php file calling render($toolbar['toolbar_menu']).  The array data is correct.

I'm now looking to see what else might be causing the HREF to "disappear" from the Content menu.

Has anyone seen this before?

The first commenter mentioned looking at the static page source (great idea...DevTools has made me lazy ;) )

&lt;li class="menu-9 path-admin-content"&gt;
&lt;a href="/admin/content" id="toolbar-link-admin-content" title="Find and manage content."&gt;
&lt;span class="icon"&gt;&lt;/span&gt;Content 
&lt;span class="element-invisible"&gt;(Find and manage content.)&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;


So the HREF is in the A tag. I'm looking at all the Javascript on the site now.

** UPDATED **
I added the following code (from http://addyosmani.com/blog/mutation-observers/):

var observer = new MutationObserver(function (mutations) {
  // Whether you iterate over mutations..
  mutations.forEach(function (mutation) {
  // or use all mutation records is entirely up to you
    var entry = {
      mutation: mutation,
      el: mutation.target,
      value: mutation.target.textContent,
      oldValue: mutation.oldValue
   };
   console.log('Recording mutation:', entry);
  });
});
var options = {
  childList: true,
  attributes: true,
  characterData: true,
  subtree: true,
  attributeOldValue: true,
  characterDataOldValue: true,
  attributeFilter: null
};
var target = document.querySelector('#toolbar-link-admin-content');
observer.observe(target,options);


This is the output which confirms that something is modifying the DOM.  

Recording mutation: Object {mutation: MutationRecord, el: a#toolbar-link-admin-content, value: "Content (Find and manage content.)", oldValue: "/admin/content"}
Recording mutation: Object {mutation: MutationRecord, el: a#toolbar-link-admin-content, value: "Content (Find and manage content.)", oldValue: ""}


How do I go about finding what is causing the change? What code fired the observer?
I found the answer to my original problem. 

I went through the .info file and commented out JS files until the console no longer reported a mutation event.  Turns out that there was some odd JS code:

jQuery( "li:nth-of-type(2) &gt; a" ).removeAttr("href");


The selector is too vague. Guess what number the LI containing the Content menu is?  It's 2! And this little bit o'code took the HREF right off!

Thanks to @Clive for suggesting mutation observers.  Learned a lot from this bug.