Closed HamDerAndrew closed 5 months ago
I was able to reproduce this and in my case the schema deployment didn't add the templates to the document types (although the UDA files had the correct values). After clearing the Deploy signatures and updating the schema, the document types had the correct templates assigned and the schema mismatch was fixed...
So for now, you can try clearing the signatures and updating the schema as a workaround. I'll have to further investigate why this happens in the first place, but having Umbraco:CMS:Runtime:Mode
set to Production
does prevent editing templates from the backoffice, so that might be related...
I can confirm it is happening on v13 as well
after some further testing, if
"Runtime": {
"Mode": "Production"
},
is removed from appsettings.Production.json
and then generate models from backoffice locally, then the content is transferred successfully
After some additional testing, I've found the root cause of this issue 🥳 When processing the template__*.uda
artifacts and the template doesn't exist yet, Deploy creates it via IFileService.SaveTemplate()
without initially setting the path to the template file. This caused it to update those same UDA files again on the environment that these schema changes were pushed to, resulting in the schema mismatch...
After correctly setting the path when the initial template is saved, this doesn't happen anymore. I haven't completely researched why this was only happening when the runtime mode was set to Production, but I guess the other modes do some additional processing that causes it to re-save the template with the correct path (and thereby automatically fixing the schema mismatch again)... Regardless of that, processing artifacts shouldn't update them to something different, so we've ensured this is fixed in 4.10.0, 10.4.0, 12.2.0 and 13.1.0 (all scheduled for release next Tuesday).
Version
Deploy version: 12.0.4 CMS: 12.2.0
Issue
When configuring your Modelsbuilder and Runtime mode locally on a fresh project (v12 in this case) and push to the Cloud environment, you will hit a schemamismatch with the following configuration:
appsettings.json
:appsettings.Production.json
:Issue was discovered when a customer reached out after following our docs: https://docs.umbraco.com/umbraco-cms/fundamentals/setup/server-setup/runtime-modes
Steps to reproduce
appsettings.Production.json
add the following Runtime and Modelsbuilder settings:appsettings.json
add the following Modelsbuilder setting:csproj
file:This item has been added to our backlog AB#35067