Hi
I'm having this error when completing order, right after payment when returning to "Completion message" :
The website encountered an unexpected error. Please try again later.InvalidArgumentException: Invalid step ID "" passed to redirectToStep(). in Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowBase->redirectToStep() (line 134 of modules/contrib/commerce/modules/checkout/src/Plugin/Commerce/CheckoutFlow/CheckoutFlowBase.php).
Drupal\commerce_payment\Plugin\Commerce\CheckoutPane\PaymentProcess->buildPaneForm(Array, Object, Array) (Line: 558) Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowWithPanesBase->buildForm(Array, Object, 'complete') call_user_func_array(Array, Array) (Line: 518) Drupal\Core\Form\FormBuilder->retrieveForm('commerce_checkout_flow_multistep_default', Object) (Line: 275) Drupal\Core\Form\FormBuilder->buildForm('commerce_checkout_flow_multistep_default', Object) (Line: 216) Drupal\Core\Form\FormBuilder->getForm(Object, 'complete') (Line: 94) Drupal\commerce_checkout\Controller\CheckoutController->formPage(Object) call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
It seems similar to this commerce_paypal issue but I'm not using Paypal. I'm using Stripe payment instead.
In my case the payment has been correcly handled by Stripe, it appears in Stripe dashboard and the customer recieves the order mail.
Thanks
Using Drupal 8.6.13 / Commerce 8.x-2.13
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | checkout flow.jpg | 96.45 KB | remaye |
Comments
Comment #2
remaye commentedComment #3
bojanz commentedThis sounds like it's caused by a customization you've made to the checkout process.
Did you make a custom checkout flow? Rename any steps? Swap any panes?
Comment #4
remaye commentedThanks for your support.
No, I customized some product templates but I didn't customized the Checkout Flow itself
I just used the admin drag and drop configuration : /admin/commerce/config/checkout-flows/manage/default
(See screenshot)
It seems it apparears after I updated Drupal and Commerce (with composer) to the latest versions
Comment #5
bojanz commentedAh, your customizations definitely broke it.
"Payment process" can only live on the "Payment" step, that's the entire point of the Payment step.
We shouldn't allow you to move it the "Completed" step, that's our fault.
And "Payment information" needs to be on a step before the "Payment" one.
Comment #6
bojanz commentedRepurposing issue to add validation for this.
Comment #7
remaye commentedGosh ! It made me pulling out my hair !
(this is my first store with Commerce 2 ...)
But finaly, glad this is ONLY that ! You finaly saved my day !
It make sense : Payment process in Payment step.
But what gave me bad direction is this issue : https://www.drupal.org/project/commerce/issues/2890727
"Payment Process" pane and "Payment Information" pane must NOT be at the same step !
So I moved "Payment Process" one step forward ... wrong !!
Isn't there any online information on what may be customized or not using the checkoutflow manager page...
and this definitly should be warned on the page itself ...
Thanks !
Comment #8
geek-merlinFTR: This error also happens when the completion step is empty, lacking "completion message"...