Jump to content


Photo

update blocks using template causes driver error


Go Delete a block template in use, choose to make the block use a different template:
mySQL query error: UPDATE ccs_blocks SET block_template='' WHERE block_template = 35
SQL error: Incorrect integer value: '' for column 'block_template' at row 1
SQL error code: 1366
This is wrong in admin_ccs_templates_blocks::preDeleteTemplate()
   //-----------------------------------------
   // Update blocks
   //-----------------------------------------
   $this->DB->update( 'ccs_blocks', array( 'block_template' => $updateTo ), "block_template = {$id}" );
Should be:
//-----------------------------------------
   // Update blocks
   //-----------------------------------------
   $this->DB->update( 'ccs_blocks', array( 'block_template' => $updateTo['tpb_id'] ), "block_template = {$id}" );

Status: Fixed
Version: 2.3.2
Fixed In: 2.3.3


1 Comments

Updating Fixed In to: 2.3.3
Updating Status to: Fixed

-