Shopify / ui-extensions

MIT License
269 stars 36 forks source link

[Checkout – Thank You] prevent_order_redirect no longer prevents order redirect. #2185

Open kpeatt opened 4 months ago

kpeatt commented 4 months ago

Describe the bug

Using the Shopify.dev listed query parameter of prevent_order_redirect=true on the checkout Thank You page no longer seems to stop a refresh or reload from redirecting through to the Order Status page.

This makes developing Thank You page extensions much more difficult. Especially since the Order Status page seems to delete history when it navigates.

Steps to reproduce the behavior:

  1. Go through a checkout and get to the Thank You page
  2. Place the ?prevent_order_redirect=true query parameter on the end of the URL
  3. Hit enter and wait for the page to reload
  4. Notice that you have navigated to the Order Status page

Expected behavior

I should stay on the Thank You page without redirecting.

edhgoose commented 4 months ago

@kpeatt - this is open as #2004 (since May) I'm afraid :(

We have the same problem :(

c-schober commented 3 months ago

I have the same problem here, with this bug it is really annoying to code something for the thank you page because hot-reload stops working again and again and than you need to recreate a new order all the time.

Maybe at least provide the localStorage item that prevent the redirect.

kpeatt commented 2 months ago

@edhgoose @c-schober I think this seems like it's fixed now. Can you confirm?

edhgoose commented 2 months ago

Yes, that seems to be working for me now.

c-schober commented 2 months ago

? uhm wait, the redirect prevention via query param works now and I am still on the thank you page after a hard refresh. BUT Extensions are not loading anymore after the refresh. Its a different behavior for you?

looks like token is invalid after a page reload

kpeatt commented 2 months ago

@c-schober Yeah I can confirm I see the same thing — when dev preview'ing it works fine on refresh but if I deploy then it fails on refresh.