Terratype - String or binary data would be truncated
Hi all,
I have upgraded a site from 7.7.7 to 7.13.1. I'm trying to create a new datatype from Terratype but when I save it I get 'String or binary data would be truncated.'
The funny thing is that I already did this same upgrade with the same database and everything worked fine.
Anyways, I'm trying to debug Umbraco and it's failing in DataTypeService.cs:538. The data trying to be saved is this:
I have had this issue with other datatypes like large NestedContent but so far your the first to mentioned it with Terratype. I mean its possible if you have a small dataNvarchar column in dbo.cmsPropertyData, but you say your databases are identical
I will have a think, but for now, I feel this is more an issue with your Umbraco and not something specific to Terratype - yes it complaining the json is too large, but to be honest it looks pretty normal size to me.
Thank you for raising this, I will run some test with Version 7.13.1 specifically as I haven't tested the latest release yet.
I'm sure you know, but for anyone else stumbling on this thread, you can fix the json being truncated issue by running
ALTER TABLE dbo.cmsPropertyData
ALTER COLUMN dataNvarchar nvarchar(max)
I didn't know about the dataNvarchar fix, thanks for that. That hasn't fixed the issue though, still getting the same error. I think I'll try starting over :(
Jonathan, I found the issue. When you select a map style that is not the 'Standard', the package adds a bunch of styles in a 'styles' property in the json saved into the database. Those styles is what is causing the problem.
The limit is in the cmsDataTypePrevalues, being value of type nvarchar(2500)
Terratype - String or binary data would be truncated
Hi all,
I have upgraded a site from 7.7.7 to 7.13.1. I'm trying to create a new datatype from Terratype but when I save it I get 'String or binary data would be truncated.'
The funny thing is that I already did this same upgrade with the same database and everything worked fine.
Anyways, I'm trying to debug Umbraco and it's failing in
DataTypeService.cs:538
. The data trying to be saved is this:Is that too long to be saved? Maybe the upgrade of the DB wasn't done properly? Can I re-run it somehow?
UPDATE: I have compared both databases schemas (the one that works and the one that doesn't) and they are exactly the same.
Mario,
I have had this issue with other datatypes like large NestedContent but so far your the first to mentioned it with Terratype. I mean its possible if you have a small dataNvarchar column in dbo.cmsPropertyData, but you say your databases are identical
I will have a think, but for now, I feel this is more an issue with your Umbraco and not something specific to Terratype - yes it complaining the json is too large, but to be honest it looks pretty normal size to me.
Thank you for raising this, I will run some test with Version 7.13.1 specifically as I haven't tested the latest release yet.
I'm sure you know, but for anyone else stumbling on this thread, you can fix the json being truncated issue by running
(Copied from https://our.umbraco.com/forum/core/general/40332-Unable-to-publish-String-or-binary-data-would-be-truncated#comment-284473)
I will update, if I do find anything with Umbraco Version 7.13.1
Cheers
Jonathan
Hi Jonathan,
I didn't know about the dataNvarchar fix, thanks for that. That hasn't fixed the issue though, still getting the same error. I think I'll try starting over :(
No luck. I made a copy of the old DB, upgraded it to 7.13.1 and when tried to create a Terratype datatype it fails.
Jonathan, I found the issue. When you select a map style that is not the 'Standard', the package adds a bunch of styles in a 'styles' property in the json saved into the database. Those styles is what is causing the problem.
The limit is in the
cmsDataTypePrevalues
, being value of type nvarchar(2500)is working on a reply...