Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Facets
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Aug 2011 at 08:30 UTC
Updated:
26 Sep 2011 at 15:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
drunken monkeyI'm pretty sure where the problem lies: you seem (for whatever reason) to still have facets for an already deleted index, resulting in this error.
For catching this and avoiding the fatal error, please test the attached patch.
Then, for cleaning up your data, execute the following SQL statement:
DELETE FROM search_api_facet WHERE index_id NOT IN (SELECT machine_name FROM search_api_index)(Of course, add the appropriate table prefixes if you have one defined.)
Comment #2
drunken monkeyComment #3
Refineo commentedComment #4
Refineo commentedThe cron run successfully after deleting obsolete records (above).
Now testing the patch for error handling (after creating some test data)...
Comment #5
Refineo commentedApplying the patch makes no harm to the module but I cannot get the error handling message even after removing indices and leaving facet data so I cannot fully confirm the new code handles errors.
Comment #6
drunken monkeyYes, that's why I suggested to do it in the other order. Anyways, I'm pretty sure this fixes at least that instance of the bug.
Also, since we will very soon abandon the Facets module anyways (see #1182614: Integrate with Facet API), more complicated bug fixing would be wasted anyways.
Committed this, thanks for reporting and testing!
Comment #7
miiimoooSorry re-opening. I just upgrade a site from my dev version to the current recommended one 1.0-beta9 and now I'm stuck with this error..
EDIT: all my facets refer to the same existing index
Comment #8
drunken monkey1) Beta 10 is the recommended version.
2) If it's not in the dev version, I can't do anything about it. The dev version already catches this error.
Weird, though, that this should occur with valid facets. However, I could imagine that
search_api_index_load()in general doesn't work for you at the moment, if the entity type information is outdated. To fix, executecache_clear_all('entity_info:', 'cache', TRUE);(or manually delete those entries from the cache table).Comment #9
miiimoooJust to confirm the 'fixed': I got this error I think mainly because I hadn't upgraded entity API. Upgrading everything (search_api, search_api_solr, entity) in one go to beta10 worked!