"Unsupported operands" thrown in drupal_get_breadcrumb when search404's page is rendered

jp.stacey - December 3, 2008 - 16:37
Project:Search 404
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:jp.stacey
Status:closed
Description

Search404 plain doesn't work for us, and I'm not sure why.

In between search404_page() returning, and the page.tpl.php rendering, I get the error:

Fatal error: Unsupported operand types in /var/www/drupal-6/includes/common.inc on line 1445

Poking around in menu.inc, this seems to be because drupal_get_breadcrumb() calls menu_get_active_trail() and from that menu_get_item(), which is working off the missing page path, not /search404. Because the missing page doesn't exist in the menu_router table (obviously) then this returns a FALSE. When that bubbles up as far as the breadcrumb generation, then l() gets a third parameter that isn't an array, and the error above is thrown.

Shouldn't search404 handle the fact that the non-existent page won't be in menu_router? There's some code saying "EVIL HAXX" (!) that seems to be doing some sort of $_GET['q'] swapping, but I assume it can't be working properly.

Here's our setup:

Search404 6.1-1.1
Drupal 6.6
PHP 5.2.6

#1

zyxware - December 10, 2008 - 11:52
Assigned to:Anonymous» zyxware

Does this error show up in all the 404 searches or some specific instance?

Could you also post the URL that causes this error?

Thanks
Zyxware

#2

zyxware - December 11, 2008 - 09:45
Status:active» postponed (maintainer needs more info)

#3

jp.stacey - December 11, 2008 - 12:58

All 404ed URLs cause this error.

As I say, it happens after the MENU_CALLBACK in the module; so when I then navigate to a page that does exist I see e.g:

* For your convenience, a search was performed using the query foo.
* For your convenience, a search was performed using the query foo bar.
* For your convenience, a search was performed using the query foo bar baz.

#4

jp.stacey - December 11, 2008 - 13:11
Assigned to:zyxware» jp.stacey
Status:postponed (maintainer needs more info)» won't fix

@zyxware: looks like this was a combinatorial bug, caused by a stub module. It was only running a few drupal_set_html_head()s in its _init() hook, but there might have been some knock-on effect. But we'll look into it at our end, so I think this bug can be closed. Sorry if I wasted your time!

#5

zyxware - December 12, 2008 - 05:05

No issues jp.stacey, glad you found the root cause of the issue.

We are closing the bug from our side.

Regards
Zyxware

#6

zyxware - December 12, 2008 - 05:05
Status:won't fix» closed

#7

morningtime - August 16, 2009 - 12:07
Version:6.x-1.1» 6.x-1.x-dev
Status:closed» active

Getting the same problem now:

Fatal error: Unsupported operand types in /var/www/vhosts/domain.com/httpdocs/includes/common.inc on line 1552

Also caused by menu_get_active_trail(), eventually a l(, , ) function is called without any arguments resulting in above error. Where to look for an answer to this problem? Why does l(, , ) eventually end up like that?

If its a conflicting module like said above, then how to find out which one?

#8

morningtime - August 16, 2009 - 12:20
Status:active» closed

Just found out it's being caused by ApacheSolr, so they need to fix it.

 
 

Drupal is a registered trademark of Dries Buytaert.