Sql Exception When Trying to Save Document Types or Attempting to Rebuild Database Cache V8.17
Hello,
I am in the process of upgrading a website from Umbraco v7.15 to Umbraco 10. I am having an issue where I am getting this Sql Exception when trying to save a document type or attempting to rebuild the database cache in Umbraco 8.17. Here is a snippet of the error message:
I know this is being caused with the cmsContentNu table, as that is the only table that uses the varbinary datatype in the dataRaw column, and both events that trigger it involve updating or altering the cache. All fields in the dataRaw column are null. I tried to rebuild the cache, however the same bug occurred, meaning somewhere in the process Umbraco is trying to convert an nvarchar field into binary incorrectly.
Earlier today I upgraded the database from Umbraco 8.5.5 to 8.17, so maybe there was some error during the migration that is causing this? Because this is an issue with how Umbraco publishes and saves data, I am not quite sure how I should proceed. Any help would be appreciated.
Further inquiry, made a couple of test projects and this seems to be populating the dataRaw column perfectly fine. I'm wondering if there is a way I can retroactively populate the column, because at the moment the project doesn't seem to be doing it by itself?
Sql Exception When Trying to Save Document Types or Attempting to Rebuild Database Cache V8.17
Hello,
I am in the process of upgrading a website from Umbraco v7.15 to Umbraco 10. I am having an issue where I am getting this Sql Exception when trying to save a document type or attempting to rebuild the database cache in Umbraco 8.17. Here is a snippet of the error message:
I know this is being caused with the cmsContentNu table, as that is the only table that uses the varbinary datatype in the dataRaw column, and both events that trigger it involve updating or altering the cache. All fields in the dataRaw column are null. I tried to rebuild the cache, however the same bug occurred, meaning somewhere in the process Umbraco is trying to convert an nvarchar field into binary incorrectly.
Earlier today I upgraded the database from Umbraco 8.5.5 to 8.17, so maybe there was some error during the migration that is causing this? Because this is an issue with how Umbraco publishes and saves data, I am not quite sure how I should proceed. Any help would be appreciated.
Further inquiry, made a couple of test projects and this seems to be populating the dataRaw column perfectly fine. I'm wondering if there is a way I can retroactively populate the column, because at the moment the project doesn't seem to be doing it by itself?
A colleague of mine had this issue with Umbraco 8.18.5 and it turns out what fixed it was installing SQL Server 2019 instead of SQL Server 2022.
Thank you Nicholas, I reran the migration using SQL Server 2019 and the new project is no longer throwing that error. Appreciate the assistance!
FYI - I ran across this issue this week and have put in a PR with details in case anyone else comes across this:
https://github.com/umbraco/Umbraco-CMS/pull/14173
is working on a reply...