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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pressing’s picture

Priority: Major » Normal
Issue summary: View changes
pressing’s picture

Issue summary: View changes
pressing’s picture

Could someone who is an expert in the Domain Access module help me out here? Thanks

agentrickard’s picture

It's fixable, but why is anyone trying to visit that URL in the first place?

agentrickard’s picture

Status: Active » Needs review
FileSize
1.62 KB

What'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.

agentrickard’s picture

Here'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.

aitala’s picture

The patch appears to work... no idea why the invalid URL is being hit, but its likely a bot of some sort.

Eric