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

Snail when editing non-numeric characters on shipping method fees #8249

Closed
filipefurtad0 opened this issue Sep 27, 2021 · 3 comments · Fixed by #8312 or #9756
Closed

Snail when editing non-numeric characters on shipping method fees #8249

filipefurtad0 opened this issue Sep 27, 2021 · 3 comments · Fixed by #8312 or #9756
Assignees
Labels
bug-s4 The bug is annoying, but doesn't prevent from using the platform. Not so many users are impacted. good first issue hackathon Issues for upcoming hackathons

Comments

@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Sep 27, 2021

Description

In all things similar to #6942, but concerning shipping method fees.

Updating a shipping method can cause a server error when entering invalid values.

Expected Behavior

Invalid values should not be allowed or there should be a proper error message.

Actual Behaviour

It shows the snail.

Steps to Reproduce

  1. Edit a shipping method.
  2. Select the "per item" calculator.
  3. Enter '20.0' with the single quotes as fee amount.
  4. Click Update.

Animated Gif/Screenshot

Workaround

Severity

bug-s1: a critical feature is broken: checkout, payments, signup, login
bug-s2: a non-critical feature is broken, no workaround
bug-s3: a feature is broken but there is a workaround
bug-s4: it's annoying, but you can use it
bug-s5: we can live with it, only a few users impacted

https://github.com/openfoodfoundation/openfoodnetwork/wiki/Bug-severity

Your Environment

  • Version used: v4.1.2
  • Browser name and version: Firefox 92
  • Operating System and version (desktop or mobile): Ubuntu 20.04

Possible Fix

The only figures that should be allowed are:

  • numbers 0123456789
  • decimal point .
  • negative sign -

The error message should read:
Invalid input. Please use only numbers. For example: 10, 5.5, -20

See PR which introduces a fix for a similar issue, regarding transaction fees.

@drummer83
Copy link
Contributor

I am afraid we need to reopen this one because not all cases have been covered. There are still some snails.

Summary

Payment methods are covered in #7841 and have been fixed in #8204, only weight calculator is still triggering the snail.
Shipping methods are covered in #8249 and have been addressed in #8312, but incomplete - should be reopened.
Enterprise fees are covered in #8250 and have been addressed in #8308, but incomplete - should be reopened.

Things left to do in this issue

This is the current status of the calculators:

Steps to Reproduce
As an Admin:

  • edit a shipping method
  • on the calculator section choose one of the calculators marked with "snail" above
  • click update
  • type in an invalid value (e.g. some text or numbers with comma as separator)
  • click update --> snail

@drummer83 drummer83 reopened this Mar 23, 2022
@vsmay98
Copy link

vsmay98 commented Oct 9, 2022

Hello @filipefurtad0 @drummer83
Can I work on this issue?

@drummer83
Copy link
Contributor

Yes, of course, @vsmay98!
I have assigned it to you, please go ahead!

Looking forward to another contribution of yours! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s4 The bug is annoying, but doesn't prevent from using the platform. Not so many users are impacted. good first issue hackathon Issues for upcoming hackathons
Projects
3 participants