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

Bad validation of customer emails in BO #17809

Closed
kpodemski opened this issue Feb 24, 2020 · 4 comments
Closed

Bad validation of customer emails in BO #17809

kpodemski opened this issue Feb 24, 2020 · 4 comments

Comments

@kpodemski
Copy link
Contributor

@kpodemski kpodemski commented Feb 24, 2020

Describe the bug

When we have wrong object value in back-office, in some controllers, we can't tell exactly what's wrong, FormBuilder doesn't give us anything even tho we have try catch

Edit by Khouloud

Steps to reproduce the issue:

  1. Go to the FO => Create a new account with an email: test@test.com.777 => OK
  2. Go to the BO => Customers page => Edit the last customer-created
  3. See error

It is ok with PS1.7.5.2.
It is a regression.

With PS1.7.6.3 and PS1.7.6.0, when we try to create a customer with the email test@test.com.777
=> we have an error
image

With PS1.7.5.2 => it is successfully added.


To Reproduce
Steps to reproduce the behavior:

  1. go to ps_customers
  2. change e-mail address for some customer to for example some.email@gemail.com.77
  3. go to back-office
  4. try to edit this customer

check screenshot

Screenshots

image

We should have exact information what's wrong here, not a notice because of failure of FormBuilder.

Additional information
PrestaShop version: N/A
PHP version: N/A

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor

@khouloudbelguith khouloudbelguith commented Feb 25, 2020

Hi @kpodemski,

Thanks for your report.
I manage to reproduce the issue with PS1.7.6.0 and PS1.7.6.3.
Steps to reproduce the issue:

  1. Go to the FO => Create a new account with an email: test@test.com.777 => OK
  2. Go to the BO => Customers page => EDit the last customer-created
  3. See error
    image

It is ok with PS1.7.5.2.
It is a regression.

With PS1.7.6.3 and PS1.7.6.0, when we try to create a customer with the email test@test.com.777
=> we have an error
image

With PS1.7.5.2 => it is successfully added.

I’ll add this to the debug roadmap.

Thanks!

@matks

This comment has been minimized.

Copy link
Contributor

@matks matks commented Feb 28, 2020

edited, see below

@matks matks changed the title Wrong error messages in some modern back-office controllers Bad validation of customer emails in BO Feb 28, 2020
@matks

This comment has been minimized.

Copy link
Contributor

@matks matks commented Feb 28, 2020

PR #17846 was merged and fixed the error

@matks matks closed this Feb 28, 2020
PrestaShop 1.7.6 automation moved this from To be reviewed to Done Feb 28, 2020
@matks

This comment has been minimized.

Copy link
Contributor

@matks matks commented Feb 28, 2020

Hi @kpodemski !

I split this issue in 2 parts as there were 2 items to fix here: the error, and how to handle the error message. Let's continue exploring the 2nd part together in #17893 !

@marionf marionf added this to the 1.7.6.4 milestone Mar 2, 2020
@marionf marionf added Fixed and removed To Do labels Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.