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 error in product price callback #2499

Merged
merged 1 commit into from
Nov 9, 2023
Merged

Conversation

fritzmg
Copy link
Contributor

@fritzmg fritzmg commented Oct 26, 2023

When editing price tiers in the official Isotope demo, the following error will occur (in dev):

ErrorException:
Warning: Attempt to read property "id" on null

  at isotope\vendor\isotope\isotope-core\system\modules\isotope\library\Isotope\Backend\ProductPrice\Callback.php:29
  at Isotope\Backend\ProductPrice\Callback->initializeDCA(object(DC_Table))
     (isotope\vendor\contao\core-bundle\src\Resources\contao\drivers\DC_Table.php:201)
  at Contao\DC_Table->__construct('tl_iso_product_price', array('tables' => array('tl_iso_product', 'tl_iso_group', 'tl_iso_product_category', 'tl_iso_download', 'tl_iso_related_product', 'tl_iso_product_price', 'tl_iso_product_pricetier', 'tl_iso_attribute_option'), 'javascript' => 'system/modules/isotope/assets/js/backend.js', 'generate' => array('Isotope\\Backend\\Product\\VariantGenerator', 'generate'), 'import' => array('Isotope\\Backend\\Product\\AssetImport', 'generate'), 'fallback' => array('Isotope\\Backend\\Product\\Fallback', 'setFromUrl')))
     (isotope\vendor\contao\core-bundle\src\Resources\contao\classes\Backend.php:416)
  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)   

This PR fixes that.

@aschempp aschempp changed the base branch from 2.8 to 2.9 November 9, 2023 13:19
@aschempp aschempp added this to the 2.9.0 milestone Nov 9, 2023
@aschempp aschempp added the bug label Nov 9, 2023
@aschempp aschempp merged commit 847a5da into isotope:2.9 Nov 9, 2023
@aschempp
Copy link
Member

aschempp commented Nov 9, 2023

Thank you @fritzmg. Merged into 2.9 since we're not planning for another 2.8 release.

@fritzmg fritzmg deleted the patch-14 branch November 9, 2023 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants