Skip to content

Restore backoffice guard and content paging fixes dropped in v17->v18 merge - #1012

Merged
KevinJump merged 1 commit into
v18/mainfrom
fix/v18-content-handler-backoffice-gaps
Jul 28, 2026
Merged

Restore backoffice guard and content paging fixes dropped in v17->v18 merge#1012
KevinJump merged 1 commit into
v18/mainfrom
fix/v18-content-handler-backoffice-gaps

Conversation

@KevinJump

Copy link
Copy Markdown
Owner

Summary

An audit comparing v17/main against v18/main found that the squash-merge in #992 ("Merge v17/main into v18/main (2026-07-11)") successfully ported the large majority of v17's work (perf fixes, localization, blueprint path/parent resolution, image mapper split, clean-folder fix, all frontend changes) — but two fixes didn't survive the port:

  • uSyncBackOfficeComposer.cs: the IsUmbracoBackOfficeEnabled() guard (originally added in v17 Support front end only umbraco config.  #962) was present but commented out, so uSync now registers itself unconditionally — including on headless/delivery-only servers where it shouldn't run. Restored the guard.
  • ContentHandler.cs: during v18's refactor that centralized paged child-fetching into PublishableContentHandlerBase, ContentHandler lost the concrete-typed fetching it had in v17 (part of the perf work in v17 Perf: scope handler runtime-cache per operation (#5) + skip clean-up scan on flat+guid (#3) #990). The shared base now returns generic IEntitySlim for non-root items, which fails SyncHandlerRoot.ExportAllAsync's is TObject check and forces an extra contentService.GetById call per descendant item during export/import. MediaHandler was never affected since it already overrides GetChildItemsAsync directly with concrete IMediaContentHandler now mirrors that same pattern using _contentService.GetPagedChildren.

Everything else checked out as correctly ported; these are the only two gaps found.

Notes for reviewers

  • Used the explicit 8-parameter GetPagedChildren overload (matching v17's original call) rather than the shorter 4-arg form MediaHandler uses for IMediaService, because IContentService's equivalent short overload is marked [Obsolete] in Umbraco 18.0.2 and would otherwise produce a CS0618 warning.
  • No existing test exercises either code path directly (the composer guard or this specific paging call), so there's no new test coverage — these are behavioral/perf fixes, not bug fixes with a repro test.

Test plan

  • dotnet build uSync.slnx — 0 warnings, 0 errors
  • dotnet test uSync.Tests/uSync.Tests.csproj — 148/148 passing
  • Manual/staging verification that a backoffice-disabled site no longer registers uSync, and that exporting a nested content tree no longer issues extra per-item GetById calls

🤖 Generated with Claude Code

… merge

An audit of the v17/main -> v18/main squash-merge (#992) found two v17
fixes that didn't survive the port:

- uSyncBackOfficeComposer no longer gated uSync registration behind
  IsUmbracoBackOfficeEnabled(), so it would run on headless/delivery-only
  servers where it shouldn't (v17 #962).
- ContentHandler lost its concrete-typed paged child fetching when child
  fetching was centralized into PublishableContentHandlerBase, causing an
  extra contentService.GetById per descendant item during export/import
  (v17 #990). MediaHandler already avoids this by overriding
  GetChildItemsAsync directly; ContentHandler now mirrors that pattern.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@KevinJump
KevinJump merged commit ac7a497 into v18/main Jul 28, 2026
5 checks passed
@KevinJump
KevinJump deleted the fix/v18-content-handler-backoffice-gaps branch July 28, 2026 13:37
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