Manifests: Fix misnaming and mis-registering of the document validation manifest (closes #21128)#21139
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes two related issues introduced by copy-paste errors in the document validation repository setup:
- Corrects the media validation repository alias from
'Umb.Repository.Document.Validation'to'Umb.Repository.Media.Validation' - Registers the document validation manifests that were previously missing from the exports
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Umbraco.Web.UI.Client/src/packages/media/media/repository/validation/constants.ts |
Fixed repository alias constant to use "Media" instead of incorrectly referencing "Document" |
src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/manifests.ts |
Added missing import and registration of validation manifests to ensure document validation repository is properly registered |
The changes align with the patterns used in similar packages (media and members) and follow the established naming convention 'Umb.Repository.{EntityType}.{RepositoryType}' used throughout the codebase.
leekelleher
left a comment
There was a problem hiding this comment.
Thanks @AndyButland.
As far as I can tell, neither the UMB_DOCUMENT_VALIDATION_REPOSITORY_ALIAS or UMB_MEDIA_VALIDATION_REPOSITORY_ALIAS constants (nor their manifests) are being publicly exported. Whether this is an oversight or a work-in-progress, we'll need to clarify with the team, but this is why it wouldn't cause any duplicate extension registrations.
The code itself is being used, with a direct import of each validation repository, i.e. UmbDocumentValidationRepository in the document workspace context, and UmbMediaValidationRepository in the media workspace context, so this misnamed alias wasn't causing any issues at runtime. Good to have it corrected though. 🙏
* block context example * fix clone method * implement contextual variant id * use contextual variant id * ensure currentExposeOf uses elementType configuration * make hasExposeOf use ElementType configuration for variatId * Update src/Umbraco.Web.UI.Client/src/packages/rte/components/rte-base.element.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * rename to displayVariant * use variantid in this case * update readme * return false * remove unused imports * return undefined * append UmbWorkspaceViewElement interface * remove test * fallback to false * fallback to false * refactor what is not exposed. * Fix #20944: Updating UI Slider number properties to accept decimal values (#20945) * updating UI slider properties min, max, initial1, initial2 and step to accept decimal values * Changes based on Copilot suggestions * Used a smaller step value configuration. --------- Co-authored-by: Niels Lyngsø <nsl@umbraco.dk> Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com> Co-authored-by: engjlr <enl@umbraco.dk> * Manifests: Fix misnaming and mis-registering of the document validation manifest (closes #21128) (#21139) Fix misnaming and mis-registering of the document validation manifest. * Performance: Optimize memory footprint of document URL cache (closes #21055) (#21066) * Optimize memory footprint of document URL cache. * Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/Services/DocumentUrlServiceTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Used properties, added some further comments. * Fixed failing integration tests. * Ensure no edge case exists where the culture code to language Id map isn't up to date with the newly created languages. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Block List: Sort mode (#21060) * Block List: added sort-mode * Fix missing closing bracket * register sort mode toolbar element on start up --------- Co-authored-by: Mads Rasmussen <madsr@hey.com> # Conflicts: # src/Umbraco.Web.UI.Client/src/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.ts * Update nightly build to include 16 as 17 is now main (#21144) * Global search items missing Umbraco url segment (#20266) * Add /umbraco url Segament for searched mapped results to aviod 404 og navigation away from backoffice * Applied changes from code review. --------- Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com> Co-authored-by: Andy Butland <abutland73@gmail.com> * import --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jason Andrae <jasona@emergentsoftware.net> Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com> Co-authored-by: engjlr <enl@umbraco.dk> Co-authored-by: Andy Butland <abutland73@gmail.com> Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com> Co-authored-by: Mads Rasmussen <madsr@hey.com> Co-authored-by: Sven Geusens <sge@umbraco.dk> Co-authored-by: Lucas Bach Bisgaard <rammi@rammi.dk> Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
Prerequisites
Fixes: #21128
Description
This was clearly a copy/paste error, but was confused that it didn't log a warning at runtime, as normally that's what you see if you try to register a manifest with a duplicate alias.
The reason was that the document validation repository wasn't being registered.
So this PR fixes both issues.
Testing
Tricky, as I'm not sure what problem in reality this missed registration actually caused! Document validation appears to work correctly both before and after this change.