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

Transition "select_shipping" cannot be applied on state "shipping_skipped" of object "App\Entity\Order\Order" with graph "sylius_order_checkout" #132

Open
maximehuran opened this issue Jul 17, 2019 · 1 comment

Comments

@maximehuran
Copy link

maximehuran commented Jul 17, 2019

When I create an order from admin, I have this error :

Transition "select_shipping" cannot be applied on state "shipping_skipped" of object "App\Entity\Order\Order" with graph "sylius_order_checkout"

I create an order with product without shipping (virtual products).
I think this is why I have this exception, I don't need shipping for this order and something in the code try to select it.

Here is the stacktrace :

SM\SMException:
Transition "select_shipping" cannot be applied on state "shipping_skipped" of object "App\Entity\Order\Order" with graph "sylius_order_checkout"

  at vendor/winzou/state-machine/src/SM/StateMachine/StateMachine.php:122
  at SM\StateMachine\StateMachine->apply('select_shipping')
     (vendor/sylius/admin-order-creation-plugin/src/EventListener/OrderCreationListener.php:44)
  at Sylius\AdminOrderCreationPlugin\EventListener\OrderCreationListener->completeOrderBeforeCreation(object(ResourceControllerEvent), 'sylius.order.pre_admin_create', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:115)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(ResourceControllerEvent), 'sylius.order.pre_admin_create', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:212)
  at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener)), 'sylius.order.pre_admin_create', object(ResourceControllerEvent))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:44)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('sylius.order.pre_admin_create', object(ResourceControllerEvent))
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:145)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('sylius.order.pre_admin_create', object(ResourceControllerEvent))
     (vendor/sylius/resource-bundle/src/Bundle/Controller/EventDispatcher.php:76)
  at Sylius\Bundle\ResourceBundle\Controller\EventDispatcher->dispatchPreEvent('admin_create', object(RequestConfiguration), object(Order))
     (vendor/sylius/resource-bundle/src/Bundle/Controller/ResourceController.php:191)
  at Sylius\Bundle\ResourceBundle\Controller\ResourceController->createAction(object(Request))
     (vendor/symfony/http-kernel/HttpKernel.php:150)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:67)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:198)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:25)
@maximehuran
Copy link
Author

Patch : #134

GSadee added a commit that referenced this issue Feb 25, 2022
…i, GSadee)

This PR was merged into the 1.1-dev branch.

Discussion
----------

This is similar to already existing PR, but i think original poster stopped responding so I can try to get that working. 


Issue:
#134

However, the issue also appears when product is not virtual, but skipping_shipping_step_allowed in channel

PR:
#132


Commits
-------

c1f47db Fix state machine exception on order creation
bc25387 added phpspec tests
10bf4b5 Remove PHPUnit cache file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant