WD php: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB/TEXT column 'message'     [error]
can't have a default value: CREATE TABLE {support_nags} (
`nagid` INT unsigned NOT NULL auto_increment, 
`action` INT unsigned NOT NULL DEFAULT 0 COMMENT 'Nag action to perform.', 
`clients` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'List of all clients affected by this nag.', 
`states` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'List of all states affected by this nag.', 
`priorities` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'List of all priorities affected by this nag.', 
`assigned` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'List of all assigned users affected by this nag.', 
`mailto` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Notification recipients.', 
`subject` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'Notification subject.', 
`message` TEXT NOT NULL DEFAULT '' COMMENT 'Notification or update message text.', 
`frequency` INT unsigned NOT NULL DEFAULT 0 COMMENT 'Frequency to send notification or update ticket.', 
`last` INT unsigned NOT NULL DEFAULT 0 COMMENT 'Last notification or update.', 
`count` INT unsigned NOT NULL DEFAULT 0 COMMENT 'Total notifications sent or updates made.', 
PRIMARY KEY (`nagid`)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'The support_nags table stores individual support
nag...'; Array
(
)
 in db_create_table() (line 2684 of /home/digidog/www/drupal7/includes/database/database.inc).
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB/TEXT column 'message' can't have a default value: CREATE TABLE {support_nags} (
`nagid` INT unsigned NOT NULL auto_increment, 
`action` INT unsigned NOT NULL DEFAULT 0 COMMENT 'Nag action to perform.', 
`clients` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'List of all clients affected by this nag.', 
`states` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'List of all states affected by this nag.', 
`priorities` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'List of all priorities affected by this nag.', 
`assigned` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'List of all assigned users affected by this nag.', 
`mailto` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Notification recipients.', 
`subject` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'Notification subject.', 
`message` TEXT NOT NULL DEFAULT '' COMMENT 'Notification or update message text.', 
`frequency` INT unsigned NOT NULL DEFAULT 0 COMMENT 'Frequency to send notification or update ticket.', 
`last` INT unsigned NOT NULL DEFAULT 0 COMMENT 'Last notification or update.', 
`count` INT unsigned NOT NULL DEFAULT 0 COMMENT 'Total notifications sent or updates made.', 
PRIMARY KEY (`nagid`)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'The support_nags table stores individual support nag...'; Array
(
)
 in db_create_table() (line 2684 of /home/digidog/www/drupal7/includes/database/database.inc).
Drush command terminated abnormally due to an unrecoverable error. 

not sure if this error occurs only in my enviroment or my installation method via Drush 4.5 on Drupal 7 latest --dev (installing it among with support, support_bot and bot)

CommentFileSizeAuthor
#4 support_nag-7.x-1.x-dev.tar_.patch13.07 KBvenkat-rk

Comments

samgreco’s picture

I'm getting the same thing installing manually. On Drupal 7.10.

Ivan Simonov’s picture

Syntax error or access violation: 1101 BLOB/TEXT column 'message' can't have a default value:

Just comment string 75 in support_nag.install

       'message' => array(
        'type' => 'text',
        'not null' => TRUE,
        //'default' => '',
        'description' => 'Notification or update message text.',
      ),
matiaslezin’s picture

That works for me.

venkat-rk’s picture

StatusFileSize
new13.07 KB

I am interested in this module, but got the same error as others in this issue.

So, I used the coder review service at boombatower.com and ran the module which gave the resulting patch file attached here. I don't have the slightest idea if this will address the problem in this issue or even what the patch means, but if it does work, would love to see it committed.

Sorry in advance if the patch has no relevance to the issue at hand.

betz’s picture

i can confirm this problem and #2 is fixing it.

Ndesign’s picture

Im getting this in my error logs when saving an action... NOTE..i was only able to access the configuration page with the fix from comment #2.

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'message' in 'field list': INSERT INTO {support_nags} (clients, states, priorities, assigned, subject, message, frequency, mailto) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => Notification [:db_insert_placeholder_5] =>

I think this contrib module should be in core with the notifications settings.

Ndesign’s picture

Not sure if this is a good solution but I simply went into phpmyadmin and added a field called "message" in the "support_nags" table. The error went away but not sure if this will affect my website in anyway, hope someone may enlighten me on this.
thank you in advanced

deanflory’s picture

I'm guessing that since I still get this WSOD error when attempting to enable this module, that the module is no longer maintained?

deanflory’s picture

Issue summary: View changes

typo

hkovacs’s picture

Status: Active » Closed (duplicate)

Technically this is a duplicate of https://www.drupal.org/node/964912 which contains the correct patch.

and yes support_nag is minimally maintained.