Currently search-api rather easily kills your site. It throws exceptions which are not caught, thus they break your site. In particular if they appear on update.php...
The recent item_type, entity_type update broke update.php if you had something exported in code. Even fixing the features doesn't suffice to make it working again. Attached patch helped, so one was able to run update.php.
The exception was triggered that way on update.php:
- rebuild theme cache
- rebuild views plugins
- rebuild views data
- get search api indexes
- get data source controller
- bang (as item_type is unset)
Notice: Undefined index: name in search_api_views_views_data() (line 14 of ../profiles/recruiter/modules/search_api/contrib/search_api_views/search_api_views.views.inc).
SearchApiException: Unknown or invalid item type . in search_api_get_datasource_controller() (line 1155 of ../profiles/recruiter/modules/search_api/search_api.module).
Then, also when disabling a feature module containing facts + an index in code (recruiter) the follow fatal error is thrown regardless of the item_type problem:
( ! ) Fatal error: Call to a member function entityWrapper() on a non-object in .../search_api/contrib/search_api_facets/search_api_facets.module on line 932
Comment | File | Size | Author |
---|---|---|---|
#3 | 1253320--improved-error-handling-3.patch | 14.29 KB | drunken monkey |
search_api_fix.patch | 684 bytes | fago | |
Comments
Comment #1
drunken monkeySo, where else would you say we should catch the exceptions?
Comment #2
mikl CreditAttribution: mikl commentedThe patch looks like a fine way to avoid this.
Comment #3
drunken monkeyGod, nearly a year without progress …
Sorry, everyone!
But the attached patch should at least catch exceptions in the more obvious and annoying places …
Comment #4
drunken monkey