Upon installing the module, I encountered this error:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB/TEXT column 'element' can't have a default value: CREATE TABLE {node_accessibility_problems} ( `id` BIGINT unsigned NOT NULL auto_increment COMMENT 'The primary key used to represent this problem.', `nid` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The node’s ID from node.nid.', `vid` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The node’s version ID from node.vid.', `test_id` BIGINT unsigned NOT NULL DEFAULT 0 COMMENT 'The numeric ID from quail_api_tests.id, representing a specific error.', `line` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The line number in which the error happened.', `element` TEXT NOT NULL DEFAULT '' COMMENT 'A snippet of the code that failed validation.', PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Node validation problem statistics.'; Array ( ) in db_create_table() (line 2684 of /home/testv71/htdocs/includes/database/database.inc).

I was able to avoid the failure and complete the installation by modifying node_accessibility.install to change this clause:

      'element' => array(
        'description' => st("A snippet of the code that failed validation."),
        'type' => 'text',
        'not null' => TRUE,
        'default' => '',
      ),

to:

      'element' => array(
        'description' => st("A snippet of the code that failed validation."),
        'type' => 'text',
        'not null' => TRUE,
      ),

It was necessary to disable and re-enable the module after the change to allow the install script to run and create the necessary tables.

Comments

thekevinday’s picture

Version: 7.x-1.0-alpha1 » 7.x-1.x-dev
Assigned: Unassigned » thekevinday
StatusFileSize
new714 bytes

This is a problem with your database violating the SQL standard.

I will add a check so that if the site is using a non-standards-complaint database (mysql), then the default value will be left-unassigned.
Please try the patch and let me know if this patch solves the problem.

References:
- https://dev.mysql.com/doc/refman/5.6/en/data-type-defaults.html
- https://bugs.mysql.com/bug.php?id=25520
- https://drupal.org/node/1401782
- https://drupal.org/node/143881

jerry’s picture

Patch resolved the installation issue. Thanks!

thekevinday’s picture

Status: Needs review » Fixed

Fixed in commit 549ebdea91a7abfaf83b41656fd2b2181680d275 of master.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.