You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
If a palette contains a trailing ; for example and you try to apply anything on that palette with the PaletteManipulator the following error will occur:
TypeError:
preg_match() expects parameter 2 to be string, null given
at vendor/contao/contao/core-bundle/src/DataContainer/PaletteManipulator.php:199
at preg_match('#\\{(.+?)(:hide)?\\}#', null, array('{invisible_legend:hide}', 'invisible_legend', ':hide'))
(vendor/contao/contao/core-bundle/src/DataContainer/PaletteManipulator.php:199)
at Contao\CoreBundle\DataContainer\PaletteManipulator->explode('{type_legend},type,headline;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID;{invisible_legend:hide},invisible,start,stop;')
(vendor/contao/contao/core-bundle/src/DataContainer/PaletteManipulator.php:139)
at Contao\CoreBundle\DataContainer\PaletteManipulator->applyToString('{type_legend},type,headline;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID;{invisible_legend:hide},invisible,start,stop;')
(vendor/contao/contao/core-bundle/src/DataContainer/PaletteManipulator.php:119)
at Contao\CoreBundle\DataContainer\PaletteManipulator->applyToPalette('headline', 'tl_content')
(app/Resources/contao/dca/tl_content.php:8)
at include('…/app/Resources/contao/dca/tl_content.php')
(vendor/contao/contao/core-bundle/src/Resources/contao/library/Contao/DcaLoader.php:94)
at Contao\DcaLoader->load(false)
(vendor/contao/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:1279)
at Contao\Controller::loadDataContainer('tl_content')
(vendor/contao/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:3391)
at Contao\DC_Table->reviseTable()
(vendor/contao/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:319)
at Contao\DC_Table->showAll()
(vendor/contao/contao/core-bundle/src/Resources/contao/classes/Backend.php:616)
at Contao\Backend->getBackendModule('article', null)
(vendor/contao/contao/core-bundle/src/Resources/contao/controllers/BackendMain.php:169)
at Contao\BackendMain->run()
(vendor/contao/contao/core-bundle/src/Controller/BackendController.php:48)
at Contao\CoreBundle\Controller\BackendController->mainAction()
(vendor/symfony/http-kernel/HttpKernel.php:150)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:67)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:198)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(web/app_dev.php:83)
This is a problem, because some extensions aren't very "clean" when it comes to palette manipulation. A trailing ; that was added by one extension should not break the usage of the PaletteManipulator of any following extension.
How to reproduce
Create the file app/Resources/contao/dca/tl_content.php with the following content:
Affected version(s)
4.7.2
Description
If a palette contains a trailing
;
for example and you try to apply anything on that palette with thePaletteManipulator
the following error will occur:This is a problem, because some extensions aren't very "clean" when it comes to palette manipulation. A trailing
;
that was added by one extension should not break the usage of thePaletteManipulator
of any following extension.How to reproduce
Create the file
app/Resources/contao/dca/tl_content.php
with the following content:Then log into the back end and go to Content » Articles. The aforementioned error will occur.
The text was updated successfully, but these errors were encountered: