All add-ons currently require PHP 7.4 or greater.

On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.

Please read about the changes to BoldMinded add-on licensing.

Ticket: Error When Updating Bloqs from v4.0.5 to v5.0.13

Status Resolved
Add-on / Version Bloqs Latest
Severity
EE Version 7.4.11

Blake DuBose

Jun 20, 2024

Description of the problem Trying to upgrade Bloqs from v4 to v5 and getting an error.

Error Messages


SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'templatedefinition_id':
ALTER TABLE `exp_blocks_block` ADD `templatedefinition_id` INT(1) NOT NULL DEFAULT 0 AFTER `rgt`
ee/legacy/database/drivers/mysqli/mysqli_connection.php:146
Stack Trace: Please include when reporting this error
    #0 ee/legacy/database/drivers/mysqli/mysqli_driver.php(112): CI_DB_mysqli_connection->query('ALTER TABLE `ex...')
    #1 ee/legacy/database/DB_driver.php(262): CI_DB_mysqli_driver->_execute('ALTER TABLE `ex...')
    #2 ee/legacy/database/DB_driver.php(177): CI_DB_driver->simple_query('ALTER TABLE `ex...')
    #3 user/addons/bloqs/updates/up_4_06_00.php(69): CI_DB_driver->query('ALTER TABLE `ex...')
    #4 user/addons/bloqs/Library/Basee/Updater.php(128): Update_4_06_00->doUpdate()
    #5 user/addons/bloqs/upd.bloqs.php(147): BoldMinded\Bloqs\Library\Basee\Updater->runUpdates()
    #6 ee/ExpressionEngine/Controller/Addons/Addons.php(388): Bloqs_upd->update('4.0.5')
    #7 [internal function]: ExpressionEngine\Controller\Addons\Addons->update(Array)
    #8 ee/ExpressionEngine/Core/Core.php(268): call_user_func_array(Array, Array)
    #9 ee/ExpressionEngine/Core/Core.php(124): ExpressionEngine\Core\Core->runController(Array)
    #10 ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run(Object(ExpressionEngine\Core\Request))
    #11 public/admin.php(139): require_once('...')
    #11 public/admin.php(139): require_once('...') 

Environment Details: - Version: [e.g. 5.0.1] - PHP Version [8.0] - MySQL Version [maria-db 10.8] - OS: [e.g. Linux/macOS] - Web Server: nginx/DDEV]

#1

BoldMinded (Brian)

Ah crap. I can send a new build or you can make this simple update. On line 68 of updates/up_4_06_00.php change

if (!$db->field_exists('template_id', 'blocks_block')) {

to

if (!$db->field_exists('templatedefinition_id', 'blocks_block')) {

Then run the updates again.

#2

BoldMinded (Brian)

Actually I just pushed 5.0.14 for download.

#3

Blake DuBose

That did it. Thank you for the quick turnaround!

Login to reply