terminal42 / contao-dcawizard

A Contao CMS widget to handle external table records in the edit mode of the parent record.
10 stars 10 forks source link

DCA Wizard Bug when using checkbox menu attribute in Isotope E-commerce #34

Closed rburch closed 1 year ago

rburch commented 1 year ago

Hitting what seems like a PHP 8 bug with DCAwizard when using Isoptope. I'm using ISO 2.8.12. PHP 8.1, Contao 4.13.23.

When I try to make a checkbox menu attribute with Options Manager I get this error: An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Array' in 'where clause'

Here's the stack trace: `ErrorException: Warning: Array to string conversion

at vendor/terminal42/dcawizard/widgets/DcaWizardMultilingual.php:31 at DcaWizardMultilingual->getForeignTableCondition() (vendor/terminal42/dcawizard/widgets/DcaWizard.php:422) at DcaWizard->getWhereCondition() (vendor/terminal42/dcawizard/widgets/DcaWizard.php:377) at DcaWizard->getRecords() (vendor/terminal42/dcawizard/widgets/DcaWizard.php:197) at DcaWizard->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('/home/mossnutrition/public_html/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('{attribute_legend},name,field_name,type,legend,customer_defined;{description_legend:hide},description;{options_legend},optionsSource,[optionsSource],optionsTable,[EOF];{config_legend},mandatory;{search_filters_legend},fe_filter,fe_sorting,be_filter') (vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:1979) at Contao\DC_Table->edit() (vendor/isotope/isotope-core/system/modules/isotope/library/Isotope/BackendModule/BackendOverview.php:245) at Isotope\BackendModule\BackendOverview->getModule('attributes') (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('iso_setup', 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)) (web/index.php:44) `

Here's the error with Debug enabled: Uncaught PHP Exception ErrorException: "Warning: Array to string conversion" at /home/mossnutrition/public_html/vendor/terminal42/dcawizard/widgets/DcaWizardMultilingual.php line 31

It's happening on two different sites we're building.

aschempp commented 1 year ago

Fixed in d3cf728033321b1513b8e682ccfd4eea01af4b93