Jump to content

FieldtypeDecimal: "Warning: 1265 Data truncated for column 'data' at row 1"


dynweb
 Share

Recommended Posts

When trying to save a field with FieldtypeDecimal, I get the following error:

Warning: 1265 Data truncated for column 'data' at row 1

And as usual, it seems to be an issue with decimal and thousands separator -- I use "," as decimal and "." as thousands separator.

The problem seems to be here: https://github.com/processwire/processwire/blob/44fcf13ea2d7f14a04eed54c29afcc79eb46ec45/wire/modules/Fieldtype/FieldtypeDecimal.module#L75

When the value is sanitized, PW only looks for ".", not for ",". As soon as I change the above line (and the next one) to ",", everything works. 

Can someone confirm? Or did I miss something?

Thank you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...