A site we're developing has recently been displaying a very generic error when attempting to access a page that's known not to exist (e.g. www.exampledomain.com/domain/dhfhfjfjf). Here "domain" is a content type.
"The website encountered an unexpected error. Please try again later.
Error message
Recoverable fatal error: Argument 2 passed to drupal_goto() must be an array, string given in drupal_goto() (line 686 of /path/includes/common.inc).
Error with drupal_goto() used as page callback in hook_menu()"
The issue seems to be stemming from the drupal_goto() in a hook_menu() call. I expect non-existent pages to return 404 errors.
The problem seems to be located inside /sites/all/modules/domain/domain_nav/domain_nav.module
If we comment out domain_nav_menu function, then our theme works just fine.
What's interesting about the error is that hook_menu() here is not passing two arguments.
It looks like the module is returning an unexpected result when you pass a bad value as the second argument in the URL.
Anyone know what may be happening and what can be done?
Thanks,
pressing
Comment | File | Size | Author |
---|---|---|---|
#6 | Screen Shot 2014-02-20 at 2.27.09 PM.png | 117.74 KB | agentrickard |
#5 | 2197883-domain-nav.patch | 1.62 KB | agentrickard |
Comments
Comment #1
pressing CreditAttribution: pressing commentedComment #2
pressing CreditAttribution: pressing commentedComment #3
pressing CreditAttribution: pressing commentedCould someone who is an expert in the Domain Access module help me out here? Thanks
Comment #4
agentrickardIt's fixable, but why is anyone trying to visit that URL in the first place?
Comment #5
agentrickardWhat's really odd about that error is that no parameter should be passed to drupal_goto() from the old code. But this patch is safer anyway.
Comment #6
agentrickardHere's what actually happens in the old system, I suspect the addition of the "array" type hint in drupal_goto() may have caused this behavior change.
Comment #7
aitala CreditAttribution: aitala commentedThe patch appears to work... no idea why the invalid URL is being hit, but its likely a bot of some sort.
Eric