-
Couldn't load subscription status.
- Fork 2.8k
Trees: Restore backward compatibility for file system based tree controllers (closes #20602) #20608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trees: Restore backward compatibility for file system based tree controllers (closes #20602) #20608
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR restores backward compatibility for file system based tree controllers by fixing constructor hierarchies and removing dependencies on the now-obsolete StaticServiceProvider. The changes ensure that controllers extending from the base classes can continue using legacy constructors (e.g., accepting only FileSystems) until they can be updated to use the newer service-based approach.
Key changes:
- Introduced a
_useFileSystemTreeServiceflag inFileSystemTreeControllerBaseto support both legacy and service-based implementations - Removed
StaticServiceProviderdependencies across all tree controller classes - Standardized obsolescence messages and updated removal timeline to Umbraco 18/19
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| FileSystemTreeControllerBase.cs | Added flag-based routing to support both legacy FileSystem-based and new service-based implementations |
| StylesheetTreeControllerBase.cs | Removed StaticServiceProvider, updated constructor chain and obsolescence messages |
| ScriptTreeControllerBase.cs | Removed StaticServiceProvider, updated constructor chain and obsolescence messages |
| PartialViewTreeControllerBase.cs | Removed StaticServiceProvider, updated constructor chain and obsolescence messages |
| SiblingsStylesheetTreeController.cs | Removed StaticServiceProvider, simplified constructors |
| RootStylesheetTreeController.cs | Removed StaticServiceProvider, simplified constructors |
| ChildrenStylesheetTreeController.cs | Removed StaticServiceProvider, simplified constructors |
| AncestorsStylesheetTreeController.cs | Removed StaticServiceProvider, simplified constructors |
| SiblingsScriptTreeController.cs | Removed StaticServiceProvider, simplified constructors |
| RootScriptTreeController.cs | Removed StaticServiceProvider, simplified constructors |
| ChildrenScriptTreeController.cs | Removed StaticServiceProvider, simplified constructors |
| AncestorsScriptTreeController.cs | Removed StaticServiceProvider, simplified constructors |
| SiblingsPartialViewTreeController.cs | Removed StaticServiceProvider, simplified constructors |
| RootPartialViewTreeController.cs | Removed StaticServiceProvider, simplified constructors |
| ChildrenPartialViewTreeController.cs | Removed StaticServiceProvider, simplified constructors |
| AncestorsPartialViewTreeController.cs | Removed StaticServiceProvider, simplified constructors and unused imports |
…r-file-system-controllers
|
@AndyButland I can confirm that's back working correctly for Umbraco Forms 👍 |
src/Umbraco.Cms.Api.Management/Controllers/Tree/FileSystemTreeControllerBase.cs
Show resolved
Hide resolved
…sses to create null payloads (#20660) * Trees: Restore backward compatibility for file system based tree controllers (closes #20602) (#20608) * Restore backward compatibility for file system based tree controllers. * Aligned obsoletion messages. * Reverts nullability update on ConvertNotificationToRequestPayload.
Prerequisites
Addresses: #20602 and umbraco/Umbraco.Forms.Issues#1472
Description
This PR corrects and cleans up the constructor hierarchy for file system based tree controllers and fixes the backward compatibility regression discussed in the linked issues.
Testing
Firstly verify that the scripts, partial views and stylesheets trees work as before.
Then to check backward compatibility, modify some controllers - e.g.
RootScriptTreeControllerandChildrenScriptTreeControllerto keep only the constructor with this signatures:FileSystems fileSystems. Verify that the scripts tree works as before.@mattbrailsford / @rickbutterfield - ideally if you could take the build from this PR and verify that it resolves the issue for Forms please, that would be a good check too.