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.
just ran database update and got this error:
Failed: PDOException: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'rule_themes' at row 1: ALTER TABLE {css_injector_rule} CHANGE `rule_themes` `rule_themes` TEXT NOT NULL COMMENT 'Themes that CSS rule will be applied to'; Array ( ) in db_add_field() (line 2841 of /srv/bindings/71e0b70f90834fb4b8f120c0cf9c78c7/code/includes/database/database.inc).
Comments
Comment #1
zilla CreditAttribution: zilla commentedfigured it out: just saw this error on the site
Warning: in_array() expects parameter 2 to be array, boolean given in css_injector_init() (line 55 of /srv/bindings/71e0b70f90834fb4b8f120c0cf9c78c7/code/sites/all/modules/css_injector/css_injector.module).
it's happening because the update now allows user to specify a theme for the rule BUT the default is blank, so it sees a rule with applied theme.
by simply editing each rule and specifying a theme, the error went away.
Comment #2
gilsbert CreditAttribution: gilsbert commentedThis bug is a side effect from bug reported here: https://drupal.org/node/2154159 .
Editing and saving will avoid the warning messages but you will still have a pending database update to be applied.
Regards,
Gilsberty
Comment #3
gilsbert CreditAttribution: gilsbert commentedComment #4
Jeffrey C. CreditAttribution: Jeffrey C. commentedClosing this as a duplicate of #2154159: Provide the correct default value for field 'rule_themes'.
Comment #5
Kevin Morse CreditAttribution: Kevin Morse commentedIt didn't appear to get closed. This should do it.