Sylius / ShopApiPlugin

Shop API for Sylius.
https://sylius.com
130 stars 89 forks source link

[BUG Report] checkout error #241

Open ghost opened 6 years ago

ghost commented 6 years ago

Hi,

I could not make PUT /checkout/{cartid}/address call after updating my local api server, got a 500 error

Type error: Return value of Sylius\Bundle\CoreBundle\Checkout\CheckoutResolver::getRequestedGraph() must be of the type string, null returned"

have noticed that in v1.0.3 update the checkout_resolve config was removed, but it was suggested for the shop-api server in the readme of this repo, can someone take a look at that, by the way, with this config the put address API call works

my current api server dependencies

Hailong commented 6 years ago

Hi @sdleiw , I saw the same error when loading the checkout page, it might be the same issue for API. Changing the path matching pattern will resolve the problem, you could check it out from my PR here: https://github.com/Sylius/SyliusShopApiPlugin/pull/246

bochkarev-artem commented 4 years ago

The same issue with version sylius 1.6.1 and sylius/shop-api-plugin v1.0.0-rc.2 The documentation of this mr helped Although works also with this configuration:

sylius_shop:
    checkout_resolver:
        pattern: "%sylius.security.shop_regex%/checkout/"
bochkarev-artem commented 4 years ago

i would sugget reopenning the issue, or updating documentation

misnard commented 4 years ago

The same issue with version sylius 1.6.1 and sylius/shop-api-plugin v1.0.0-rc.2 The documentation of this mr helped Although works also with this configuration:

sylius_shop:
    checkout_resolver:
        pattern: "%sylius.security.shop_regex%/checkout/"

I found this config inside of this file config/packages/_sylius.yaml

Thanks.

mamazu commented 4 years ago

Is this still an issue in the current configuration? Because now there is no config key like checkout_resolver in the README anymore.

misnard commented 4 years ago

Yes, i face this problem and i didn't found any help in README hopefully this topic help me with some research.

mamazu commented 4 years ago

This seems to be still an issue.

alexander-schranz commented 4 years ago

Can confirm that it still exist.

Adopting the sylius configuration the following way seems to help:

https://github.com/Sylius/ShopApiPlugin/pull/246/files

Why was this removed from the README?

lchrusciel commented 4 years ago

Isn't it related to #647?

alexander-schranz commented 4 years ago

@lchrusciel It could the error was something like the graph is not defined but not sure.

FDiskas commented 3 years ago

Same problem after adding suggested changes - works