I get the following on the admin/system/filters page consistantly:
user error: DB Error: unknown error
query: INSERT INTO filters (module, weight) VALUES ('image', 0) in /(...)/includes/database.pear.inc on line 89.
More information:
wfire-drupal=# INSERT INTO filters (module, weight) VALUES ('image', 0);
ERROR: Cannot insert a duplicate key into unique index filters_pkey
wfire-drupal=# select * from filters ;
module | weight
--------+--------
filter | 0
(1 row)
Looking at the schema:
CREATE TABLE filters (
module varchar(64) NOT NULL default '',
weight smallint DEFAULT '0' NOT NULL,
PRIMARY KEY (weight)
);
I see that the primary key is "weight", which sure enough means that you can not insert it with a value of 0, since "filters" is already there with that value.
A workaround for this is simply to give the "Legacy Filters (aparently module "filter") a weight other than 0.
For further amusment, if you insert a new filter, such as bbcode, IT ends up with the "0" weight, and you have to again change it so that image can be created.
Comments
Comment #1
dries commentedI believe this has been fixed in both the HEAD and the DRUPAL-4-4 branch. The fix will be part of Drupal 4.4.1.
Comment #2
LilDave commentedAs an aside, I found this yesterday also.
I posted a patch under "Fitler table definitions incorrect"
Comment #3
WhiteFire commentedYea, just figured out that it was a drupal bug, not image, when I installed a second setup for my main site. Enabled bbcode, smileys and something else all at once.
Cool, glad to hear it's getting fixed. :)
Comment #4
(not verified) commentedIt ain't in 4.4.1. 4.5 maybe?
Comment #5
bruno commentedI believe this has been fixed now, has it?
Comment #6
Stefan Nagtegaal commentedFixed
Comment #7
(not verified) commented