0

Some of my customers have some strange behavior (Magento 2.2.7) : when they try to add a product to the cart, the spinner is loading forever. I detect a 500 error in the console :

mydomain.com/customer/section/load/?sections=cart%2Cmessages&update_section_id=true&_=1547657718709

And I have this in the logs :

PHP Fatal error:  Uncaught TypeError: Return value of Magento\\ConfigurableProduct\\Model\\Product\\Configuration\\Item\\ItemProductResolver::getChildProduct()
 must be an instance of Magento\\Catalog\\Model\\Product, null returned
 in
 /data/www/mystore/prod/vendor/magento/module-configurable-product/Model/Product/Configuration/Item/ItemProductResolver.php:83\nStack
 trace:\n#0
 /data/www/mystore/prod/vendor/magento/module-configurable-product/Model/Product/Configuration/Item/ItemProductResolver.php(51): Magento\\ConfigurableProduct\\Model\\Product\\Configuration\\Item\\ItemProductResolver-getChildProduct(Object(Magento\\Quote\\Model\\Quote\\Item))\n#1
 /data/www/mystore/prod/vendor/magento/module-catalog/Model/Product/Configuration/Item/ItemResolverComposite.php(44):
 Magento\\ConfigurableProduct\\Model\\Product\\Configuration\\Item\\ItemProductResolver-getFinalProduct(Object(Magento\\Quote\\Model\\Quote\\Item))\n#2
 /data/www/mystore/prod/vendor/magento/module-checkout/CustomerData/DefaultItem.php(129):
 Magento\\Catalog\\Model\\P in
 /data/www/mystore/prod/vendor/magento/module-configurable-product/Model/Product/Configuration/Item/ItemProductResolver.php
 on line 83, referer: mydomain/catalogsearch/result/?q=+test

I did not found any info about this error anywhere, maybe you can help me ?

0

Solved (if I can say that) : it was Redis session cache that was the source. I disabled this session cache and all is working now (but I lost the session cache)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.