Skip to content

Replace obsolete ITemplate.MasterTemplateAlias with LayoutTemplateAlias - #1003

Merged
KevinJump merged 1 commit into
v18/mainfrom
fix/master-template-alias-obsolete
Jul 23, 2026
Merged

Replace obsolete ITemplate.MasterTemplateAlias with LayoutTemplateAlias#1003
KevinJump merged 1 commit into
v18/mainfrom
fix/master-template-alias-obsolete

Conversation

@KevinJump

Copy link
Copy Markdown
Owner

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.Core source that MasterTemplateAlias is a pure rename — a default-interface-member / property that simply forwards to LayoutTemplateAlias with 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.csitem.MasterTemplateAliasitem.LayoutTemplateAlias (export, level calculation, parent lookup).
  • uSync.BackOffice/SyncHandlers/Handlers/TemplateHandler.cs_templateContentParserService.MasterTemplateAlias(...).LayoutTemplateAlias(...).
  • uSync.AutoTemplates/TemplateWatcher.cstemplate.MasterTemplateAliastemplate.LayoutTemplateAlias.

Notes for reviewers

  • No behavioural changes — build succeeds and the MasterTemplateAlias CS0618 warnings are gone.
  • Two unrelated CS0618 warnings remain (HtmlLocalLinkParser legacy methods in SyncLocalLinkProcessor.cs, and ISyncActionService.UnpackImportFromStream in uSyncManagementService.cs) — intentionally out of scope for this change.

🤖 Generated with Claude Code

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>
@KevinJump
KevinJump merged commit 57b86f8 into v18/main Jul 23, 2026
5 checks passed
@KevinJump
KevinJump deleted the fix/master-template-alias-obsolete branch July 23, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant