terminal42 / contao-easy_themes

Contao extension "easy_themes"
https://unmaintained.tech/
MIT License
13 stars 11 forks source link

error on version jump 2.1.3 to 2.2.0 #19

Closed Aybee closed 8 years ago

Aybee commented 8 years ago

Just updated easy_themes in Contao 3.5.6 with ER1 from 2.1.3 to 2.2.0 with following error on update process

Fatal error: Uncaught exception Exception with message Query error: Unknown column
'easy_themes_internalTitle' in 'field list' (SELECT name,easy_themes_internalTitle FROM
tl_theme WHERE id=2) thrown in system/modules/core/library/Contao/Database/Statement.php
on line 295

#0 system/modules/core/library/Contao/Database/Statement.php(264): Contao\Database\Statement->query()
#1 system/modules/easy_themes/EasyThemes.php(149): Contao\Database\Statement->execute(2)
#2 system/modules/easy_themes/EasyThemes.php(237): EasyThemes->prepareBackendNavigationArray(true)
#3 system/modules/core/classes/BackendUser.php(584): EasyThemes->modifyUserNavigation(Array, false)
#4 system/modules/core/controllers/BackendMain.php(228): Contao\BackendUser->navigation()
#5 system/modules/core/controllers/BackendMain.php(135): Contao\BackendMain->output()
#6 contao/main.php(20): Contao\BackendMain->run()
#7 {main}

There is no field easy_themes_internalTitle in tl_theme

qzminski commented 8 years ago

I can confirm this issue. Guess it's because the hook is triggered before the database is updated. @Toflar

Toflar commented 8 years ago

Fixed in https://github.com/terminal42/contao-easy_themes/commit/8e81640d81d663e6e413c47e3586be321070b5c9.