We receive this error message when enabling the Block Class module:
PDOException: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot use duplicate column names in index. Column name 'Array' listed more than once.: CREATE TABLE [{block_class}] ( [module] nvarchar(255) NOT NULL CONSTRAINT {block_class}_module_df DEFAULT '', [delta] nvarchar(255) NOT NULL CONSTRAINT {block_class}_delta_df DEFAULT '', [css_class] nvarchar(255) NOT NULL CONSTRAINT {block_class}_css_class_df DEFAULT '', CONSTRAINT {block_class}_pkey PRIMARY KEY CLUSTERED ([Array], [Array]) ); Array ( ) in db_create_table() (line 2688 of C:\inetpub\wwwroot\includes\database\database.inc).
Our technical environment:
Windows Server 2008 R2
IIS 7.5
SQL Server 2008 R2
Comments
Comment #1
johnsweber commentedI'm also getting this error, I'm assuming it's not compatible with SQL Server. Is there an alternative mod that anyone knows of, or is this planned to be addressed? (I get the same error, in the same development environment.
Comment #2
johnsweber commentedI decided to just take a stab at it to fix and was able to get it working.
Open up the block_class.install file, search for 'primary key' replace this line:
'primary key' => array(('module', 128), array('delta', 128)),with this:
'primary key' => array('module','delta'),And disable, reenable the mod.
Comment #3
berenddeboer commentedThanks john, patch committed.