Replace obsolete ITemplate.MasterTemplateAlias with LayoutTemplateAlias - #1003
Merged
Conversation
MasterTemplateAlias is obsolete in Umbraco 18 (CS0618, scheduled for removal in Umbraco 20) and is a pure rename forwarding to LayoutTemplateAlias, so this swaps all call sites over to clear the build warnings. No behavioural changes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces all uses of
ITemplate.MasterTemplateAlias/ITemplateContentParserService.MasterTemplateAlias(...)with their non-obsolete equivalent,LayoutTemplateAlias.Why
Both members are marked obsolete in Umbraco 18 (
CS0618), scheduled for removal in Umbraco 20, and were producing build warnings.How
Confirmed via the decompiled
Umbraco.Cms.Coresource thatMasterTemplateAliasis a pure rename — a default-interface-member / property that simply forwards toLayoutTemplateAliaswith identical type, nullability, and semantics. All uses here were read-only (getters / method calls), so the swap is a direct drop-in replacement.Files touched
uSync.Core/Serialization/Serializers/TemplateSerializer.cs—item.MasterTemplateAlias→item.LayoutTemplateAlias(export, level calculation, parent lookup).uSync.BackOffice/SyncHandlers/Handlers/TemplateHandler.cs—_templateContentParserService.MasterTemplateAlias(...)→.LayoutTemplateAlias(...).uSync.AutoTemplates/TemplateWatcher.cs—template.MasterTemplateAlias→template.LayoutTemplateAlias.Notes for reviewers
MasterTemplateAliasCS0618warnings are gone.CS0618warnings remain (HtmlLocalLinkParserlegacy methods inSyncLocalLinkProcessor.cs, andISyncActionService.UnpackImportFromStreaminuSyncManagementService.cs) — intentionally out of scope for this change.🤖 Generated with Claude Code