openfoodfoundation / openfoodnetwork

Connect suppliers, distributors and consumers to trade local produce.
https://www.openfoodnetwork.org
GNU Affero General Public License v3.0
1.11k stars 723 forks source link

[Spree Upgrade] Checkout Fail #3682

Closed lin-d-hop closed 5 years ago

lin-d-hop commented 5 years ago

Description

I am currently unable to checkout on v2 French staging using: Hub - Tamar Valley Food hubs User - lynnedavis[at]gmail.com (new user, email address confirmed)

Checkout completed successfully as a guest.

I tried multiple baskets and multiple payment/shipping methods.

Time: From 11:33am if you want to check the logs (I don't have access)

Expected Behavior

Checkout completes successfully or I see an appropriate error message telling me why the checkout failed.

Actual Behaviour

On clicking 'checkout' the page attempts to complete the transaction then returns to the checkout page and does not appear to have completed. There is no error.

Steps to Reproduce

  1. Shop at Tamar Valley Food Hub. Make a basket
  2. Proceed to checkout.
  3. Checkout by logging in with existing user and when creating a user. Order completes successfully as guest.
  4. Checkout page does not complete and returns to the checkout page without error.
  5. Checking admin/orders confirms the orders have not completed

Animated Gif/Screenshot

failedorder

Severity

S1

Your Environment

Possible Fix

Might be related to the data transfer.

luisramos0 commented 5 years ago

Yeah, it's order R276643812 This is a known issue resolved by PR #3604 (currently in code review).

It's the mushrooms! :-D When we migrate to v2 all products get a default shipping category but we preserve the existing shipping categories, so in this case all products on that order get the "default" shipping category BUT product "Forest Fungi Mixed Selection" already had a shipping category "Refrigeration". So when you try to check out it splits the order into multiple shipments which breaks the database. PR #3604 ensures no order is ever split on checkout.

So, you can test this immediately:

This will confirm my explanation is correct and that #3604 will fix it.