Score:0

Cookie value causing a "Uncaught Error: Call to undefined function menu_get_object() " error

st flag

There are plenty of posts regarding this Drupal error, but my situation is quite odd indeed. Here's the background:

I was asked to investigate an ajax error popping up on a form which does an account lookup. The following is the consistent behavior I'm seeing:

  1. Log into site perfectly fine and navigate to any page without issue.
  2. Recreate error
  3. Now ALL pages on the site error out with the error Uncaught Error: Call to undefined function menu_get_object()
  4. Attempt an Empty Cache and Hard Reload (in Chrome, by opening up the development pane and then right clicking on the page refresh icon), but nothing changes.
  5. I open up an incognito window or different browser and the site is fine once more.
  6. If I manually delete the site cookies, then the page is also fine again.

Something in the site cookies is clearly corrupting the session. However, I have no idea how to debug this or what could possibly be the issue. Any leads would be amazing.

unusedspoon avatar
aq flag
If you think its a cookie then i'd use your browser to see what cookies are set once the error happens. See if there's any non-standard cookies being set. Then do a search in the site's code to look for mentions of that cookie. As this sounds like some custom code going wrong
user1015214 avatar
st flag
@unusedspoon The only issue is here, when I inspect cookies, there are no new ones added once I run the code which triggers the error. It must be stored in the existing value....
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.