Closed (fixed)
Project:
Apache Solr Views
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Reporter:
Created:
19 Jan 2012 at 21:14 UTC
Updated:
9 Apr 2012 at 14:30 UTC
Jump to comment: Most recent file
The call to apachesolr_get_solr() in the hook_views_data() implementation needs to be wrapped in a try-catch block, since the docs for apachesolr_get_solr() specify that it will throw an exception if something goes wrong. Patch coming in a moment.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1410846-1-apachesolr_views-add_try_catch.patch | 763 bytes | becw |
Comments
Comment #1
becw commentedHere's the patch.
Comment #2
becw commentedapachesolr_views needs to fail gracefully even if apachesolr is misconfigured.
Comment #3
becw commentedMore details: when apachesolr_views is enabled but an apachesolr environment is unavailable (either because one has not been configured or because Solr is unavailable), apachesolr_views fails to catch an exception during cache clears. This has the side effect of preventing the menu from rebuilding.
The patch from #1 fixes this issue.
Comment #4
Refineo commentedI confirm the patch from #1 solved the issue for me as well.
Comment #5
dstuart commentedHave added to 7.x dev. Should be present when picked up by the next ci cycle