Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings in DC_ProductData #2498

Open
wants to merge 1 commit into
base: 2.8
Choose a base branch
from
Open

Conversation

fritzmg
Copy link
Contributor

@fritzmg fritzmg commented Oct 26, 2023

If you install the official Isotope demo and then edit the variants of a product in the back end (in dev), the following error will occur:

Warning: Undefined array key "reference"

  at isotope\vendor\isotope\isotope-core\system\modules\isotope\drivers\DC_ProductData.php:2234
  at DC_ProductData->parentView()
     (isotope\vendor\isotope\isotope-core\system\modules\isotope\drivers\DC_ProductData.php:174)
  at DC_ProductData->showAll()
     (isotope\vendor\contao\core-bundle\src\Resources\contao\classes\Backend.php:667)
  at Contao\Backend->getBackendModule('iso_products', null)
     (isotope\vendor\contao\core-bundle\src\Resources\contao\controllers\BackendMain.php:168)
  at Contao\BackendMain->run()
     (isotope\vendor\contao\core-bundle\src\Controller\BackendController.php:49)
  at Contao\CoreBundle\Controller\BackendController->mainAction()
     (isotope\vendor\symfony\http-kernel\HttpKernel.php:163)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (isotope\vendor\symfony\http-kernel\HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (isotope\vendor\symfony\http-kernel\Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (isotope\public\index.php:44)    

After fixing this one, the following error will occur:

ErrorException:
Warning: Array to string conversion

  at isotope\vendor\isotope\isotope-core\system\modules\isotope\drivers\DC_ProductData.php:2237
  at DC_ProductData->parentView()
     (isotope\vendor\isotope\isotope-core\system\modules\isotope\drivers\DC_ProductData.php:174)
  at DC_ProductData->showAll()
     (isotope\vendor\contao\core-bundle\src\Resources\contao\classes\Backend.php:667)
  at Contao\Backend->getBackendModule('iso_products', null)
     (isotope\vendor\contao\core-bundle\src\Resources\contao\controllers\BackendMain.php:168)
  at Contao\BackendMain->run()
     (isotope\vendor\contao\core-bundle\src\Controller\BackendController.php:49)
  at Contao\CoreBundle\Controller\BackendController->mainAction()
     (isotope\vendor\symfony\http-kernel\HttpKernel.php:163)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (isotope\vendor\symfony\http-kernel\HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (isotope\vendor\symfony\http-kernel\Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (isotope\public\index.php:44)         

May be this needs to be fixed somewhere else though? $options will be an array containing the infos of the product variant here.

@fritzmg fritzmg changed the title Fix array to string conversion in DC_ProductData Fix warnings in DC_ProductData Oct 26, 2023
@aschempp
Copy link
Member

aschempp commented Nov 9, 2023

This is most likely obsolete in 2.9 since we're using the DataContainer::generateRecordLabel method?

@fritzmg
Copy link
Contributor Author

fritzmg commented Nov 9, 2023

I don't know, would need to be tested in 2.9. But this is for 2.8 anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants