Skybrud redirects error umbraco 10 creating new redirect
Hi I have some error when trying to add a new redirect.
I get this error message. Im using Umbraco 10.2, Skybrud 4.0.4
I have migrated the db from Umbraco 8, and I can update a rederict but not create any new.
Many thanks Christina
Unable to insert redirect into the database.
---> Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'IsRegex', table 'my_db.dbo.SkybrudRedirects'; column does not allow nulls. INSERT fails.
Unable to insert redirect into the database.
SourceContext Skybrud.Umbraco.Redirects.Controllers.Api.RedirectsController
ActionId 3fb3ed5b-d5eb-4c62-82fc-a0da866a8ffc
ActionName Skybrud.Umbraco.Redirects.Controllers.Api.RedirectsController.AddRedirect (Skybrud.Umbraco.Redirects)
RequestId 8000137b-0000-ae00-b63f-84710c7967bb
RequestPath /umbraco/backoffice/Skybrud/Redirects/AddRedirect
Unfortunately there seems to be an issue with the migrations of Skybrud Redirects. Another user reported the same issue, but on a fresh installation of Skybrud Redirects:
In that case, as it was a fresh install, it worked deleting the table and the migration state to let the migrations run again. This is not viable in your case, so Rick is right that removing the IsRegex column fixes the issue (it's not used for anything).
Is it possible for you to share some more about your setup? I still haven't been able to reproduce this issue in my end, so it might be some edge case that a few people are experiencing, making it hard for me to reproduce.
The column is actually a left over from the Umbraco 7 version of the package, so a migration should already have removed the column back when you were running Umbraco 8.
Hi Anders It worked to remove the column from the db.
In my Umbraco 8.17 I have Skybrud.Umbraco.Redirects, Version=2.1.3.0,
Thanks again Rick and Anders.
I also had this issue migrating from an Umbraco 8 solution to Umbraco 9. I followed the instructions in this link below and it resolved the problem as the [SkybrudRedirects] table was regenerated without the [IsRegex] column. But this only worked as we didn't have any actual records in the table for this solution; for our other Umbraco 8 solution where we have lots of redirects we will have to delete this column I think.
https://github.com/skybrud/Skybrud.Umbraco.Redirects/issues/152
Skybrud redirects error umbraco 10 creating new redirect
Hi I have some error when trying to add a new redirect. I get this error message. Im using Umbraco 10.2, Skybrud 4.0.4 I have migrated the db from Umbraco 8, and I can update a rederict but not create any new.
Many thanks Christina
Unable to insert redirect into the database. SourceContext Skybrud.Umbraco.Redirects.Controllers.Api.RedirectsController ActionId 3fb3ed5b-d5eb-4c62-82fc-a0da866a8ffc ActionName Skybrud.Umbraco.Redirects.Controllers.Api.RedirectsController.AddRedirect (Skybrud.Umbraco.Redirects) RequestId 8000137b-0000-ae00-b63f-84710c7967bb RequestPath /umbraco/backoffice/Skybrud/Redirects/AddRedirect
If you do a clean install of Umbraco and Skybrud redirects, you'll see that the new version doesn't have an
IsRegex
column.It's left over from the v8 version, which is why the current code is not inserting anything into it and you get this error.
If your existing redirects are working you should be safe to delete this column (back up your database first) and then the error will go away.
Hi Rick Thanks a lot for helping me!
/Christina
Hi Christina
Unfortunately there seems to be an issue with the migrations of Skybrud Redirects. Another user reported the same issue, but on a fresh installation of Skybrud Redirects:
https://github.com/skybrud/Skybrud.Umbraco.Redirects/issues/152
In that case, as it was a fresh install, it worked deleting the table and the migration state to let the migrations run again. This is not viable in your case, so Rick is right that removing the
IsRegex
column fixes the issue (it's not used for anything).Is it possible for you to share some more about your setup? I still haven't been able to reproduce this issue in my end, so it might be some edge case that a few people are experiencing, making it hard for me to reproduce.
The column is actually a left over from the Umbraco 7 version of the package, so a migration should already have removed the column back when you were running Umbraco 8.
Hi Anders It worked to remove the column from the db. In my Umbraco 8.17 I have Skybrud.Umbraco.Redirects, Version=2.1.3.0, Thanks again Rick and Anders.
/Christina
Hi again,
Then the migration to delete the column should have ran back then, but somehow it didn't (or it failed).
What kind of database are you using? SQL Server?
Hi yes SQL Server on Azure, hope it helps
Thanks. That's also what we're using, but haven't experienced any issues. Nevertheless, I'll keep this in mind 👍
I also had this issue migrating from an Umbraco 8 solution to Umbraco 9. I followed the instructions in this link below and it resolved the problem as the [SkybrudRedirects] table was regenerated without the [IsRegex] column. But this only worked as we didn't have any actual records in the table for this solution; for our other Umbraco 8 solution where we have lots of redirects we will have to delete this column I think. https://github.com/skybrud/Skybrud.Umbraco.Redirects/issues/152
is working on a reply...