-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Encrypted Field Data Too Long #2036
Comments
For now, I'd recommend setting the However, what's a bit odd is that we already have this handling setup for when you use content encryption. |
Thanks. I may be missing it in an obvious spot but I cannot find the Ok, if you've already got the field conversion to text handled for content encryption then I'm happy to see this as a one-off random occurrence and I will just update them manually. |
It's more of a hidden setting at the moment, as it's been removed in Formie 3 for Craft 5 (it's no longer required), but it's not going anywhere for Formie 2/Craft 4. But yes, re-saving the form should re-save each field, and update the content column used. But it should've done that anyway when you saved the form with the content encryption. Unless this was a recent upgrade and the field hasn't been updated for some time. |
We were running v2.1.3 previously and only just updated to v2.1.26 yesterday, so that may explain it? I tried re-saving a form with an encrypted field and checked to see if it had automatically updated the table column but it was still a VARCHAR not a TEXT unfortunately. |
I don't believe there's been any changes since then, so you should be all good on that front. So that's odd behaviour. I've created a new form, and toggling on/off the "Enable Content Encryption" setting is changing the column in the content table from |
MariaDB 11.5.2 |
Right, so Phone fields are working now, but not Email fields. We have the very same handling setup for all fields, including an Email field, so I'm not sure what's going on there... |
All good. I'm happy to leave it and I can do it manually. It seems it's set up correctly in the codebase! |
Describe the bug
I've noticed this error occurring after updating to v2.1.26 - when submitting a phone number to an encrypted field, the encrypted data that's trying to save to the database is too long for the VARCHAR field at 255 characters. For now I've manually boosted this to 500 to avoid errors. I've done this for the encrypted email field too.
Is 255 the intended length for an encrypted field? Should we increase this to avoid the errors?
Happy to provide further details if needed.
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'field_phone_qdxwmyno' at row 1
Steps to reproduce
Form settings
Craft CMS version
4.11.4
Plugin version
2.1.26
Multi-site?
No
Additional context
No response
The text was updated successfully, but these errors were encountered: