ShopApiPlugin icon indicating copy to clipboard operation
ShopApiPlugin copied to clipboard

[BUG Report] checkout error

Open ghost opened this issue 7 years ago • 11 comments

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

  • sylius v1.0.3
  • syliusShopApiPlugin dev-master
  • nelmio/cors-bundle v1.5.3

ghost avatar Nov 18 '17 17:11 ghost

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

Hailong avatar Jan 10 '18 19:01 Hailong

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 avatar Oct 15 '19 14:10 bochkarev-artem

i would sugget reopenning the issue, or updating documentation

bochkarev-artem avatar Oct 15 '19 14:10 bochkarev-artem

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.

misnard avatar Jan 19 '20 23:01 misnard

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

mamazu avatar Jan 20 '20 11:01 mamazu

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

misnard avatar Jan 20 '20 16:01 misnard

This seems to be still an issue.

mamazu avatar Jan 26 '20 20:01 mamazu

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?

alexander-schranz avatar May 22 '20 08:05 alexander-schranz

Isn't it related to #647?

lchrusciel avatar May 22 '20 12:05 lchrusciel

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

alexander-schranz avatar May 22 '20 13:05 alexander-schranz

Same problem after adding suggested changes - works

FDiskas avatar Jan 21 '21 11:01 FDiskas