I recently installed a Drupal 7 site using Sqlite3 for the database backend, on the Cherokee webserver. So far it seems to be running great, its been a breeze to configure both to get along with each other.
I have come across two database-related errors thus far.
1) I cannot remove user roles.
Logged in as admin, looking at admin/config/people/roles. Clicked on "edit" on a role, and then clicked the "delete" button yielded the following error:
* Notice: Trying to get property of non-object in user_role_delete() (line 2417 of modules/user/user.module).
* Notice: Trying to get property of non-object in user_role_delete() (line 2420 of modules/user/user.module).
* Notice: Trying to get property of non-object in user_role_delete() (line 2424 of modules/user/user.module).
* Notice: Trying to get property of non-object in block_user_role_delete() (line 913 of modules/block/block.module).
2) I cannot add users
I tried to add a new user both through the admin/people interface, and logging out and clicking the register link. Both yielded the following errors:
* Notice: Undefined variable: new_value in DatabaseConnection->nextId() (line 1086 of includes/database/database.inc).
* PDOException: SQLSTATE[23000]: Integrity constraint violation: 19 PRIMARY KEY must be unique: INSERT INTO {users} (uid, name, pass, mail, theme, signature, created, access, login, status, timezone, language, picture, init) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); Array ( [0] => 0 [1] => testwriter [2] => $P$CkXvJQ.9wLcSCmb4eQkQAO1YYkcaFH. [3] => aminorthreat@gmail.com [4] => [5] => [6] => 1257358404 [7] => 1257358404 [8] => 0 [9] => 1 [10] => America/Vancouver [11] => [12] => 0 [13] => aminorthreat@gmail.com ) in drupal_write_record() (line 5790 of includes/common.inc).
The first issue I have not looked into, code-wise, because I am at work doing this on my break at the moment and haven't had sufficient time to dig into that part of this unfamiliar code.
The second issue I was able to fix quite easily.
On line 1086 of database.inc, change:
return $new_value;
to:
return $existing_id + 1;
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drupal-623460.patch | 1.57 KB | peter törnstrand |
Comments
Comment #1
KingRadical commentedAlso cannot delete users:
Comment #2
peter törnstrand commentedHere is a patch. My first ever. Hope I did it right.
I accidentally posted the patch over at #626790: drupal_write_record returns FALSE for valid update queries so I guess this is why it get's ignored here.
Comment #3
lilou commentedComment #4
damien tournoud commentedThis is a duplicate of #633678: Make sequence API work on non-MySQL databases. Please help review the patch there!