patrickdemooij9 / SeoToolkit.Umbraco

SeoToolkit is a SEO package for Umbraco 9, 10, 11, 12 & 13. This package features most functionalities needed for your SEO needs like meta fields, sitemap, robots.txt and much more.
MIT License
38 stars 28 forks source link

Truncate error saving Meta description #179

Closed wvduffelen closed 1 year ago

wvduffelen commented 1 year ago

While saving a long Meta description (more than 255 characters) you get an error. The frontend mention the SEO description is saved but when you go back to the SEO-tab the content isn't there.

The error in the log Viewer is:

Microsoft.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated in table '{dbName}.dbo.SeoToolkitMetaFieldsValue', column 'UserValue'. Truncated value: '"{textValue} '.

The statement has been terminated.

When I add a shorter piece of text all goes well. I've checked this in Version 2.2.0 and 2.3.2

To replicate this error:

  1. Add long content to the meta description or open graph description
  2. Save the content (It will give feedback that the content is saved)
  3. Move away from the content (Discard changes when you go to another page)
  4. Open the page with the meta description you've just changed and see that is missing
  5. Check your Umbraco Log Viewer and you'll see the error I mentioned earlier
patrickdemooij9 commented 1 year ago

Hi @wvduffelen, Thank you for the report. That is indeed an annoying error :/ I'll give it a look and make sure it is fixed

patrickdemooij9 commented 1 year ago

Fixed by https://github.com/patrickdemooij9/SeoToolkit.Umbraco/pull/181. Will deploy a new version within the coming days. Thanks again for reporting!

wvduffelen commented 1 year ago

Thanks @patrickdemooij9! We'll just wait for the new version then!

patrickdemooij9 commented 1 year ago

I actually managed to push the update yesterday. So you should be able to update to the latest version now!