oveleon / contao-component-style-manager

This extension is for the Contao CMS and allows you to easily manage and provide custom categories and groups for CSS classes.
MIT License
23 stars 6 forks source link

error in CE using v3.0.0 #68

Closed frontendschlampe closed 1 year ago

frontendschlampe commented 1 year ago

I installed Style Manager in v3.0.0 on Contao 4.13.13 with PHP 8.1.11 and imported my XML-Asset. When I open a Content Element I got the following error:

TypeError:
Cannot assign null to property Oveleon\ContaoComponentStyleManager\StyleManager\Config::$arrArchive of type array

  at vendor/oveleon/contao-component-style-manager/src/StyleManager/Config.php:138
  at Oveleon\ContaoComponentStyleManager\StyleManager\Config->__construct()
     (vendor/oveleon/contao-component-style-manager/src/StyleManager/Config.php:158)
  at Oveleon\ContaoComponentStyleManager\StyleManager\Config::getInstance()
     (vendor/oveleon/contao-component-style-manager/src/Model/StyleManagerArchiveModel.php:68)
  at Oveleon\ContaoComponentStyleManager\Model\StyleManagerArchiveModel::findAllWithConfiguration(array('order' => 'sorting'))
     (vendor/oveleon/contao-component-style-manager/src/Widget/ComponentStyleSelect.php:53)
  at Oveleon\ContaoComponentStyleManager\Widget\ComponentStyleSelect->generate()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Widget.php:660)
  at Contao\Widget->generateWithError(true)
     (vendor/contao/core-bundle/src/Resources/contao/templates/backend/be_widget.html5:3)
  at include('/htdocs/vendor/contao/core-bundle/src/Resources/contao/templates/backend/be_widget.html5')
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/TemplateInheritance.php:108)
  at Contao\Widget->inherit()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Widget.php:607)
  at Contao\Widget->parse()
     (vendor/contao/core-bundle/src/Resources/contao/classes/DataContainer.php:795)
  at Contao\DataContainer->row('{type_legend},type,subline,headline;{template_legend:hide},customTpl;{protected_legend:hide},protected;{style_manager_legend},styleManager;{expert_legend:hide},guests,hofff_toc_include,cssID;{invisible_legend:hide},invisible,start,stop;{includeinfo_legend:hide},includeInfo')
     (vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:1973)
  at Contao\DC_Table->edit()
     (vendor/contao/core-bundle/src/Resources/contao/classes/Backend.php:667)
  at Contao\Backend->getBackendModule('article', null)
     (vendor/contao/core-bundle/src/Resources/contao/controllers/BackendMain.php:168)
  at Contao\BackendMain->run()
     (vendor/contao/core-bundle/src/Controller/BackendController.php:49)
  at Contao\CoreBundle\Controller\BackendController->mainAction()
     (vendor/symfony/http-kernel/HttpKernel.php:163)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:44)

Any idea or is there something, I've missed?

doishub commented 1 year ago

Are you already using bundle configurations? Could you turn them off and see if it works?

// config.yaml
contao_component_style_manager:
    use_bundle_config: false
doishub commented 1 year ago

I can reproduce the error, thanks for reporting! I will create a new release right away.

doishub commented 1 year ago

Should now work again. Fixed in https://github.com/oveleon/contao-component-style-manager/commit/94a862aa77dc72f2ca406e840c3641e0df1860b8

frontendschlampe commented 1 year ago

Great ... thx.