Jump to:
| Project: | Search 404 |
| Version: | 6.x-1.9 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
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
Comments
#1
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
#3
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:
#4
@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
No issues jp.stacey, glad you found the root cause of the issue.
We are closing the bug from our side.
Regards
Zyxware
#6
#7
Getting the same problem now:
Fatal error: Unsupported operand types in /var/www/vhosts/domain.com/httpdocs/includes/common.inc on line 1552Also 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
Just found out it's being caused by ApacheSolr, so they need to fix it.
#9
I am also receiving this error in conjunction with using solr. any info on how to resolve this would be greatly appreciated.
#10
Yeah, we're running into this issue with the ApacheSolr integration too. Works fine with standard Drupal search. Anyone know what in ApacheSolr is causing the problem?
Edit: Looks like it is a breadcrumb issue with Solr too. apachesolr_search.module calls drupal_set_breadcrumb(), calling menu_get_active_breadcrumb(), but menu_get_active_breadcrumb will return erroneous results when called from the 404 page.
Best solution right now is to check if we're loading a 404 page, and if so, don't call the menu_get_active_breadcrumb.
#11
Dup: #550534: Search 404 incompatibility
#12
I am getting the same issue, but without Apache Solr.
Disabling search404 solved it for me, but as I understand there is some conflicting module ... How to find it?
#13
#14
Ah, it is Page Title as explained here #550534: Search 404 incompatibility