Closed (duplicate)
Project:
Apache Solr Search
Version:
7.x-1.0-rc3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Sep 2012 at 21:49 UTC
Updated:
14 Dec 2012 at 12:43 UTC
I experienced a nasty WSOD by trying to disable the acquia_search module with only one Apache Solr env (Acquia Search). I had deleted the default "localhost" env before and had to recreate it with its default values to prevent having the WSOD any longer. TRUNCATING cache tables manually or disabling any search/Acquia related module didn't help at all.
On the command line, it was breaking drush and throwing this error:
Drush command terminated abnormally due to an unrecoverable error. [error]
PDOException : SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))
ORDER BY env_id ASC, entity_type ASC, bundle ASC' at line 1: SELECT ib.env_id AS env_id, ib.entity_type AS entity_type, ib.bundle AS bundle
FROM
{apachesolr_index_bundles} ib
WHERE (env_id IN ())
ORDER BY env_id ASC, entity_type ASC, bundle ASC; Array
(
)
in apachesolr_environment_load_subrecords() (line 2579 in docroot/sites/all/modules/contrib/apachesolr/apachesolr.module).
Comments
Comment #1
cpliakas commentedHi anavarre.
Thanks for the post, but this is a dup of #1778150: Fatal error on all admin/config/* pages caused by SQL error in apachesolr_environment_load_subrecords().
Thanks,
Chris
Comment #2
mcdruid commentedI know this has been closed as a dupe, but panicking googlers are likely to find this issue as it contains the full error message.
There is a quick fix to get past the WSOD in this situation - to make it a bit easier to go and upgrade the modules without a site which is down.
This is from apachesolr.install
...and should ensure that there's a row in the table to prevent the SQL error from bringing down the site.
If you can't run this code via drush ev, you should be able to do the equivalent insert straight into the db; something like:
n.b. this may well not actually fix apachesolr on your site, as the values may be wrong, but it should at least stop the WSOD.