Copied to clipboard

Flag this post as spam?

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


  • Aaron 58 posts 406 karma points MVP 2x c-trib
    Feb 01, 2024 @ 12:27
    Aaron
    0

    Umbraco Forms null exception when trying to view Entries after upgrade

    I have upgraded a site from Umbraco V8 to Umbraco V13

    I can view the forms on the frontend and edit them in the backend, all the workflows work correctly etc...

    However I cannot view the entries in the backoffice, none of the errors get logged. I'm suspecting a lack of a try catch in the source 😉

    What would be the best way to debug what it can't find?

    {
        "ExceptionMessage": "Object reference not set to an instance of an object.",
        "ExceptionType": "System.NullReferenceException, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e",
        "StackTrace": "   at Umbraco.Forms.Core.Models.Form.ApplyDictionaryTranslationsToPrevalueCaptions(IDictionaryHelper dictionaryHelper)\r\n   at Umbraco.Forms.Web.Editors.FormController.GetWithWorkflowsByGuid(Guid guid, Boolean applyDictionaryTranslations)\r\n   at lambda_method272(Closure, Object, Object[])\r\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)\r\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()\r\n--- End of stack trace from previous location ---\r\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)"
    }
    
  • Andy Boot 49 posts 191 karma points MVP
    Feb 01, 2024 @ 13:30
    Andy Boot
    0

    Hey Aaron,

    I don't specifically know how to resolve the error you're seeing, but perhaps the upgrade process didn't work as it should.

    A V9 to V13 upgrade I did recently may help with this though, but does mean having to go back to your original V8 database backup and start over. Essentially I had to do really minor incremental upgrades in order for Forms to be able to successfully run its migrations at the right time. This may be OTT, but found it worked for me. With each step, run the site for the new code/migrations to do their thing.

    1. Umbraco.Cms 9.0.1 > 9.5.4
    2. Umbraco.Forms 9.0.1 > 9.5.9
    3. Umbraco.Cms 9.5.4> 10.0.1, Umbraco.Forms 9.5.9 > 10.1.3. I also created and ran this batch file to delete the clutter left over from v9.

      @echo off

      REM Delete directories

      rmdir /s /q bin

      rmdir /s /q obj

      rmdir /s /q wwwroot\umbraco

      rmdir /s /q umbraco\PartialViewMacros

      rmdir /s /q umbraco\UmbracoBackOffice

      rmdir /s /q umbraco\UmbracoInstall

      rmdir /s /q umbraco\UmbracoWebsite

      rmdir /s /q umbraco\config\lang

      rmdir /s /q umbraco\data\temp

      rmdir /s /q App_Plugins\UmbracoForms

      REM Delete file

      del /f /q umbraco\config\appsettings-schema.json

      echo Deletion process completed.

      pause

    4. Umbraco.Cms 10.0.1 > 10.8.0

    5. Umbraco.Forms 10.1.3 > 10.5.2
    6. Umbraco.Cms 10.8.0 > 10.8.2 (for some reason!?, but could have negated this step by upgrading straight to this at step 4)
    7. Umbraco.Cms 10.8.2 > 13.1.0, Umbraco.Forms 10.5.2 > 13.0.1

    Each of these steps were done within separate branches to allow for a more transitional deployment. This deployment despite Cloud issues was successful. I wish there was a much easier way and after a lot of trial and error this is what I managed to come up with.

    Hope this helps!

  • Aaron 58 posts 406 karma points MVP 2x c-trib
    Feb 01, 2024 @ 16:44
    Aaron
    0

    I got Umbraco Forms to 10.5.2 and still able to see the Entries...

    After going to 13.0.1 it breaks again 🙈

  • Aaron 58 posts 406 karma points MVP 2x c-trib
    Feb 02, 2024 @ 12:29
    Aaron
    102

    Just an update to save that by Re-Saving the forms I can now view the entries.

    Feels like a bug between 10 and 13

  • Bishal Tim 26 posts 115 karma points c-trib
    Feb 17, 2024 @ 15:27
    Bishal Tim
    0

    im having same issues, with the model = null after i upgraded from v12 t0 v13 something here i dont understand

  • Aaron 58 posts 406 karma points MVP 2x c-trib
    Mar 12, 2024 @ 13:59
    Aaron
    0

    This should be fixed in a newer version, it was confirmed as a bug

    https://github.com/umbraco/Umbraco.Forms.Issues/issues/1157

Please Sign in or register to post replies

Write your reply to:

Draft