brandondawson.org Drupal Website Developer and Consultant

21Apr/110

Drupal ELFinder issue: cannot select images/files

In my case, this one was that securepages was enabled, and elfinder's file selection dialog pops up in http, rather than https. Adding "elfinder" and "elfinder/*" to securepages' list of pages to force to https cleared up the issue.

20Apr/110

Drupal error: unserialize() (Error at offset X of Y bytes in includes/bootstrap.inc on line 556)

In my case, this error was "Error at offset 2 of 43 bytes" in bootstrap.inc on line 556. I've been building by cloning databases, and this time it came back to bite me in the rear end a little bit, as a misplaced find/replace query resulted in a small flurry of errors.

In any case, the steps outlined in this support node comment were effective enough: I was greeted with what appeared to be a regurgitation of every single module installed!

The steps outlined here, on the other hand, proved very effective: running the query below on the site database quickly revealed the problem module. (If you don't know how to do this from command line, you may use phpMyAdmin or a similar solution.)

SELECT name, LENGTH( value ) , value
 FROM variable
 WHERE LENGTH( value ) = "43"


IMPORTANT: ALWAYS make sure you back up your database before doing major MySQL surgery.

In my case, it proved to be an ubercart variable. As I didn't need ubercart, I disabled it, and removed all the ubercart tables from the database altogether. Error solved. But you may also simply go into the admin dialog for the variable in question and re-enter the data, or alternatively, remove the variable from the database.

This should hold true for any of the many possible instances of that error, just replace "43" with the number reported in your error_log.

19Apr/110

Drupal Error: includes/common.inc on line 1593

In addition to the tips provided here and despite what's shown here, in my experience, if this error is accompanied by a WSOD/white-screen in the admin/build/menu-customize/primary-links menu, the issue is in the menu tables. In my case, I was able to restore from a backup; the initial cause was a pattern replacement query I'd run on the entire database.