If you add a custom field to tl_iso_product with an inputType that does not have a model type registered (e.g. for pure back end purposes), the following error will occur:
ErrorException:
Warning: Attempt to read property "id" on null
at vendor\isotope\isotope-core\system\modules\isotope\library\Isotope\Backend\ProductType\AttributeWizard.php:172
at Isotope\Backend\ProductType\AttributeWizard->getEditButton()
(vendor\menatwork\contao-multicolumnwizard-bundle\src\Contao\Widgets\MultiColumnWizard.php:1153)
at MenAtWork\MultiColumnWizardBundle\Contao\Widgets\MultiColumnWizard->initializeWidget()
(vendor\menatwork\contao-multicolumnwizard-bundle\src\Contao\Widgets\MultiColumnWizard.php:830)
at MenAtWork\MultiColumnWizardBundle\Contao\Widgets\MultiColumnWizard->generate()
(vendor\contao\core-bundle\src\Resources\contao\library\Contao\Widget.php:661)
at Contao\Widget->generateWithError()
(vendor\contao\core-bundle\src\Resources\contao\templates\backend\be_widget.html5:3)
at include('C:\\Users\\fmg\\www\\die-garten-tulln\\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:608)
at Contao\Widget->parse()
(vendor\contao\core-bundle\src\Resources\contao\classes\DataContainer.php:804)
at Contao\DataContainer->row()
(vendor\contao\core-bundle\src\Resources\contao\drivers\DC_Table.php:1985)
at Contao\DC_Table->edit()
(vendor\isotope\isotope-core\system\modules\isotope\library\Isotope\BackendModule\BackendOverview.php:245)
at Isotope\BackendModule\BackendOverview->getModule()
(vendor\isotope\isotope-core\system\modules\isotope\library\Isotope\BackendModule\BackendOverview.php:84)
at Isotope\BackendModule\BackendOverview->generate()
(vendor\contao\core-bundle\src\Resources\contao\classes\Backend.php:439)
at Contao\Backend->getBackendModule()
(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()
(vendor\symfony\http-kernel\HttpKernel.php:75)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor\symfony\http-kernel\Kernel.php:202)
at Symfony\Component\HttpKernel\Kernel->handle()
(public\index.php:44)
$objAttribute can be null at this point (see previous line). This PR fixes that by adding an additional check. You can reproduce the issue as follows:
If you add a custom field to
tl_iso_product
with aninputType
that does not have a model type registered (e.g. for pure back end purposes), the following error will occur:$objAttribute
can benull
at this point (see previous line). This PR fixes that by adding an additional check. You can reproduce the issue as follows:Then try to edit a product type.