Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Christina 127 posts 390 karma points notactivated
    Oct 12, 2022 @ 06:05
    Christina
    0

    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

  • Rick Mason 10 posts 93 karma points
    Oct 12, 2022 @ 14:50
    Rick Mason
    100

    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.

  • Christina 127 posts 390 karma points notactivated
    Oct 17, 2022 @ 08:33
    Christina
    0

    Hi Rick Thanks a lot for helping me!

    /Christina

  • Anders Bjerner 487 posts 2995 karma points MVP 8x admin c-trib
    Oct 17, 2022 @ 11:26
    Anders Bjerner
    0

    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.

  • Christina 127 posts 390 karma points notactivated
    Oct 17, 2022 @ 14:07
    Christina
    0

    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

  • Anders Bjerner 487 posts 2995 karma points MVP 8x admin c-trib
    Oct 17, 2022 @ 14:11
    Anders Bjerner
    0

    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?

  • Christina 127 posts 390 karma points notactivated
    Oct 17, 2022 @ 14:21
    Christina
    0

    Hi yes SQL Server on Azure, hope it helps

  • Anders Bjerner 487 posts 2995 karma points MVP 8x admin c-trib
    Oct 17, 2022 @ 14:23
    Anders Bjerner
    0

    Thanks. That's also what we're using, but haven't experienced any issues. Nevertheless, I'll keep this in mind 👍

  • Virginia Rochester 5 posts 95 karma points
    Dec 02, 2022 @ 16:55
    Virginia Rochester
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft