In the better_formats.module, the line ...

$roles  = implode(',', array_keys($user->roles));

should be ...

 $roles  = "'" . implode("','", array_keys($user->roles)) . "'";

so that the values are interpreted as strings, in single quotes. This is really important for database compatibility. I discovered this when trying to use the oracle backend for drupal which is pickier about strings and quotes than mysql. The other approach would be to pass them as digits and not quote them.

I've attached a patch that wraps the role ids in quotes.

Comments

chrisschaub’s picture

Status: Needs review » Closed (won't fix)

Posted too soon! This patch does not work. Please ignore.

chrisschaub’s picture

Status: Closed (won't fix) » Needs review
StatusFileSize
new705 bytes

Ok, I'm reopening this and uploading a new patch against the head of 6.x-2.x. branch. The issue is that you need to make sure you are not passing %s strings against a column like rid -- mysql doesn't mind, but oracle cares. Hope it's ok.

dragonwize’s picture

Status: Needs review » Fixed

Committed. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.