Please help,

I was attempting to remove some cache entries and seem to have made a big mistake. I edited some database fields trying to correct an error pointing to the wrong address for bootstrap javascript file.

I am now getting a 500 error and cannot work out how to fix it and I am hoping someone has seen this or knows how to fix it please?

All signs seem to point to an issue with the 'locale' module and the system expecting a result as an array.

The following error is found at /update.php:

Fatal error: Uncaught Error: Unsupported operand types in /home/onlinedi/public_html/modules/locale/locale.module:929 Stack trace: #0 /home/onlinedi/public_html/includes/module.inc(1163): locale_js_alter(Array, NULL, NULL, NULL) #1 /home/onlinedi/public_html/includes/common.inc(4418): drupal_alter('js', Array) #2 /home/onlinedi/public_html/includes/theme.inc(2917): drupal_get_js() #3 /home/onlinedi/public_html/includes/theme.inc(1125): template_process_maintenance_page(Array, 'maintenance_pag...') #4 /home/onlinedi/public_html/includes/errors.inc(254): theme('maintenance_pag...', Array) #5 /home/onlinedi/public_html/includes/bootstrap.inc(2609): _drupal_log_error(Array, true) #6 [internal function]: _drupal_exception_handler(Object(Error)) #7 {main} thrown in /home/onlinedi/public_html/modules/locale/locale.module on line 929

And I found this in the database in the watchdog table:

a:13:{s:4:"name";s:6:"Locale";s:11:"description";s:119:"Adds language handling functionality and enables the translation of the user interface to languages other than English.";s:7:"package";s:4:"Core";s:7:"version";s:4:"7.58";s:4:"core";s:3:"7.x";s:5:"files";a:1:{i:0;s:11:"locale.test";}s:9:"configure";s:30:"admin/config/regional/language";s:7:"project";s:6:"drupal";s:9:"datestamp";s:10:"1522264019";s:5:"mtime";i:1523241717;s:12:"dependencies";a:0:{}s:3:"php";s:5:"5.2.4";s:9:"bootstrap";i:0;}

If somebody can suggest a fix or at least help me trace back the route of the problem, I would really appreciate the assistance.

No sorry, I did not backup and so it is a stupid mistake I realise, so no need for lectures.

My site is based on Drupal 7 with a Bizsearch theme.

Thanks!

Comments

John_B’s picture

As this error is coming from locale module I would disable it first. Your site will work without locale module unless it is mutlilingual anyway. You can uninstall it and if necessary reinstall it if you need it, and set up relevant settings which it provides again. My fix is untested, so you might want to do further work on a development copy of the site, not on a production site.

It would not surprise me if more errors appear. Still, this is the one you asked about.

You can disable the module with drush. If drush will not run, just set the row in the system table for locale to status=0.

Then use drush to clear caches. Editing the database directly is always a risk, though sometimes we cannot avoid it: far better to use drush for these tasks where possible.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors