Restore backoffice guard and content paging fixes dropped in v17->v18 merge - #1012
Merged
Merged
Conversation
… 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>
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.
Summary
An audit comparing
v17/mainagainstv18/mainfound 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: theIsUmbracoBackOfficeEnabled()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 intoPublishableContentHandlerBase,ContentHandlerlost 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 genericIEntitySlimfor non-root items, which failsSyncHandlerRoot.ExportAllAsync'sis TObjectcheck and forces an extracontentService.GetByIdcall per descendant item during export/import.MediaHandlerwas never affected since it already overridesGetChildItemsAsyncdirectly with concreteIMedia—ContentHandlernow mirrors that same pattern using_contentService.GetPagedChildren.Everything else checked out as correctly ported; these are the only two gaps found.
Notes for reviewers
GetPagedChildrenoverload (matching v17's original call) rather than the shorter 4-arg formMediaHandleruses forIMediaService, becauseIContentService's equivalent short overload is marked[Obsolete]in Umbraco 18.0.2 and would otherwise produce aCS0618warning.Test plan
dotnet build uSync.slnx— 0 warnings, 0 errorsdotnet test uSync.Tests/uSync.Tests.csproj— 148/148 passingGetByIdcalls🤖 Generated with Claude Code