Umbraco v11 to v13 upgrade: Save & Publish failing on Azure, local shows "Under Maintenance" (Upgrade mode)

Hi everyone :waving_hand:

I’m facing issues after upgrading an Umbraco project from v11 to v13.

:wrench: Setup:

  • Umbraco v13 (upgraded from v11)

  • Hosted on Azure App Service (with Azure Front Door)

  • Local setup via Visual Studio (IIS Express)

  • Using same database backup locally


:red_exclamation_mark: Issues:

:red_circle: Live (Azure):

  • Site is working

  • But Save & Publish is failing intermittently

:red_circle: Local:

  • Same DB backup used

  • Site shows “Under Maintenance”

  • Logs show:
    Umbraco is in Upgrade mode


:magnifying_glass_tilted_left: Observations:

  • Schema comparison shows:

    • Missing custom tables (e.g., SkybrudRedirects)

    • Differences in core tables (cmsDictionary, cmsMember, etc.)

  • uSync is skipped due to upgrade mode

  • Old DB (pre-upgrade backup) works fine locally


:test_tube: What I tried:

  • Cleared /umbraco/Data/TEMP

  • Deleted:

    • umbracoServer

    • umbracoDomain

  • Verified connection string

  • Planning to reset migration state (umbracoKeyValue)


:red_question_mark: Questions:

  1. Could this be due to incomplete DB migration during upgrade?

  2. Why would DB work in Azure but fail locally (upgrade mode)?

  3. Could Save & Publish issue be related to distributed cache / load balancing after v13 upgrade?

  4. Best way to safely fix DB without data loss?

Any help would be really appreciated :folded_hands:

Hmm, remember I had some upgrade troubles, when I first upgraded to 13. It was due to content in our db that wasn’t compatible. This sounds like a db migration error to me.

What do the logs say?

hi,

before trying anything , make sure u make a copy of ur database

1 Like

Hi @Vijay-bheemala

When it fails to publish on Azure, what error message do you see in the logs?

It could be due to a bad migration, do you recall if you had any errors migrating from v11 to v13? Although I would expect if the migration had issues you would be seeing lots of errors.

Are you able to use uSync to export everything to a new database to see if that helps, or at least that may show any potential issues?

Justin

Thanks for the suggestion — I checked the logs and it does look like a database-related issue.

I’m seeing the following error:

  • SqlException: Error Number: 207 (Invalid column name)

  • Occurring inside Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.UserRepository

  • Triggered during /umbraco/backoffice/umbracoapi/authentication/postlogin

Hi @justin-nevitech ,

Thanks for your response!

When the issue occurs, the backoffice shows a 417 (Expectation Failed) on the PostSave API call.

After checking the logs more closely, I’m consistently seeing:

  • SqlException: Error Number: 207 (Invalid column name)

  • Occurring in Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.UserRepository

  • Triggered during /umbraco/backoffice/umbracoapi/authentication/postlogin

So this seems to point more towards a database/schema mismatch after the upgrade from v11 to v13, rather than an Azure-specific issue.

Regarding the upgrade:

  • We did encounter some content-related issues initially during migration, which we resolved at the time

  • There were no obvious blocking errors, but it’s possible some migrations didn’t fully apply

Interestingly:

  • The issue is intermittent in the backoffice (Save & Publish fails, then works after refresh)

  • Which might be due to certain queries failing depending on context/data being accessed

About uSync:

  • I attempted using uSync, but it was throwing errors in this project, so I haven’t yet completed a full export/import.

Please let me know if you’ve seen Error 207 specifically tied to any known missing columns in the UserRepository after upgrades.

Thanks again for your help!

Do you have a backup of the DB from before the upgrade?

Run a local copy - ensure the upgrade runs. If not try upping the command and connection timeout in the SQL Connection string. I’ve seen issues where some Umbraco migration scripts take too long, timeout and leave my db in a half upgraded state.

Try adding:
TrustServerCertificate=True;Connection Timeout=3600;Command Timeout=3600;

If you’ve not got a backup and / or the db can’t be rolled back then definitely take a backup now. Then starting a separate empty Umbraco project with the same latest version - and do a db scheme comparison and fix any issues. I’ve not had to do this in a long time - or it might be easier to look at the migration steps in the Umbraco code and just manually check / run these.

HTH

Steve

Hi @Vijay-bheemala

No, I’ve not seen that error myself. if I were you, I would start with a blank instance of Umbraco using the same packages and versions to get a brand new database and then do a schema compare to see the differences. You can then add missing columns and sync to the correct expected schema, although if there are lots of differences this may be problematic.

Once you are sure your schema is correct then you can see if that solves your issue or whether you need to take another route.

Justin

Same as @cheeseytoastie ! Sorry, messages crossed!

Double validation :slight_smile: