Copied to clipboard

Flag this post as spam?

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


  • Nick 20 posts 161 karma points notactivated
    Aug 17, 2022 @ 10:11
    Nick
    1

    Umbraco Forms: The migration plan does not support migrating from state.

    Has anyone come across this error before and know a fix? I've managed to whittle it down to Umbraco forms as when I remove the package the site boots successfully.

    An unhandled exception occurred while processing the request.
    BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.
    
    -> Umbraco.Cms.Core.Exceptions.BootFailedException: The migration plan does not support migrating from state "236973fb-2461-40d0-8e04-cb74e15481fa".
    
    -> System.InvalidOperationException: The migration plan does not support migrating from state "236973fb-2461-40d0-8e04-cb74e15481fa".
    at Umbraco.Cms.Infrastructure.Migrations.MigrationPlan.ThrowOnUnknownInitialState(String state)
    at Umbraco.Cms.Infrastructure.Migrations.MigrationPlanExecutor.Execute(MigrationPlan plan, String fromState)
    at Umbraco.Cms.Infrastructure.Migrations.Upgrade.Upgrader.Execute(IMigrationPlanExecutor migrationPlanExecutor, ICoreScopeProvider scopeProvider, IKeyValueService keyValueService)
    at Umbraco.Cms.Infrastructure.Install.PackageMigrationRunner.RunPackagePlans(IEnumerable`1 plansToRun)
    at Umbraco.Cms.Infrastructure.Install.UnattendedUpgrader.HandleAsync(RuntimeUnattendedUpgradeNotification notification, CancellationToken cancellationToken)
    
  • Danny Summers 5 posts 74 karma points
    Sep 12, 2022 @ 22:57
    Danny Summers
    0

    I've encountered the same problem. Did you end up finding a solution?

  • Ras 61 posts 324 karma points
    Sep 13, 2022 @ 08:27
    Ras
    101

    This usually happens for me when there's a mismatch between the Forms version and what version is saved in the DB. For example, having version 8.10 installed on your machine, then trying to use a DB that has version 8.12.

  • Murray Roke 502 posts 965 karma points c-trib
    Aug 07, 2023 @ 23:58
    Murray Roke
    0

    I have the same error, with this exact GUID. I think this occurred when upgrading between umbraco 9 and 10 The umbracoKeyValue table has a row with this data:

    key: Umbraco.Core.Upgrader.State+UmbracoForms
    value: 236973fb-2461-40d0-8e04-cb74e15481fa

    This project has these nuget versions:
    Umbraco.Cms: 10.4.0
    Umbraco.Forms: 10.2.2

    I tried upgrading Umbraco.Forms to 10.4.0 but this had no effect. I tried upgrading Umbraco.Cms to 10.6.1 which seems to fix the issue.

    Which leads me to believe a migration to migrate from 236973fb-2461-40d0-8e04-cb74e15481fa to the latest version was added in Umbraco.Cms somewhere between version 10.4.0 and 10.6.1

    However, I don't see that GUID anywhere in the source code, nor has the row in the DB changed, so... 'shrug'

  • Murray Roke 502 posts 965 karma points c-trib
    Aug 08, 2023 @ 22:19
    Murray Roke
    0

    This error has returned, I'm not sure why. I reverted the server in question to the release version that was previously running and now it has this error. unless there's some other DB field that is impacting this I don't understand how this error is triggered. Once triggered it seems to be stuck like this.

    NB: If I uninstall the Umbraco.Forms nuget package the error goes away.

  • Danny Summers 5 posts 74 karma points
    Aug 08, 2023 @ 22:51
    Danny Summers
    0

    It's going back a while for me, but I had some success with deleting this entry from the table or clearing out the GUID.

  • Murray Roke 502 posts 965 karma points c-trib
    Aug 08, 2023 @ 23:04
    Murray Roke
    0

    Setting it to blank gives the same error but with an empty string instead of the GUID.

    Resharper JetBrains decompiler found me this FormsMigrationPlan.cs in UmbracoForms 10.4.0

    protected override void DefinePlan() => this.From("{forms-init-state}")
    .To<InstallUmbracoForms>("7c7bc5ee-4c5b-42dc-9576-5ce6dfbddb8e")
    .To<AddRecordCultureColumn>("9f7e6fe6-bbd5-4b2b-8820-e9e0e36cc74c")
    .To<AddRecordWorkflowAudit>("1a8f0d04-9396-40a2-9423-39fc9ae3828f")
    .To<AddRecordWorkflowAuditExecutionStage>("6e692c5d-c670-4c34-af17-28d8dbf0dcd2")
    .To<NoopMigration>("5d84fee1-388c-4e5f-b98c-1e66947278f1");
    

    If I set my guid to the last one in the list, then the issue is resolved.

    To make sure I haven't missed any steps I temporarily reverted to Umbraco.Forms 10.2.2 and decompiling this also ends with the same step, so in this way you can work out which version ends at which guid and set yours correctly.

    Even if you have different from/to versions you could work it out this way.

Please Sign in or register to post replies

Write your reply to:

Draft