Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The following updates returned messages
css_injector module
Update #7001
Failed: DatabaseSchemaObjectExistsException: Cannot add field css_injector_rule.enabled: field already exists. in DatabaseSchema_mysql->addField() (line 328 of /home/******/public_html/includes/database/mysql/schema.inc).
Comments
Comment #1
rfayThis probably means you were using an already-updated schema (from a dev version). And there *was* a dev version out there with bad update numbers.
Assuming your schema is already correct, you should be able to fix this by the mysql command "UPDATE system SET schema_version=7001 WHERE name='css_injector';"
@oresh, you could improve this by if (!db_field_exists()).
Comment #2
holgersen CreditAttribution: holgersen commentedI got the same error message when updating to CSS injector 7.x-1.9. I have not been using any dev version prior to the update.
After the failing update I get the following warnings:
Warning: in_array() expects parameter 2 to be array, boolean given in css_injector_init() (line 55 of /customers/***/httpd.www/sites/all/modules/css_injector/css_injector.module).
Would it still be ok to run "UPDATE system SET schema_version=7001 WHERE name='css_injector';", even after seeing this warning?
Comment #3
Kevin Morse CreditAttribution: Kevin Morse commentedI just attempted the upgrade from 7.x-1.9 and got a different fail
Any ideas?
Comment #4
Jeffrey C. CreditAttribution: Jeffrey C. commentedSame as #3. Please advise.
Comment #5
Jeffrey C. CreditAttribution: Jeffrey C. commentedHello there,
If you're seeing:
Or,
#2154159: Provide the correct default value for field 'rule_themes' should be able to resolve your problem.
Comment #6
creeksideplayers CreditAttribution: creeksideplayers commentedSame as #3. Went back to 7.x-1.8, but I'm still seeing a pending update. How do I clear this?
Comment #7
holgersen CreditAttribution: holgersen commentedThe warning from #2:
seems to have gone away by following the instructions in #5, although I didn't change any settings.
However, I still have one pending update which, when having been applied, results in the following failure:
Comment #8
creeksideplayers CreditAttribution: creeksideplayers commentedI went back to 1.9. I did the change suggested by #5. I also commented out the following lines in css_injector.install (lines 84 and 85):
This makes the update succeed.
Comment #9
Geijutsuka CreditAttribution: Geijutsuka commentedHaving the same issue upon update:
...and the warning message:
Comment #10
Kevin Morse CreditAttribution: Kevin Morse commentedI appear to be in the same boat as the others...
After going through and saving the CSS Injector rules with one theme chosen I now get the following when I update:
Comment #11
jontyler CreditAttribution: jontyler commentedSame as the others, even after selecting a theme in the rule:
Comment #12
makimaki CreditAttribution: makimaki commentedI'm getting the following after updating:
Update #7001
Failed: DatabaseSchemaObjectExistsException: Cannot add field css_injector_rule.enabled: field already exists. in DatabaseSchema_mysql->addField() (line 328 of /home/XXXX/YYYY/includes/database/mysql/schema.inc).