bernhard Posted February 24, 2022 Share Posted February 24, 2022 No matter what I try I end up with an empty decimal field. I tried inputting 1.5 as well as 1,5. I also tried both settings for the input-type (text/number). Decimals is set to 2. I can only store integer numbers. Could you please try that so that I know if I should invest more time? Thx! 1 Link to comment Share on other sites More sharing options...
dotnetic Posted February 24, 2022 Share Posted February 24, 2022 Are you talking about the native Fieldtype or the module? Do you have both installed and selected which to use? Link to comment Share on other sites More sharing options...
bernhard Posted February 24, 2022 Author Share Posted February 24, 2022 I'm talking about the core fieldtype. I don't have the external decimal module installed. Link to comment Share on other sites More sharing options...
bernhard Posted March 14, 2022 Author Share Posted March 14, 2022 Anybody? Link to comment Share on other sites More sharing options...
Klenkes Posted March 14, 2022 Share Posted March 14, 2022 On 2/24/2022 at 3:14 PM, bernhard said: I tried inputting 1.5 as well as 1,5. I also tried both settings for the input-type (text/number). Decimals is set to 2. I can only store integer numbers. I just tried with PW 3.0.191 and kept everything default. Seems to work for me with a dot as a separator but not with a comma. Comma leaves the field empty afer save. 1 Link to comment Share on other sites More sharing options...
bernhard Posted March 21, 2022 Author Share Posted March 21, 2022 Somehow this does not work for me... I had to change the fieldtype to text which is less than ideal but as it's a private project I'll leave that for now... If anybody finds out something please let me know. I think it might also have something to do with locale settings. Dumping the value showed 1,23 but the value was not stored in the DB (sql error data truncated...). Weird. Link to comment Share on other sites More sharing options...
skeltern Posted May 15, 2022 Share Posted May 15, 2022 Same here. I found out that fieldtype decimal is not ready for different locale settings. English with '.' separator works perfect. But. If you have for example installed the German lang pack or default lang is German the separator is now ',' and not a dot. Defined by correct locale 'de_DE.UTF-8' in language > translate > LanguageSupport.module. As German backend user already filled decimal fields are just showed and saved as blank. Plus you can't add correct data as German editor. It gets always cutted to integer without all digits. I was so pleased about this decimal feature. Unfortunately state today it's only safe usable by single language sites with '.' as language decimal seperator. Only one language with different decimal seperator could result in serious trouble and lost of field values by editing pages... I think this module multilang problem is fixable. Fieldtype float works in same language contexts correct. Maybe with a bug report. 1 Link to comment Share on other sites More sharing options...
bernhard Posted May 15, 2022 Author Share Posted May 15, 2022 Thx @skeltern could you please report your findings here: https://github.com/processwire/processwire-issues/issues/1341 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now