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

[Bug]: 500 Error while adding gift card product to the cart #256

Open
mpysiak opened this issue Nov 7, 2023 · 4 comments
Open

[Bug]: 500 Error while adding gift card product to the cart #256

mpysiak opened this issue Nov 7, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@mpysiak
Copy link

mpysiak commented Nov 7, 2023

Plugin version

0.12.x-dev

Sylius version

1.12.11

What happened?

500 Error while adding gift card product to the cart. I've created new product - gift card. When I try to add product to the cart there is an error.

Problem is in Sylius OrderItemController in method resolveAddedOrderItem probably due to OrderItem::equals() method override

Screenshot 2023-11-07 at 07 36 35

Relevant log output

TypeError:
Sylius\Bundle\OrderBundle\Controller\OrderItemController::resolveAddedOrderItem(): Return value must be of type Sylius\Component\Order\Model\OrderItemInterface, bool returned

  at vendor/sylius/sylius/src/Sylius/Bundle/OrderBundle/Controller/OrderItemController.php:251
  at Sylius\Bundle\OrderBundle\Controller\OrderItemController->resolveAddedOrderItem(object(Order), object(OrderItem))
     (vendor/sylius/sylius/src/Sylius/Bundle/OrderBundle/Controller/OrderItemController.php:83)
  at Sylius\Bundle\OrderBundle\Controller\OrderItemController->addAction(object(Request))
@mpysiak mpysiak added the bug Something isn't working label Nov 7, 2023
@cbastienbaron
Copy link

same issue here :

composer info setono/sylius-gift-card-plugin
name     : setono/sylius-gift-card-plugin
descrip. : Gift card plugin for Sylius
keywords : 
versions : * 0.12.x-dev
type     : sylius-plugin
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : 
source   : [git] https://github.com/Setono/SyliusGiftCardPlugin.git 044203e0346735aa7979a83b2809be47e75f1269
dist     : [zip] https://api.github.com/repos/Setono/SyliusGiftCardPlugin/zipball/044203e0346735aa7979a83b2809be47e75f1269 044203e0346735aa7979a83b2809be47e75f1269
path     : /warehouse/sylius/master-forks/chateau-de-la-chaize/vendor/setono/sylius-gift-card-plugin
names    : setono/sylius-gift-card-plugin

......
composer info sylius/sylius                 
name     : sylius/sylius
descrip. : E-Commerce platform for PHP, based on Symfony framework.
keywords : 
versions : * v1.12.10

have u got a clue/workaround @mpysiak ?

@mpysiak
Copy link
Author

mpysiak commented Nov 9, 2023

have u got a clue/workaround @mpysiak ?

Sorry, didn't hove time to go into details

@marekrzytki
Copy link

Any updates/progress on this issue?

@loevgaard
Copy link
Member

I will be working on these issues in the upcoming weeks. The first PR I did today where I dropped support for PHP 7.4 and PHP 8.0 to make it easier for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants