0

We recently moved our site over to Drupal 7. During development, we were able to index the site using Acquia search and the solr modules without issue. However, sometime between our last tests and our launch something went wrong and our index will now no longer run.

We receive the error: Fatal error: Cannot use string offset as an array in /var/www/[...]/public/profiles/acquia/modules/apachesolr/apachesolr.index.inc on line 853

Cron is not running on our site due to this error, and this is causing massive problems as emails and other notifications are not being sent. In addition, half our content has not been indexed so our search is basically useless.

I have tried the following to attempt to fix the issue with no avail:

  • Checked database field_body_value for any php code that may be causing problems, such as drupal_goto, etc.
  • Removed all pages that use the PHP filter except where absolutely necessary

Our site successfully indexed about 1200 nodes out of 2400, but it will progress no further. The error gives us absolutely no indication of which node it is stuck on so we can fix it!

Is there any way to determine which node was indexed last so we have a better idea of where the error exists, or does anyone else have any suggestions on how to repair this error?

  • Change the no. of nodes indexed per cron run to 1, then run it until you find the problematic node. – Clive Dec 13 '13 at 14:53
  • BTW if you have the geofield module installed update to the latest version, there's been recent fixes to its SOLR integration – Clive Dec 13 '13 at 14:58
  • @Clive with 1200 nodes left, search by += 1 incrementation will be slow. I'd suggest bisection. 1) Change no. of nodes indexed per cron run to 1/2 of it's current value. 2) Run. 3) Repeat until it fails. 4) when it fails finally, go to 1). This should show broken node way faster, in less than 12 tries probably, instead of up to 1200 ;) – Mołot Dec 13 '13 at 15:11
  • @Mołot The entity query apachsolr prepares is predictable (i.e. run apachesolr_index_entities(10) a couple of times on a failing site and it will try to index the same entities each time), so it's pretty likely that either the 1201st node is the root of the problem, or there's a schema issue. I've had the misfortune of debugging this exact issue on several sites in the last couple of weeks, it's not fun. Luckily one of the site is on Pantheon and their solr module's error reporting is very good which led me to the geofield problem. But yeah, if that's not the problem your way is much better! – Clive Dec 13 '13 at 15:45
  • Thanks for the suggestions, everyone - one problem, there's no manner to determine WHICH node was last indexed and is currently the problem. I can turn down the index or change settings all I want, but where do I determine WHICH node is causing the problem? – oranges13 Dec 15 '13 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.