Skip to content

Error "Microsoft.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated in table" during save #18817

@PeterKvayt

Description

@PeterKvayt

Which Umbraco version are you using?

15.3.0

Bug summary

If you use Microsoft.Data.SqlClient and Umbraco.TextBox property editor with max length limit over 512 chars, then you will not be able to save content.

Specifics

No response

Steps to reproduce

  1. Fresh umbraco install
  2. Create Umbraco.TextBox Data Type "My Text Box" with "Maximum allowed characters" more than 512, for instance with 1000 chars
  3. Create Doc type "Test" with property "My Text Box"
  4. Create Content of type "Test", fill its property with a value of more then 512 chars
  5. Try to save content

Expected result / actual result

Expected: you can save value with length that matches to Data Type configuration
Actual: you can't save value with a length of more than 512 chars.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions