Openfoodnetwork: [Rails 4.2] Checkout issues

Created on 24 Nov 2020  路  5Comments  路  Source: openfoodfoundation/openfoodnetwork

Description


Checkout seems broken, through both registered-user path:
https://app.bugsnag.com/yaycode/openfoodnetwork-uk/errors/5fbd26c1476ed900173382fc?event_id=5fbd26c100651acc421b0000&i=sk&m=nw

And unregistered-user path:
https://app.bugsnag.com/yaycode/openfoodnetwork-uk/errors/5fbd2765e202130017ba007e?event_id=5fbd27650064e7cc38680000&i=sk&m=nw

Orders and payment methods work well in the backoffice.

Expected Behavior

Checkout page is accessible and works

Actual Behaviour

Checkout page is broken.

Steps to Reproduce




  1. Log-in.
  2. Visit a shop
  3. Place items in the cart
  4. Edit your cart or proceed directly to checkout -> Boom error 500

Reproducible as guest customer.

r42_checkout_bug

bug-s1 r4.2-regression

All 5 comments

I'm not positive that that commit will address it; I wasn't able to reproduce the error locally to confirm. But I think it's happening because we're doing localize_number on the amount attribute and so it overrides the getter/setter methods, making it not just a regular database column.

If that does in fact fix things, we might want to double check other places where that might be a problem; I looked through this comparison and didn't see any other places where we'd need to change it, but I could be wrong.

Awesome @andrewpbrett,
Your commit addresses this PR - /checkout page is now accessible through both logged- and guest- users. Checkout works as well.

As to:

we might want to double check other places where that might be a problem;

Something to keep in mind...

I'll close this issue for now :+1:

Reopening as a reminder to add unit specs as discussed here.

@filipefurtad0 can we open a separate issue for the specs? This s1 bugs does not exist anymore right?

Yes, thanks Rachel - created #6436
Closing here.

Was this page helpful?
0 / 5 - 0 ratings