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

[3.7.41]: Trying to save a number field with a comma (,) in language "Deutsch (Schweiz)" leads to "is not a numeric value" exception #11164

Closed
benediktblank opened this issue May 9, 2022 · 2 comments

Comments

@benediktblank
Copy link

What happened?

Description

When the user account is setup with language "Deutsch (Schweiz)" and you try to save a number field with a number like "900,00" you get an exception "'900,00' is not a numeric value."

Steps to reproduce

  1. Create a new section with a number field.
    image

  2. Change the language of your backend user to "Deutsch (Schweiz)"
    image

  3. Try to save a new entry with 900,00 as value in the number field
    image
    You can see here already, that the draft auto save also already failed.

  4. You get an exception "Invalid Argument – yii\base\InvalidArgumentException" and "'900,00' is not a numeric value."
    image

Expected behavior

Either the error is displayed as a regular error with form/field validation or it's just saved without any issues. But a system breaking exception is not the desired outcome.

Actual behavior

The site breaks on save and a stack trace with error message is shown.

Craft CMS version

3.7.41

PHP version

8.1

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

brandonkelly added a commit that referenced this issue May 10, 2022
@brandonkelly
Copy link
Member

Thanks for reporting that! Fixed for the next release.

@brandonkelly
Copy link
Member

3.7.42 is out now with that fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants