Problem/Motivation
Values in decimal fields are not saved anymore. Existing values are getting lost after saving the form.
Steps to reproduce
Saving encrypted decimal field in drupal ^10.2
Data model changes
looks like the data type of the field has (silently) changed to "decimal". It was "string" before.
Proposed resolution
Checking on "decimal" in `getUnencryptedPlaceholderValue()`
Issue fork field_encrypt-3465540
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
pp.panatom commentedadded patch/merge request
Comment #5
ptmkenny commentedComment #6
ptmkenny commentedComment #7
ptmkenny commentedActually this was already fixed in the 3.2.x branch, so I'm closing this.
Comment #8
pp.panatom commentedLooks like the fix did not make it into 3.2.0?
I could not find a change record for this in core. But it used to work before 10.2.
For backwards compatibility, the code for handling the "string-decimal" is still in there. So decimals with string data type are still handled like before.
Comment #9
ptmkenny commented3.2.0 has some trouble handling decimal values still; please try the MR in #3488771: Encrypted decimal field value not saved on drupal version 10.2.x+ and see if that fixes your issue.