codefog / contao-haste

Haste is a collection of tools and classes to ease working with Contao
http://codefog.pl/extension/haste.html
MIT License
43 stars 24 forks source link

PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message '(Sub)palette "addImage" not found in table "tl_news"' thrown in /system/modules/haste/library/Haste/Dca/PaletteManipulator.php on line 211 #109

Closed derastronaut closed 7 years ago

derastronaut commented 7 years ago

Hello Kamile, if I try to update the MobileContent-Extension from version 2.0.1 to 2.1.1 Contao crashes at the point when I have to update the database and I get this error-message about "haste" in the logs.

`[23-Aug-2017 10:15:09 Europe/Berlin] PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message '(Sub)palette "addImage" not found in table "tl_news"' thrown in /www/htdocs/projectx/dev/system/modules/haste/library/Haste/Dca/PaletteManipulator.php on line 211

0 /www/htdocs/projectx/dev/system/modules/haste/library/Haste/Dca/PaletteManipulator.php(139): Haste\Dca\PaletteManipulator->applyTo('addImage', 'tl_news', 'subpalettes')

1 /www/htdocs/projectx/dev/system/modules/mobilecontent/dca/tl_news.php(28): Haste\Dca\PaletteManipulator->applyToSubpalette('addImage', 'tl_news')

2 /www/htdocs/projectx/dev/system/modules/core/library/Contao/DcaLoader.php(91): include('/www/htdocs/pro...')

3 /www/htdocs/projectx/dev/system/modules/core/library/Contao/Controller.php(1319): Contao\DcaLoader->load(false)

4 /www/htdocs/projectx/dev/system/modules/haste/library/Haste/Model/Relations.php(643): Contao\Controller::loadDataContainer('tl_news')

5 /www/htdocs/projectx/dev/system/modules/haste/library/Haste/Model/Relations.php(464): Haste\Model\Relations::getRelation('tl_news', 'teaser')

6 /www/htdocs/projectx/dev/system/modules/core/library/Contao/Database/Installer.php(410): Haste\Model\Relations->addRelationTables(Array)

7 /www/htdocs/projectx/dev/system/modules/core/library/Contao/DcaExtractor.php(429): Contao\Database\Installer->getFromFile()

8 /www/htdocs/projectx/dev/system/modules/core/library/Contao/DcaExtractor.php(128): Contao\DcaExtractor->createExtract()

9 /www/htdocs/projectx/dev/system/modules/core/library/Contao/DcaExtractor.php(144): Contao\DcaExtractor->__construct('tl_templates')

10 /www/htdocs/projectx/dev/system/modules/core/library/Contao/Database/Installer.php(295): Contao\DcaExtractor::getInstance('tl_templates')

11 /www/htdocs/projectx/dev/system/modules/core/library/Contao/Database/Installer.php(111): Contao\Database\Installer->getFromDca()

12 /www/htdocs/projectx/dev/system/modules/core/library/Contao/Database/Installer.php(41): Contao\Database\Installer->compileCommands()

13 /www/htdocs/projectx/dev/system/modules/repository/classes/RepositoryManager.php(486): Contao\Database\Installer->generateSqlForm()

14 /www/htdocs/projectx/dev/system/modules/repository/classes/RepositoryBackendModule.php(153): RepositoryManager->update('database')

15 /www/htdocs/projectx/dev/system/modules/core/classes/BackendModule.php(98): RepositoryBackendModule->compile()

16 /www/htdocs/projectx/dev/system/modules/repository/classes/RepositoryBackendModule.php(72): Contao\BackendModule->generate()

17 /www/htdocs/projectx/dev/system/modules/repository/classes/RepositoryManager.php(57): RepositoryBackendModule->generate()

18 /www/htdocs/projectx/dev/system/modules/core/classes/Backend.php(423): RepositoryManager->generate()

19 /www/htdocs/projectx/dev/system/modules/core/controllers/BackendMain.php(131): Contao\Backend->getBackendModule('repository_mana...')

20 /www/htdocs/projectx/dev/contao/main.php(20): Contao\BackendMain->run()

21 {main}`

If this is an issue by "haste" I hope you can fix it. If you need any further informations just ask.

Big thanks & greetings Sebastian

qzminski commented 7 years ago

Do you have the news extension installed and enabled?

derastronaut commented 7 years ago

If you mean the preinstalled Contao-News, of course. It is installed and works.

derastronaut commented 7 years ago

Oh sorry I forgot. It's Contao 3.5.28 on PHP 7.0 (CGI).

qzminski commented 7 years ago

This in fact is a bug of the derhaeuptling/contao-mobilecontent extension.

Can you try to download the latest master version and see if it works? Then I will release a new hotfix version of it. https://github.com/derhaeuptling/contao-mobilecontent/archive/master.zip

derastronaut commented 7 years ago

Ok, I deleted the installed mobilecontent-folder, replaced it with your hotfix and now I could do the update of the database without any problems. Everything seems to be good now. Thank you very much! :)

qzminski commented 7 years ago

Perfect, I have just tagged 2.1.2 of that extension. It should soon appear in the Extension Repository as well.