Compare commits

...
Author SHA1 Message Date
Sven Geusens 31f0ad4490 Revert "remove dotnet docfx global flag"
This reverts commit b6307fb359.
2026-01-13 16:56:59 +01:00
Sven Geusens b6307fb359 remove dotnet docfx global flag 2026-01-13 16:26:15 +01:00
Sven Geusens d37b5a2edb Use newer version of docfx by installing it as a dotnet tool instead of trough chocolatey 2026-01-13 14:22:00 +01:00
CopilotGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>nielslyngsoeNiels Lyngsø
dc459bca67 Add loading indicator to composition picker modal (#21086)
* Initial plan

* Add loading indicator to composition picker modal

Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>

* Document implementation and verify changes

Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>

* Address code review feedback - add accessibility and documentation

Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2026-01-13 13:14:40 +00:00
CopilotGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>nielslyngsoeMads Rasmussen
2a7478e7f4 Add loading indicator to data type picker flow modal (#21085)
* Initial plan

* Add loading indicator to data-type-picker-flow-modal

- Added _isLoading state variable
- Updated #getDataTypes() to set loading state with try-finally
- Added uui-loader component in #renderGrid() when loading
- Created test file with basic tests
- Fixed linter warnings

Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>

* Refactor: Replace inline styles with CSS class for loader

- Added .loader-container CSS class
- Removed inline styles from loader div
- Improves maintainability and follows best practices

Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>

* Improve tests and revert unrelated package-lock.json changes

- Test observable behavior (loader element) instead of private properties
- Added tests for loader visibility during loading states
- Added test for loader removal after loading completes
- Reverted unintended changes to Umbraco.Web.UI.Login/package-lock.json

Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>

* Refactor: Extract helper function in tests for cleaner code

- Added setLoadingState helper function to reduce code duplication
- Updated comments to reflect testing reactive state property
- Improved test readability and maintainability

Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>

* delete test file not testing anything

* show loading indicator in search field instead

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2026-01-13 13:05:59 +00:00
Niels LyngsøandGitHub 7b5a087ea5 Sidebar: Make scale grab-area smaller (#21228)
make split view scale area smaller
2026-01-13 13:57:54 +01:00
Andy ButlandandGitHub fefb9ca7aa Docs: Add branch naming convention details to CLAUDE.md (#21311)
* Update Claude memory files to provide further instruction on branch naming convention.

* Resolved points raised in code review.
2026-01-13 13:50:15 +01:00
Andy ButlandandGitHub 8f584e1a49 Tests: Fix intermittent failure in RecycleBinMediaProtectionHelperTests (#21332)
Use thread-safe collections in unit tests verifying functionality that uses parallel processing.
2026-01-13 10:20:35 +01:00
de02456cf8 E2E: QA Added acceptance tests for removing not-found items (#21371)
* Added tests for removing a not-found member picker

* Added tests for adding thumbnail to block

* Updated tests to match the test helper changes

* Refactor code to avoid duplication

* Added tests for removing a thumbnail from a block list/grid and refactor code

* Bumped version

* Bumped version and make tests run in the pipeline

* Update smokeTest command to use '@smoke' filter

---------

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2026-01-13 03:57:04 +00:00
f47a456515 Datatype Collection: Add fallback icon for datatype (#21269)
Add fallback icon for datatype

Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
2026-01-12 15:22:41 +01:00
engjlr 234907aedb Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS 2026-01-12 13:57:57 +01:00
CopilotJacob Overgaardcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>nielslyngsoeNiels LyngsøEngiber Lozadaengjlr
e3ff3ea3b9 Add loader and error handling to MFA modal (#21089)
* Initial plan

* Add loader and error handling to MFA modal

Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>

* Use localized error messages in MFA modal

Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>

* Refactor render logic into separate #renderContent method

Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>

* Revert src/Umbraco.Web.UI.Login/package-lock.json to main branch version

* Removed unused variable.

* Center the loader in MFA modal.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>
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>
2026-01-12 13:51:59 +01:00
Jacob OvergaardandClaude Sonnet 4.5 6050bdd40f Tree pickers: Implement noAccess property UI handling for user start nodes
- Add noAccess observable to document and media tree item contexts
- Add visual styling (grayed out, italic, cursor: not-allowed) for noAccess items in tree views
- Implement click prevention to block navigation when noAccess is true
- Update document and media picker input contexts with type-safe guards to prevent selection of noAccess items
- Create type guard utilities (isDocumentTreeItem, isMediaTreeItem) in separate utils files
- Items with noAccess are shown for navigation but cannot be selected or opened

This implements Task 63363 for Feature 63060 "Handle Start Nodes"

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 10:52:10 +01:00
8c23cb2ffd Block Grid: Resolve translation keys for group names (closes #20696) (#21362)
* Block Grid: Resolve translation keys for group names (closes #20696)

Add localization support for block group names in two locations:
- Block Grid area type permission combobox options
- Block catalogue modal group headers

Translation keys (e.g., #content_isPublished) used as group names
are now properly resolved instead of displaying the raw key.

* fix: moves group.name to mapper so search works

* fix: localizes block types in permissions element too

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-12 08:16:08 +00:00
faba205025 Collections: fix create action causing full page navigation (#21366)
Fix collection create action causing full page navigation instead of SPA routing

When a collection create action had an href, clicking it would trigger a full
browser navigation instead of using history.pushState for SPA routing. This was
caused by event.stopPropagation() being called before the early return when an
href was present, preventing the global ensureAnchorHistory() listener from
intercepting the click event.

The fix moves stopPropagation() to only execute when we're actually handling
the click via execute() (no href), allowing href-based navigation to bubble
to the window-level router listener for proper SPA navigation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-12 07:55:55 +01:00
Chris HoustonandGitHub 35c940364c Code Quality: Fix SA1500, SA1111 and SA1134 StyleCop warnings (#21369)
style: fix SA1500, SA1111, SA1134 StyleCop warnings

Fixed 194 StyleCop analyzer warnings across the codebase:

- SA1500: Move opening braces to their own line for multi-line statements (80 warnings)
- SA1111: Move closing parenthesis to same line as last parameter (50 warnings)
- SA1134: Place each attribute on its own line (64 warnings)

Also added XML documentation to any public APIs within the edited files.
2026-01-12 07:06:56 +01:00
Andy ButlandandGitHub f4ff1da043 Cache: Resolve thread safety issues in RepositoryCacheKeys and FullDataSetRepositoryCachePolicy (closes #21350) (#21355)
* Verify and resolve thread safety issues in RepositoryCacheKeys.

* Verify and resolve thread safety issues in FullDataSetRepositoryCachePolicy.
2026-01-12 06:58:13 +01:00
Niels Lyngsø 30aea87e28 correct comments 2026-01-09 21:33:01 +01:00
Niels LyngsøandGitHub 93229fd457 Mobile navigation: enable horizontal scroll on small screens (#21354)
* make backoffice minimum 800px wide

* minimum 920px
2026-01-09 14:19:47 +00:00
4f29bcd8d6 Fix #20769, added support for clip-text for UmbTableColumn (#20808)
Co-authored-by: Markus Johansson <markus@obviuse.se>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2026-01-09 13:26:42 +00:00
Niels LyngsøandGitHub 80dddc430c declare events in the global event interface map (#21349) 2026-01-09 13:12:41 +01:00
5a33a55f21 Block workspace: Enforce "AllowEditInvariantFromNonDefault" in variant blocks (closes #20633) (#20868)
* implement preventEditInvariantFromNonDefault for variant blocks

* remove unused

* refactor to enforce both document and block case from the document module

* remove implementation from doc workspace

* prevent editing invariant blocks from non default

* remove unused imports

* more explicit class names

* Refactor invariant edit guard rule creation

Extracted the creation of the invariant property edit guard rule into a reusable _createRule method in the controller base class. Updated block and document workspace controllers to use this method

* Refactor invariant edit rule logic into base controller

Moved the logic for observing properties and variant options and applying property guard rules into a new _observeAndApplyRule method in the base controller. Updated document block and workspace controllers to use this shared method, reducing code duplication and improving maintainability.

* Refactor invariant block edit check into helper methods

Extracted logic for checking invariant blocks and default language datasets into private async methods for better readability and maintainability. This refactor also corrects a context check typo and improves error handling.

* remove unused

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2026-01-09 09:51:05 +00:00
Mads RasmussenandGitHub 4276e903d7 Fix MSW typescript compile errors (#21319)
Refactor mock handlers to use typed request/response models
2026-01-09 08:50:16 +01:00
Andy ButlandandGitHub c5098f6df3 Multi-node picker: Validate content type when filter is configured but object type is not (closes #21338) (#21342)
Validate content type for multi-node picker when content types are defined but the object type is not (consider as being for a document).
2026-01-09 06:48:42 +01:00
aa0d636503 Entity Signs: rounded infobox top corners (#21341)
* correct styling for entity sign infobox top corners

* Used shorthand notation for padding.

---------

Co-authored-by: engjlr <enl@umbraco.dk>
2026-01-08 17:47:14 +00:00
aka James4uandGitHub a0e1908d2b fix(slider): enforce Maximum Value configuration (closes #21323) (#21339)
- Fixed inverted logic in #parseNumber method
- Changed Number.isFinite(num) ? undefined : num to Number.isFinite(num) ? num : undefined
- Previously, valid max values (e.g., 50) were being ignored and defaulting to 100
- Now correctly parses and uses the configured Maximum Value from data type settings

This ensures the Maximum Value setting in Slider datatype configuration
is properly enforced in the slider UI component.
2026-01-08 17:49:12 +01:00
3e57bb8128 Multi-link picker: Allow drag and drop into empty link picker (closes #21295) (#21325)
* fix(backoffice): allow drag and drop into empty link picker (closes #21295)

* refactor: use classMap to avoid empty class attribute

* refactor: use margin/padding trick for drop zone

* refactor: use CSS :has() selector instead of class

* also enable it for the Document input

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2026-01-08 15:24:42 +01:00
Dirk SeefeldandGitHub 0094c19780 Gitignore: Exclude acceptance test results from git (#21336)
* exclude acceptance test results from git

* reorder .gitignore
2026-01-08 13:01:03 +00:00
Andy ButlandandGitHub ed162feddf Server Events: Route document updated event when public access entries are modified (closes #21237) (#21310)
* Route server events for public access updates to indicate an update to the protected document.

* Add unit tests for all ServerEventSender notification handlers.

* Adds additional test recommended in code review.

* Addressed parameter name issue raised in code review.
2026-01-08 09:31:27 +01:00
Andreas ZerbstandGitHub 28e9607910 QA: E2E skip running sqlite acceptance test on nightly pipeline (#21331)
* Added skip condition for SQLite

* Added missing comma

* Added missing bracket

* Followed naming convention of parameters and added comments
2026-01-08 08:32:02 +01:00
Andy Butland b8d02067fe Merge branch 'release/17.1'
# Conflicts:
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2026-01-08 06:36:50 +01:00
3fd311bce8 E2E: QA added temporary waits to flaky acceptance (#21324)
* Added wait

* Additional fixes

* More fixes

---------

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
2026-01-08 03:13:54 +00:00
calmandGitHub 55b77157ec Backoffice entity actions: prevent entity actions dropdown from closing on first click (#21322)
fix(backoffice): prevent entity actions dropdown from closing on first open (closes #21320)
2026-01-07 17:04:12 +01:00
calmandAndreas Zerbst 2832436a0e Fix login validation messages not showing on submit (#21306)
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
(cherry picked from commit 4df4ee9c31)
2026-01-07 16:06:51 +01:00
906cbb50d8 Removed margin-top to address the loader icon shifting when entering … (#21301)
* Removed margin-top to address the loader icon shifting when entering text

* Space

---------

Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
2026-01-07 13:39:08 +00:00
Engiber LozadaandGitHub 93dff1a7a3 Entity Sings: Add localization keys to core entity signs. (#21302)
Improving localization support for core entity signs.
2026-01-07 14:26:31 +01:00
Niels Lyngsø 962db17628 lint fixes 2026-01-07 13:36:57 +01:00
4df4ee9c31 Fix login validation messages not showing on submit (#21306)
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2026-01-07 13:34:57 +01:00
Andreas ZerbstandGitHub c37fab8e4e E2E: QA Update acceptance to use new assertion pattern (#21297)
* Updated tests

* Updated culture

* Updated tests to use new assertion helpers

* Updated helpers

* Updated tests

* Updated tests

* Updated tests

* Bumped version

* Bumped version
2026-01-07 12:19:02 +00:00
bfc8053c11 Docker: Fix Docker template healthcheck, bind mounts, and HTTPS support (fixes #21278) (#21299)
* Fix test entrypoint

* Fix healthcheck.sh

* Ensure bind mounts gets created on host

* Fix bind mounts permission issues

* Generate self signed cert for dev

* Only generate cert for localhost

* Fixup docker compose file

* Update templates/UmbracoProject/entrypoint.sh

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update templates/UmbracoProject/Dockerfile

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix APP_UID runtime availability and optimize chown performance

- Export APP_UID as ENV so it's available at container runtime
  (ARG values from .NET base image are only available at build time)
- Only run chown -R when directory ownership differs from APP_UID
  to avoid slow recursive operations on large directories

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 12:56:58 +01:00
Andy ButlandandGitHub 462d63b055 Media: Fix files not deleted from disk when recycle bin protection is enabled (#21309)
* Fix bug where with recycle bin media protection on, the files on disk aren't deleted when the recycle bin is emptied.

* Fix display of media URL when in recycle bin and protection of trashed media is enabled.
2026-01-07 11:20:09 +00:00
50b2c8e03b Performance: Only flush ID/Key map in ContentCacheRefresher on content deletion (#21283)
* Clean-up of ContentCacheRefresher: resolved warnings and tidied up code and comments.

* Only flush the ID/Key map when content is deleted.

* Update src/Umbraco.Core/Cache/Refreshers/Implement/ContentCacheRefresher.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-07 12:14:36 +01:00
Andy Butland 2564d04941 Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS 2026-01-07 11:40:47 +01:00
Andy Butland ca3091e92e Fixed version of Microsoft.Extensions.Caching.Hybrid from incorrect one added in earlier commit. 2026-01-07 11:40:33 +01:00
Niels Lyngsø 036225a76d early return if manager is not present 2026-01-07 11:39:49 +01:00
307f3be505 User group: add description to user group (discussions/14986) (#21057)
* Adding description to user groups

* Add description to dto and test and umbraco plan

* update unit test for user group

* remove change from link picker

* edit icon ui for user group

* Fixed table exists check in migration.

* update description in table user groups

* update user group editor css

* update description default

* remove description column element

* add ignore large method

* remove codesence

* update user group descriptions default

* Added description to constructor of ReadOnlyUserGroup.

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2026-01-07 11:17:04 +01:00
Niels LyngsøandNiels Lyngsø b5fb17682c Hotfix: refactor of #21221 (#21293)
* refactor reload method to entity-detail

* refactor property value transfering when variation changes
2026-01-07 10:53:11 +01:00
Andy ButlandandNiels Lyngsø 83882a94bd Bumped version to 17.1.0.
# Conflicts:
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2026-01-07 10:53:11 +01:00
0c5156c7b3 Content: Fix property variation change breaking document save via Infinite Editing (closes #21195) (#21221)
When changing a property's variation setting (Shared/Invariant ↔ Variant) via Infinite Editing,
the document would fail to save with a 404 error.

This fix:
- Adds value migration fallback logic in UmbPropertyValuePresetVariantBuilderController
  to find values when culture/segment doesn't match exactly
- Overrides reload() in UmbContentDetailWorkspaceContextBase to process incoming data
  through _processIncomingData() for proper value transformation
- Detects property variation changes and triggers document reload to migrate values

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 10:52:52 +01:00
Kenn JacobsenandGitHub c859b2883d Members: Fix IMemberService.GetByKeysAsync() (#21312)
Fix IMemberService.GetByKeysAsync()
2026-01-07 07:54:20 +00:00
2aa49a3004 Performance: Avoid database lookup in UserIdKeyResolver for super-user (#21281)
* Avoid an unnecessary look-up for the super-user when resolving ID from key and vice versa.
Utilise an async database methods given the enclosing method is async.

* Applied suggestions from code review.

* Revered async amend (caused pipeline failures with integration tests).

* Apply suggestions from code review

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2026-01-07 08:37:59 +01:00
Andy ButlandandGitHub 54a1364a88 Dependencies: Update Microsoft packages to 10.0.1 and pin vulnerable transitive dependencies (closes #21122) (#21285)
* Added transitive dependency references to specific libraries where direct dependencies depend on vulnerable versions.

* Enable CentralPackageTransitivePinningEnabled.

* Update MS dependencies to 10.0.1 patch versions.

* Removed System.Text.Encodings.Web.

* Add TODOs for pinned dependency removal.
2026-01-07 06:58:12 +00:00
603788a039 Extension insights: Hide icon from table collection (#21268)
Hide icon from table collection

Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
2026-01-06 15:00:24 +00:00
dependabot[bot]andJacob Overgaard c8454684d0 Bump qs
Bumps the npm_and_yarn group with 1 update in the /src/Umbraco.Web.UI.Client directory: [qs](https://github.com/ljharb/qs).


Updates `qs` from 6.14.0 to 6.14.1
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.14.0...v6.14.1)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.14.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-06 15:46:22 +01:00
Niels LyngsøandGitHub 21736159af Hotfix: refactor of #21221 (#21293)
* refactor reload method to entity-detail

* refactor property value transfering when variation changes
2026-01-06 15:45:33 +01:00
848df27482 Auto close focus leave (#20700)
* working on a auto closing ... modal when focus leaves

* remove appsetting for local development

* rewrites the focus function to check if the shadow dom exsits before trying to set focus

* Fix JSON formatting in appsettings.Development.template.json

* Simplify focus logic in entity action list

Refactored the focus method to directly focus the first menu item after it is rendered, removing unnecessary nested updateComplete checks and focusing logic for the label button.

* Remove unused 'nothing' import and minor formatting

* Call ext.component?.focus() instead of chaining updateComplete promises.

* Update entity-action-list.element.ts

---------

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>
2026-01-06 13:43:25 +00:00
6ed4075eeb Added localize label for entity sign bundle (#21252)
* Added localize for entity sign bundle label

* Updated how entity-sign-bundle.element handles label localize

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Removed unnecessary conditional check for localize entity-sign-bundle

* Moved localize into render method for entity-sign-bundle.element

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
2026-01-06 14:00:48 +01:00
0da1fa116e Markdown Conversion: Remove hard dependency on deprecated library and replace with IMarkdownToHtmlConverter abstraction (closes #21238 and #19500) (#21242)
* Add IMarkdownToHtmlConverter abstraction with Markdig and HeyRed implementations

- Add IMarkdownToHtmlConverter interface in Umbraco.Core.Strings
- Add MarkdigMarkdownToHtmlConverter using the Markdig library (new default)
- Add HeyRedMarkdownToHtmlConverter using HeyRed.MarkdownSharp (deprecated, for backwards compatibility)
- Update HealthChecks.MarkdownToHtmlConverter to use the new abstraction
- Update MarkdownEditorValueConverter to use the new abstraction
- Add unit tests for both markdown converter implementations
- Add unit tests for HealthChecks.MarkdownToHtmlConverter syntax highlighting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from code review.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-06 08:43:47 +01:00
Andy Butland 4e2fdfc269 Bumped version to 17.1.0. 2026-01-06 07:52:42 +01:00
Nhu DinhandGitHub 51cec0e41f E2E: QA Updated acceptance tests for max length validation message (#21230)
* Updated max length validation message

* Fixed format
2026-01-05 17:26:14 +07:00
b563561d2a Management API: Scope notification headers and add document inclusion abstraction (closes #21231, #21241 and #21240) (#21244)
* Adds a check to ensure notifications are only added to relevant CMS management API endpoints.

* Add null check for tagging actions to handle null management API GroupName.

* Provide abstraction for the DocInclusionPredicate when configuring SwaggerGenOptions.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-05 11:16:41 +01:00
c003751466 Content Type Cache: Clear ContentTypeCommonRepository cache when data types change (closes #21261) (#21289)
Cache: Clear ContentTypeCommonRepository cache when data types change

When a data type's EditorAlias is changed (e.g., BlockList to SingleBlock), the ContentTypeCommonRepository 5-minute cache was not being cleared. This caused content types to return stale PropertyEditorAlias values until server restart, leading to validation using the wrong property editor validators.

The fix adds IContentTypeCommonRepository as a dependency to DataTypeCacheRefresher and calls ClearCache() in RefreshInternal(), matching the pattern already used in ContentTypeCacheRefresher and TemplateCacheRefresher.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 18:02:36 +09:00
caa01b5122 Code quality: resolve build warnings CS0169 and CS0649 (#21258)
* Fixed the 22 warnings.

Also updated the XML documentation where required.

* Updating XML docs.

* Noted version in obsoletion message.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2026-01-04 11:52:25 +00:00
Chris HoustonandGitHub b14a7ca3e3 Code Quality: Fix ASP0019 warnings by replacing Headers.Add with Headers.Append (#21260)
Use Append for response headers

- Replaces Add with Append when adding response headers to conform to IHeaderDictionary usage.
- Applies across unauthorized handling, redirects, and custom header signaling.
- Updates tests to use Append consistently.
- Removes ASP0019 from warnings in project configs to reflect new approach.
2025-12-31 12:00:15 +01:00
Chris HoustonandGitHub 0803ab8bda Build Warnings: Suppress ASPDEPR003 warnings in DevelopmentMode.Backoffice (#21259)
Silences deprecation warning in dev mode

Silences deprecated runtime-compile warning in dev mode
Keeps development-time runtime compilation enabled for in-memory dev setup
Relates to ASPDEPR003
2025-12-31 11:29:55 +01:00
Nhu DinhandGitHub ac86d97c4e E2E: QA Update acceptance tests to use refactored UI helpers (#21266)
* Bumped version

* Updated tests to match new changes

* Bumped version

* Bumped version

* Use isSuccessNotificationVisible instead of doesSuccessNotificationHaveText

* Updated tests to avoid flaky tests

* Bumped version of test helper

* Bumped version of test helper

* Bumped version

* Bumped version

* Bumped version

* Update waits to avoid hardcoded values
2025-12-31 14:47:53 +07:00
cbde6af9c0 Code quality: Fixing XML docs issues CS1570, CS1572, CS1723, & CS1575 (#21256)
* FIxing XML docs issues CS1570, CS1572, CS1723, & CS1575

* Update ContentImagingSettings.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update ITypedSingleBlockListProcessor.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update PublishedContentExtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-26 10:57:16 +01:00
Chris HoustonandGitHub da8a532080 Code quality: Remove obsolete serialization constructors (fixing SYSLIB0051 warnings) (#21235)
* fix(SYSLIB0051): Remove obsolete serialization constructors

Removes obsolete formatter-based serialization constructors from exception
classes to resolve SYSLIB0051 warnings. This is NOT a breaking change as:

- Binary serialization is deprecated in modern .NET
- No BinaryFormatter usage exists in the codebase
- Microsoft recommends removing these obsolete constructors

Affected files:
- AuthorizationException.cs
- BootFailedException.cs
- ConfigurationException.cs
- PanicException.cs
- UnattendedInstallException.cs
- RetryLimitExceededException.cs
- IncompleteMigrationExpressionException.cs
- HttpUmbracoFormRouteStringException.cs
- ModelBindingException.cs

Also removes SYSLIB0051 from WarningsNotAsErrors in project files.

* fix(SYSLIB0051): Mark obsolete serialization constructors for removal in v19
2025-12-24 15:46:29 +01:00
cf7623e5bd Code quality: Resolve CS0108 compiler warnings by adding explicit 'new' keyword (#21236)
* fix: Resolve CS0108 compiler warnings by adding explicit 'new' keyword

fix: Resolve CS0108 compiler warnings by adding explicit 'new' keyword to hiding members

- Add 'new' modifier to Empty properties in BlockGridModel, BlockListModel, RichTextBlockModel
- Add 'new' modifier to DeepCloneWithResetIdentities in IContentType, IMediaType
- Add 'new' modifier to Save/GetById methods in IContentService, IMediaService, IMemberService
- Add 'new' modifier to EFCore interface members (IAmbientEFCoreScopeStack, IEFCoreScope)
- Add 'new' modifier to ExternalLoginSignInResult.NotAllowed and CreateMediaTypeRequestModel.Collection
- Improve XML documentation for edited public members

Note: CS0114 warnings (virtual/override) were intentionally not fixed as they may be breaking changes. Will add more details to the PR.

* fix: Resolve CS0108 compiler warnings by adding explicit 'new' keyword

fix: Resolve CS0108 compiler warnings by adding explicit 'new' keyword to hiding members

- Add 'new' modifier to Empty properties in BlockGridModel, BlockListModel, RichTextBlockModel
- Add 'new' modifier to DeepCloneWithResetIdentities in IContentType, IMediaType
- Add 'new' modifier to Save/GetById methods in IContentService, IMediaService, IMemberService
- Add 'new' modifier to EFCore interface members (IAmbientEFCoreScopeStack, IEFCoreScope)
- Add 'new' modifier to ExternalLoginSignInResult.NotAllowed and CreateMediaTypeRequestModel.Collection
- Improve XML documentation for edited public members

Note: CS0114 warnings (virtual/override) were intentionally not fixed as they may be breaking changes. Will add more details to the PR.

* Modifying the PR based on feedback from Andy.

Files Modified (Removed Duplicate Members)
src/Umbraco.Cms.Api.Management/ViewModels/MediaType/CreateMediaTypeRequestModel.cs
Removed duplicate Collection property (already defined in base class ContentTypeModelBase)
src/Umbraco.Core/Services/IContentService.cs
Removed duplicate GetById(Guid key) method (already in IContentServiceBase<IContent>)
Removed duplicate Save(IEnumerable<IContent> contents, ...) method (already in IContentServiceBase<IContent>)
src/Umbraco.Core/Services/IMediaService.cs
Removed duplicate GetById(Guid key) method (already in IContentServiceBase<IMedia>)
Removed duplicate Save(IEnumerable<IMedia> medias, ...) method (already in IContentServiceBase<IMedia>)
src/Umbraco.Core/Services/IMemberService.cs
Removed duplicate Save(IEnumerable<IMember> members, ...) method (already in IContentServiceBase<IMember>)
Files Left Unchanged (Keeping new keyword)
The following files were correctly fixed with the new keyword because they intentionally hide base members to return more specific types:
BlockGridModel.cs, BlockListModel.cs, RichTextBlockModel.cs - Empty returns specific type
IContentType.cs, IMediaType.cs - DeepCloneWithResetIdentities returns specific interface
ExternalLoginSignInResult.cs - NotAllowed returns ExternalLoginSignInResult instead of SignInResult
IEFCoreScope.cs, IAmbientEfCoreScopeStack.cs - re-declarations for documentation purposes

* fix: Resolve CS0108 compiler warnings by adding explicit 'new' keyword

fix: Resolve CS0108 compiler warnings by adding explicit 'new' keyword to hiding members

- Add 'new' modifier to Empty properties in BlockGridModel, BlockListModel, RichTextBlockModel
- Add 'new' modifier to DeepCloneWithResetIdentities in IContentType, IMediaType
- Add 'new' modifier to Save/GetById methods in IContentService, IMediaService, IMemberService
- Add 'new' modifier to EFCore interface members (IAmbientEFCoreScopeStack, IEFCoreScope)
- Add 'new' modifier to ExternalLoginSignInResult.NotAllowed and CreateMediaTypeRequestModel.Collection
- Improve XML documentation for edited public members

Note: CS0114 warnings (virtual/override) were intentionally not fixed as they may be breaking changes. Will add more details to the PR.

* Modifying the PR based on feedback from Andy.

Files Modified (Removed Duplicate Members)
src/Umbraco.Cms.Api.Management/ViewModels/MediaType/CreateMediaTypeRequestModel.cs
Removed duplicate Collection property (already defined in base class ContentTypeModelBase)
src/Umbraco.Core/Services/IContentService.cs
Removed duplicate GetById(Guid key) method (already in IContentServiceBase<IContent>)
Removed duplicate Save(IEnumerable<IContent> contents, ...) method (already in IContentServiceBase<IContent>)
src/Umbraco.Core/Services/IMediaService.cs
Removed duplicate GetById(Guid key) method (already in IContentServiceBase<IMedia>)
Removed duplicate Save(IEnumerable<IMedia> medias, ...) method (already in IContentServiceBase<IMedia>)
src/Umbraco.Core/Services/IMemberService.cs
Removed duplicate Save(IEnumerable<IMember> members, ...) method (already in IContentServiceBase<IMember>)
Files Left Unchanged (Keeping new keyword)
The following files were correctly fixed with the new keyword because they intentionally hide base members to return more specific types:
BlockGridModel.cs, BlockListModel.cs, RichTextBlockModel.cs - Empty returns specific type
IContentType.cs, IMediaType.cs - DeepCloneWithResetIdentities returns specific interface
ExternalLoginSignInResult.cs - NotAllowed returns ExternalLoginSignInResult instead of SignInResult
IEFCoreScope.cs, IAmbientEfCoreScopeStack.cs - re-declarations for documentation purposes

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Reverted the one of the changes and updated some XML doc tags.

* Should have committed these files.

Corrected a name space in the test files.

* Remove warning on missing access modifiers on interface members.

* Revert breaking namespace change.

* Fixed build errors following namespace reversion.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-24 13:11:03 +01:00
8a47072b9b Code quality: Replace obsolete APIs in Umbraco.TestData controllers (#21251)
* fix(tests): Replace obsolete APIs in Umbraco.TestData controllers

Replaced deprecated synchronous service methods with their modern async
equivalents in the TestData controllers to eliminate CS0618 warnings.

Changes:
- LoadTestController: Replace IFileService with ITemplateService,
  use IDataTypeService.GetAsync(Guid) instead of GetDataType(int),
  use IContentTypeService.CreateAsync() instead of Save()
- SegmentTestController: Use IContentTypeService.UpdateAsync()
  instead of Save()
- UmbracoTestDataController: Use IContentTypeService.CreateAsync()
  and UpdateAsync() instead of Save()

Also adds comprehensive XML documentation to all three controllers
including class summaries, constructor parameters, and method
documentation.

The controllers now use:
- Constants.DataTypes.Guids.TextstringGuid instead of magic int -88
- Constants.Security.SuperUserKey for async service operations
- Task<IActionResult> return types where async operations are used

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Further amends from code review.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-24 09:36:45 +00:00
Chris HoustonandGitHub 6726e6b208 Benchmarks: Fix obsolete BenchmarkDotNet API warnings by replacing depreciated function calls. (#21250)
* fix(benchmarks): resolve obsolete BenchmarkDotNet API warnings

Update BenchmarkDotNet configuration to use current API methods:

- Replace deprecated `ManualConfig.Add()` with `AddDiagnoser()` for memory diagnostics
- Replace deprecated `ConfigExtensions.With()` with `AddJob()` for job configuration
- Initialize `_totalItemCount` field to suppress CS0649 warning

These changes resolve 4 compiler warnings (CS0618, CS0649) in the benchmark project
without any functional changes.

* Removing the benchmark artifacts and adding the folder to gitignore
2025-12-24 10:25:35 +01:00
27209c2295 Code documentation: Added XML Docs to the files in the Umbraco.Cms.Imaging.ImageSharp2 project (#21249)
* Added XML Docs to the files in Umbraco.Cms.Imaging.ImageSharp2

This commit fixes the missing XML documentation with the Umbraco.Cms.Imaging.ImageSharp2 project.

Now this project should have no build warnings.

* Update src/Umbraco.Cms.Imaging.ImageSharp2/UmbracoBuilderExtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-24 09:34:56 +01:00
Chris HoustonandGitHub 6c40dc0d25 Added XML Docs to the files in the Umbraco.Cms.Imaging.ImageSharp (#21248)
The only build errors in this project were missing XML documentation, so I've now updated each of the files.
2025-12-24 09:33:27 +01:00
Chris HoustonandGitHub fe06cd28bf Code Quality: Fixing the build warnings in the Umbraco.Tests.Common project (#21245)
* Fixing the build warnings in the Umbraco.Tests.Common Project

The main warning was about the file name not matching the class, this was because an interface was being defined first within the class file.

This should either be moved into its own file, or to the bottom of the file to fix this warning. Rather than creating a new file, I've moved the interface to the bottom, but if you'd prefer a new file, just let me know :)

Also removed the TODO in the project file and the WarningsNotAsErrors as they have all been resolved.

* Moved the interface into it's own file.

* Removed the interfaces folder.
2025-12-23 18:11:51 +00:00
Chris HoustonandGitHub 4083ceb63a fix: Update RenderNoContentController to use non-obsolete constructor (#21246)
- Replace obsolete constructor call that used IUmbracoContextAccessor
- Use new constructor with IDocumentUrlService instead
- Add using for Umbraco.Cms.Core.Services namespace
- Remove unused Umbraco.Cms.Core.Web namespace

The obsolete constructor was scheduled for removal in Umbraco 18.
This is an internal change only - ControllersAsServicesComposer is not
shipped with Umbraco.Templates package.
2025-12-23 16:07:52 +00:00
69e7151079 Media Picker: Always include folders when searching for media (#21216)
* Always include folders when searching for media. Closes #21149

* Address copilot comments

* Resolved breaking changes.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-12-23 10:16:32 +00:00
Chris HoustonandGitHub 74c71f977c Fixes all SA1117 warnings and adding more XML documentation comments. (#21224)
This commit fixes around 1,000 build warnings related to SA1117, this warning is related to ensuring each parameter passed into a function is on a new line OR all on one line.

I have also added XML code comments to any public function within these files and fixed some that had invalid / old comments.
2025-12-23 10:34:40 +01:00
18fafaa0f3 Content: Fix property variation change breaking document save via Infinite Editing (closes #21195) (#21221)
When changing a property's variation setting (Shared/Invariant ↔ Variant) via Infinite Editing,
the document would fail to save with a 404 error.

This fix:
- Adds value migration fallback logic in UmbPropertyValuePresetVariantBuilderController
  to find values when culture/segment doesn't match exactly
- Overrides reload() in UmbContentDetailWorkspaceContextBase to process incoming data
  through _processIncomingData() for proper value transformation
- Detects property variation changes and triggers document reload to migrate values

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 16:34:47 +01:00
Niels Lyngsø f12da6e4cb Merge branch 'v16/dev' 2025-12-22 13:25:22 +01:00
Niels Lyngsø c19cc92690 optical space adjustment for content-type-designer property 2025-12-22 13:25:06 +01:00
Andy ButlandandZeegaan 2d35e32920 HybridCache: Clear published content cache on content type change (#21225)
* Clear the cacje level published content cache on content type change.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 396ebdd48d)
2025-12-22 15:45:06 +09:00
396ebdd48d HybridCache: Clear published content cache on content type change (#21225)
* Clear the cacje level published content cache on content type change.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-22 15:14:21 +09:00
e91c2e659d User Avatar: The "Change Photo" button is not working in all cases (#21206)
fix(user): fix avatar change and remove functionality

- Fix "Change photo" button not working on subsequent clicks by using
  { once: true } on the event listener and resetting the input value
- Fix avatar not disappearing after removal by clearing _imgSrc when
  imgUrls is set to empty array

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 09:55:25 +01:00
Andy Butland 5bb265b3a4 Merge branch 'release/17.1' 2025-12-20 09:38:59 +01:00
72e85ecaf6 TextBox: Fix max length validation message showing wrong exceeded count (#21219)
The validation message was showing the total character count instead of how
many characters exceeded the limit. For example, with max=4 and input="12345",
it showed "5 too many" instead of "1 too many".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 09:21:26 +01:00
296102c0bd Content Type Workspace: Fix navigation blocked after save (#21218)
Content Type Workspace: Sync current data after save to prevent navigation blocking

After saving a content type, only `_data.setPersisted()` was called without
`_data.setCurrent()`. An observer kept `current` in sync with the structure's
ownerContentType, but timing mismatches caused `persisted` and `current` to
differ, triggering false "unsaved changes" detection and blocking navigation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 09:10:52 +01:00
c9dcaa808b Document Permissions: Export UmbDocumentUserPermissionCondition from package (closes #21199) (#21217)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 08:58:37 +01:00
Chris HoustonandGitHub 107fb48002 Cryptographic Functions: Fixes obsolete .NET API warnings (SYSLIB0023, SYSLIB0045, SYSLIB0021, SYSLIB0013, SYSLIB0012) by replacing deprecated cryptographic and reflection APIs with their modern equivalents. (#21213)
Fixed various obsolete .NET API calls.

These all show up as warnings when you try to build the Umbraco solution:

- SYSLIB0045 (6) - Use proper HashAlgorithm creation
- SYSLIB0023 (4) - Replace RNGCryptoServiceProvider with RandomNumberGenerator
- SYSLIB0021 (8) - Replace deprecated crypto types
- SYSLIB0013 (4) - Replace Uri.EscapeUriString
2025-12-19 21:19:41 +01:00
Chris HoustonandGitHub 7b449658d3 Fix build warning CS0252 - unintended reference comparison in tests (#21212)
Fix unintended reference comparison in tests

Explicitly casts the mock property to string in a predicate to prevent reference equality checks. Adds constraints for storage type and editor to align with expected data characteristics and improve test reliability. Keeps mock service behavior unchanged; minor formatting tweak included.
2025-12-19 21:06:55 +01:00
add5bd31c9 Management API: Fixes the warning CS8524 and tidying up the "Set Status Redirect Url Management Controller" (#21211)
* Fixes the warning CS8524 and tidying up the SetStatusRedirectUrlManagementController

I have added throwing an error in the switch statement if neither of the know enums is submitted to the API, in theory this should never happen.

The other option would be to simply return false, but I think throwing the exception is better as it will alert whoever is calling the API that their call is invalid.

* Update src/Umbraco.Cms.Api.Management/Controllers/RedirectUrlManagement/SetStatusRedirectUrlManagementController.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-19 21:04:53 +01:00
Chris HoustonandGitHub 72447b040a Resolves all CA2017 warnings and improves log message clarity (#21210)
Improves log message clarity

- Refines a warning when a property type alias is missing, clarifying that a default value is returned.
- Improves backoffice token revocation log by including contextual client id for easier troubleshooting.
- Corrects model generation error logging by passing the exception as the first argument for consistency.
2025-12-19 18:31:45 +01:00
Chris HoustonandGitHub b13544083f Docs: Fix CS1573 warnings - add missing XML param tags (#21209)
Add missing parameter documentation tags to resolve CS1573 compiler warnings:

- Add cancellationToken param tags to 24 API Management controllers

- Add payloadType param tags to 6 Webhook extension files

- Fix various missing param tags in Core and Infrastructure files
2025-12-19 18:25:08 +01:00
Nhu DinhandGitHub 70d1728843 E2E: QA Added acceptance tests for content delivery API (#21095)
* Added tests for media delivery api

* Added tests for content delivery api

* Fixed import

* Added tests for Content Delivery API

* Updated skip tag and issue link for the failing tests

* Bumped version

* Refactor code for content delivery api tests

* Moved repeat steps to beforeEach and added more waits

* Bumped version

* Added more waits

* Updated variable names

* Grouped tests

* Renamed

* Fixed names
2025-12-19 10:16:19 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Jacob Overgaard
c08e39064f Storybook: Bumps storybook from 9.0.14 to 10.1.10 (#21208)
* Bump storybook

Bumps the npm_and_yarn group with 1 update in the /src/Umbraco.Web.UI.Client directory: [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core).


Updates `storybook` from 9.0.14 to 9.1.17
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v9.1.17/code/core)

---
updated-dependencies:
- dependency-name: storybook
  dependency-version: 9.1.17
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bumps storybook from v9 to v10

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-12-19 10:13:31 +00:00
Nhu DinhandGitHub dfb7507ae2 E2E: QA Added acceptance tests for rendering content with invariant blocks (#21180)
* Added tests for rendering content with block list

* Updated tests for rendering content with block lists

* Updated message when has no block lists

* Added tests for rendering content with block grid

* Updated code

* Bumped version

* Changed npm command to make tests run in the pipeline

* Fixed comment

* Reverted command
2025-12-19 09:25:17 +00:00
d749af8974 Upgrade MSW from 1.3.5 to 2.12.4 (#21096)
* upgrade msw, migrate all interceptors, and update backoffice integration

* Fix msw test runner integration

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-12-19 10:19:10 +01:00
Nhu DinhandGitHub 14fe6f4888 E2E: QA Fixed failing tests for the current user profile (#21214)
* Added more waits

* Make tests run in the pipeline

* Reverted npm command
2025-12-19 09:18:45 +00:00
Chris HoustonandGitHub 0d4f24300a fix(code-quality): resolve CS0628 warnings - change protected to private in sealed classes. (#21193)
* fix(code-quality): resolve CS0628 warnings - change protected to private in sealed classes

Changed protected members to private in sealed classes across 26 files. Protected members in sealed classes serve no purpose since sealed classes cannot be inherited. This eliminates 57 CS0628 compiler warnings.

* fix: use public for NUnit SetUp methods per Copilot review

NUnit requires SetUp methods to be at least protected. Using public
avoids CS0628 while allowing NUnit to discover and execute the methods.

* Clean up

- Renames internal fields to clearer names and aligns with conventions
- Changes internal cache holder to use auto-properties for state ( fixes another build warning )
- Removes an unused exception type from the loader and cleans up unused usings
- Adds "Umbraco" to the list of known spellings in .vsCode settings file, amazed this wasn't already there :)

* Improvements to fix CodeScene Code Health Review issues.

- Introduces debug-only logging helpers and routes all log messages through them for consistency
- Centralizes retrieval of discoverable types and scanning logic to simplify paths
- Aligns logging of cached vs non-cached and slow paths with new helpers
- Documents data-holding structure used to store type lists for clarity

* Refactoring to make CodeScene happy, removing code duplication :)
2025-12-18 19:28:13 +01:00
Engiber LozadaandGitHub ebb6590bad Data Types: Add condition to hide delete action in non deletable data types. (#21184)
* Created a condition that check non deletable data types.

* Export condition.

* Updated export path.
2025-12-18 09:58:29 +00:00
Niels LyngsøandGitHub 7b85109606 News Dashboard: Update styling to fit with new style (#21185)
styling of the dashboard
2025-12-18 09:51:11 +01:00
Chris HoustonandGitHub 0e60602746 Tests: Fix CS4014 warnings - add missing await operators (#21194)
Fix unawaited async calls in tests

- Converts setup to async and awaits data creation
- Awaits operation status update to fix potential unawaited calls
- Updates nested validation tests to use await for helper results
- Removes stray BOM character in a test file
- Improves overall async flow, addressing CS4014
Relates to CS4014
2025-12-18 07:03:23 +01:00
Mads RasmussenandGitHub e08a60e74d Performance: Embed Store API in Manifests to lower number of network request (#21191)
Refactor manifests to use direct store imports to minimize the number of lazy loaded items on startup
2025-12-17 23:13:39 +01:00
Niels LyngsøandGitHub 4c7abc41b2 Performance: Bundle Js Libs (#21187)
bundle libs
2025-12-17 21:41:58 +00:00
Niels LyngsøandGitHub 45ae5aaac0 Performance: Embeds the API of selected extra Conditions (#21188)
embeds the API of selected Conditions
2025-12-17 21:43:08 +01:00
Niels LyngsøandGitHub 30d9288f12 Culture and Hostnames: Load all languages (#21169)
make sure we take all languages
2025-12-17 16:01:20 +01:00
Kenn JacobsenandAndy Butland 4aa506100e Indexing: Gracefully handle element property variance changes at index time (#21183)
Gracefully handle element property variance changes at index time
2025-12-17 15:53:14 +01:00
700a19f4b9 Block level variance: fix values being polluted when changing variance before publish (#21121)
* TDD solution to Block level variance publishing changing to no variance retaining block level variance values and vica versa

* Add similar tests for the other block editors

* Apply suggestions from code review

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Amend the test scenarios

* Simplify the merge clean-up to remove all misaligned values.

* Fix failing test (remove false assumptions)

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-12-17 15:52:56 +01:00
Niels Lyngsø e27b661b3f update version in package lock 2025-12-17 15:51:12 +01:00
Kenn JacobsenandGitHub 75e4b2b18d Indexing: Gracefully handle element property variance changes at index time (#21183)
Gracefully handle element property variance changes at index time
2025-12-17 15:44:09 +01:00
8642b9e615 Content Types: Fix property variation change when content exists only in non-default language (#21182)
* Content Types: Fix property variation change when content exists only in non-default language (closes #11771)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add tests for AllowEditInvariantFromNonDefault enabled scenario

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 15:21:17 +01:00
7b9bef9d2a Content Types: Fix property variation change when content exists only in non-default language (#21182)
* Content Types: Fix property variation change when content exists only in non-default language (closes #11771)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add tests for AllowEditInvariantFromNonDefault enabled scenario

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 15:19:38 +01:00
638e181334 Content Types: Fix property variation change when content exists only in non-default language (#21182)
* Content Types: Fix property variation change when content exists only in non-default language (closes #11771)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add tests for AllowEditInvariantFromNonDefault enabled scenario

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 15:18:14 +01:00
254400bb58 Block level variance: fix values being polluted when changing variance before publish (#21121)
* TDD solution to Block level variance publishing changing to no variance retaining block level variance values and vica versa

* Add similar tests for the other block editors

* Apply suggestions from code review

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Amend the test scenarios

* Simplify the merge clean-up to remove all misaligned values.

* Fix failing test (remove false assumptions)

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-12-17 13:51:19 +01:00
3bcdcc56c8 Cache: Add null checks for entities that may no longer exist during cache refresh (#21181)
* Add null checks in case content no longer exists

* Add logging statement

* Add integration tests for null handling in cache refresh services

Tests verify that DocumentUrlService and PublishStatusService
do not throw exceptions when called with non-existent content keys,
which can happen when processing stale cache instructions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add integration tests for stale cache instruction handling

Tests simulate the scenario where a cache instruction is processed
for content that has been deleted (stale instruction). This can happen when:
1. Content is saved (cache instruction queued)
2. Content is deleted before instruction is processed
3. Server restarts and processes the stale instruction

Tests cover:
- ContentCacheRefresher with RefreshBranch for deleted content
- ContentCacheRefresher with RefreshNode for deleted content
- MediaCacheRefresher with RefreshBranch for deleted media
- Processing instructions for content that never existed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 11:44:07 +01:00
Nhu DinhandGitHub dd6ae8bd25 E2E: QA Added acceptance tests for removing a not-found content picker (#21177)
* Added tests for removing a not-found content picker

* Added comment

* Bumped version

* Change npm command to make tests run in the pipeline

* Reverted npm command
2025-12-17 09:38:39 +00:00
Andreas ZerbstandGitHub aa32035830 E2E QA: Updated integration test that was missing directory setup (#21167)
* Added base class

* Added implementation of base class

* Added missing parameter

* Added try-catch around delete operations in Purge() to ignore locked files during cleanup.
2025-12-17 09:57:17 +01:00
911d2fe67b Content: Fix name() and getName() to use active variant (closes #20759) (#21171)
* Content: Fix name() and getName() to use active variant when no variantId provided

When calling `name()` or `getName()` without a variantId argument, the methods
now correctly return the name of the first active variant from the split view
instead of always returning the first variant in the data array.

The `name()` method now returns a reactive observable that updates when the
active variant changes, using `mergeObservables` to combine the split view's
active variant observable with the variants data.

The `getName()` method now uses `splitView.getActiveVariants()[0]` to get the
current active variant synchronously, with a fallback to the first variant if
no active variant is set.

This fixes an issue where block previews could not reactively observe the
document name because the callback parameter was always empty.

Closes #20759

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: use UmbVariantId.compare() for consistent variant matching

Address PR review feedback by using UmbVariantId.Create() and compare()
instead of direct property comparison. This ensures consistent behavior
with the existing variant comparison pattern used throughout the codebase.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: formatting

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 08:48:42 +01:00
Sven GeusensandAndy Butland 235fa3b743 Added a migration to remove the property regex validation length limit (#21175) 2025-12-17 06:49:02 +01:00
Sven GeusensandGitHub 81685bf0e2 Added a migration to remove the property regex validation length limit (#21175) 2025-12-17 06:48:36 +01:00
Andy Butland 9fb018276a Bumped version to 17.2.0-rc. 2025-12-17 06:41:09 +01:00
Andy ButlandandGitHub a9c6f97f7b Models builder: Re-provide support for casting a published member to the models builder type (closes #21135) (#21150)
* Re-provide support for casting a published member to the models builder type.

* Used new constructor for MemberManager in unit tests.

* Fix failing unit tests.
2025-12-17 06:37:15 +01:00
CopilotGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>nielslyngsoe
044cd1da57 Add loader to Culture and Hostnames modal while data loads (#21084)
* Initial plan

* Add loader to culture-and-hostnames modal with undefined state tracking

Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>
2025-12-16 14:06:50 +00:00
Niels LyngsøandGitHub 871d590f9a refactor multi url picker validation (#21143)
* refactor multi url picker validation

* fix line break
2025-12-16 13:36:33 +00:00
b207fa31cd Relations: Fix descendants query to exclude parent item (#21162)
* Relations: Fix descendants query to exclude parent item

The GetPagedDescendantsInReferences query was using a path LIKE without
the comma delimiter, causing it to match both the parent item and its
descendants. This resulted in the trash confirmation dialog showing
the item being deleted in the "descending items with dependencies"
list.

Changed the WhereLike call to use ",%" suffix instead of just "%",
so the query only matches actual descendants (items whose path
starts with the parent's path followed by a comma).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add integration test to verify behaviour.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-12-16 13:44:21 +01:00
Andreas ZerbstandGitHub 2a604c8719 E2E: QA Replaced unreliable Thread.Sleep(500) with a counter/gate pattern that ensures both transactions are initialized before releasing them to compete for locks (#21165)
Fix flaky test
2025-12-16 12:02:07 +00:00
Laura NetoandGitHub dab88d7019 Document Saving: Fix SQL Server deadlock during concurrent updates (#21156)
Fix SQL Server deadlock during concurrent document updates

Add ReadLock on ContentTree in RefreshMemoryCacheAsync to prevent
deadlocks between cache refresh SELECT queries and concurrent document
UPDATE operations. The deadlock occurred because the operations accessed
umbracoNode and umbracoDocument tables in different orders.
2025-12-16 11:42:49 +01:00
5bd35288f5 Tree: Fix race condition when loading tree with hideTreeRoot enabled (#21160)
The #debouncedLoadTree method was not awaiting repository initialization
before calling loadChildren() when hideTreeRoot was true. This caused a
"repository is missing" error in tree pickers like the Static File picker
used for block thumbnails.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 10:35:09 +00:00
c2730e7308 UI: Prevent headline overflow in umb-body-layout (#21140)
* fix: add title attribute and prevent headline overflow in body layout

* Added min-width property.

---------

Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
2025-12-16 09:24:56 +00:00
Andreas ZerbstandGitHub 6419585443 E2E: QA Added acceptance tests for issue #20815 (#21151)
* Added tests for making sure that nested variants properties are updated

* Updated failing test

* Bumped version

* Cleaned
2025-12-16 08:38:39 +00:00
Nhu DinhandGitHub dc61f93afe E2E: Added acceptance tests for regression issues (#21098)
* Added tests for regression issue #20962

* Added tests for regression issue #20520

* Added tests for rendering content with RTE

* Added @release tags

* Bumped version

* Make new added tests run in the pipeline

* Updated dataTypeName

* Fixed comments

* Reverted npm command
2025-12-16 07:43:48 +00:00
MoleandGitHub 7982641262 Distributed Background Jobs: Catch exceptions in job loop to improve application resilience (#21099)
* Set exit code when exception is thrown

* Catch any error instead so we don't stop the application

* Handle exception when ensuring jobs
2025-12-16 06:56:04 +01:00
85806fd7b5 Performance: Re-introduce lazy locks (#21102)
* fix: add write lock at outer scope to prevent deadlocks in content publishing

Acquire a write lock on ContentTree at the start of PublishAsync to prevent
deadlocks. Previously, inner scopes would acquire read locks first (via
repository operations), then attempt to upgrade to write locks, causing
deadlocks when multiple transactions tried this simultaneously.

By acquiring the write lock at the outer scope, we ensure consistent lock
ordering and prevent the deadlock scenario.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Re-enable lazy locks

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 06:53:34 +01:00
Laura NetoandGitHub 57cec15928 Content Types: Introduce schema service to support future schema generation (#21031)
* Introduce new content type schema service and models

To be used in the future for content type schema generation.

* Do not fail when content type is not in cache, simply ignore

* Added unit and integration tests

* Fix failing unit tests

* Addressing comments from code review
2025-12-15 20:52:46 +01:00
Andy Butland 59aaa00bab Merge branch 'v16/dev'
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/assets/lang/en.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/performance-profiling/dashboard-performance-profiling.element.ts
2025-12-15 19:57:30 +01:00
a429170842 Extend RTE output in Delivery API for better support for multi-site URL resolution (#20846)
* add content key and type to link info on RTE delivery API data. Fix tests to accomodate changes

* convert field type content-id -> destination-id. convert field type content-type -> link-type and use LinkType enum instead.

* revert unintended find and replace changes

* apply patch by kjac

* fix unit tests for RTE parsers

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-12-15 15:23:11 +01:00
9c0a0a1086 V16/drag event media (#20893)
* updates the drag event to convert types to lowercase

* clearing up

* clearing up

* Fixed style problem in safari and an unused parameter.

* Fixed lint error.

---------

Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
2025-12-15 14:16:57 +00:00
+2 0845d267e6 Block Editors: variantId inheritance fix (#21101)
* 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>
2025-12-15 13:31:51 +00:00
6c743e8270 Tiptap RTE: Uses UmbracoCssPath global setting when loading CSS files (closes #20877) (#21106)
* get full path of file

* get configuration umbracosspath from BE and use it when get css file

* fix lint error

* update for test fail

* add obsolete constructor

* Update src/Umbraco.Cms.Api.Management/Controllers/Server/ConfigurationServerController.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Update src/Umbraco.Cms.Api.Management/Controllers/Server/ConfigurationServerController.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Added `umbracoCssPath` to mock Server handler

* Added `umbracoCssPath` to Server Connection controller

* Removed the Tiptap Config Repository/Store code

we can simplify this by reusing the Server Context.

* Used `UMB_SERVER_CONTEXT` to get the `umbracoCssPath`

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-12-15 14:14:40 +01:00
d47464e2a7 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>
2025-12-15 11:51:29 +00:00
Sven GeusensandGitHub e8adb30411 Update nightly build to include 16 as 17 is now main (#21144) 2025-12-15 11:33:33 +01:00
fb1e52a172 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>
2025-12-15 11:22:11 +01:00
452c56b882 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>
2025-12-15 11:19:44 +01:00
Andy ButlandandGitHub aeca0d0f29 Manifests: Fix misnaming and mis-registering of the document validation manifest (closes #21128) (#21139)
Fix misnaming and mis-registering of the document validation manifest.
2025-12-15 09:10:29 +00:00
fa23e1874c 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>
2025-12-15 09:00:12 +00:00
Sven GeusensandGitHub 906f8e4664 QA Added unit tests for HideBackOfficeTokensHandler (#21067)
* Added unittests for the HideBackOfficeTokensHandler
2025-12-15 09:43:39 +01:00
63fd7ddc52 Repositories: Optimize repository caches to populate for both int and GUID keys (#21124)
* Populate repository cache by GUID when retrieving documents by integer ID, to avoid database hit on subsequent retrieval by key.

* Apply same for media repository.

* Use existing helper to centralise generation of repository cache keys.

* Minor clean-up.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Applied suggestions from code review.

* Apply suggestions from code review

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Applied suggestions from code review.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-12-15 07:17:57 +01:00
5569607a81 Workspace: Fix browser title not being set correctly (#21126)
* Block Workspace: Only update view title when opened in modal context

Prevents unintended document title updates when block workspace is used
outside of modal context. Also adds early return in view controller when
no local title is available to avoid setting an empty title prefix.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* View Controller: Reactivate parent view when child is removed

When a non-inheriting child view (like a modal) is removed, the parent
view may have been deactivated. This change ensures the parent view is
reactivated to restore the browser title when the modal closes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update src/Umbraco.Web.UI.Client/src/packages/core/view/context/view.controller.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-12 15:44:46 +00:00
9a0d2d1f97 Update src/Umbraco.Web.UI.Client/src/packages/tiptap/CLAUDE.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-12 16:30:33 +01:00
leekelleherandJacob Overgaard 99a1a612ce Corrected directory structure layout 2025-12-12 16:30:33 +01:00
leekelleherandJacob Overgaard 0119d8d4da docs: Add CLAUDE.md documentation for Tiptap RTE 2025-12-12 16:30:33 +01:00
Nhu DinhandGitHub 0e90b072c8 E2E: QA Fixing some failing tests related to culture and hostname, log viewer and user (#21132)
* Bumped version

* Updated tests to match new changes

* Bumped version

* Bumped version
2025-12-12 20:02:46 +07:00
08a95b64fe Docs: Add PR naming convention to CLAUDE.md (#21114)
* Docs: Add PR naming convention to CLAUDE.md

Integrate the PR naming guidelines from PullRequestNaming.md into the
Pull Request Process section of CLAUDE.md for better discoverability.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Remove area

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 12:06:46 +00:00
Nicklas KramerandGitHub 08aa10b4f7 Media: Fixing media folder not getting deleted when deleting media files. (#21059)
* Introducing lock and logic to find directory to be deleted

* Obsoleting old ctor

* Expanding obsolete comment

* Adding new parameter to tests

* Adding database to failing integration tests.

* Adding more tests

* Fixing flawed logic

* Cleanup on FileSystemsTests.cs
2025-12-12 17:32:27 +09:00
Lee KelleherandGitHub 8e3764e4fb UFM: Resolves "missing filter" console warning (#21118)
UFM Filter base, check that the component is connected to the DOM

otherwise the context no longer exists and the `render` still runs,
giving a bunch of "missing filter" warnings.
2025-12-11 13:28:32 +01:00
Andy Butland 7492009dc6 Merge branch 'release/17.0'
# Conflicts:
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-12-11 07:07:24 +01:00
Andy Butland 1a4256f997 Add option to hide colors from icon picker (#20650)
* Add option to hide colors from icon picker

* Hide colors

* Hide colors from config
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.element.ts
2025-12-11 06:57:29 +01:00
Bjarne FyrstenborgandGitHub 23e8ee51d3 Add option to hide colors from icon picker (#20650)
* Add option to hide colors from icon picker

* Hide colors

* Hide colors from config
2025-12-11 06:40:28 +01:00
30a57dd5f5 Content Publishing: Fix deadlocks by acquiring WriteLock at outer scope (#21105)
fix: add write lock at outer scope to prevent deadlocks in content publishing

Acquire a write lock on ContentTree at the start of PublishAsync to prevent
deadlocks. Previously, inner scopes would acquire read locks first (via
repository operations), then attempt to upgrade to write locks, causing
deadlocks when multiple transactions tried this simultaneously.

By acquiring the write lock at the outer scope, we ensure consistent lock
ordering and prevent the deadlock scenario.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 20:59:38 +01:00
3fa053ae4c Delivery API: Adding allow list for content types (#21111)
* Adding allow content type alias settings and validator

* Creating private helper method for tests

* Revisiting logic for disallow types

* Adding tests for validator

* Obsolete unnecessary methods and overloads.

* Fix warning and update naming in tests.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-12-10 16:43:39 +00:00
7b13e23025 Templating: Creating a doctype with template now yields a strongly typed template (closes #20443) (#20688)
* Adjust the document type creation flow so that a template can be created for a content type

Add id, name and alias to the request payload to allow creating multiple templates for the same document type

Small adjustments

Remove unused import and unnecessary async

Switched content type template creation to content type controller

Missing constant export

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/core/backend-api/sdk.gen.ts

* Add default implementation for CreateForContentTypeAsync

* Small adjustments from code review

* Introduce InvalidTemplateAlias content type operation status

* Add tests for CreateTemplateAsync and fix alias validation

- Add integration tests for ContentTypeService.CreateTemplateAsync:
  - Success case with template association
  - NotFound status for non-existent content type
  - InvalidTemplateAlias for empty and too-long aliases
  - Default template assignment verification

- Fix bug in TemplateService.CreateAsync where alias validation
  occurred after GetViewContent call, causing ArgumentNullException
  for invalid aliases instead of returning InvalidAlias status

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 17:36:42 +01:00
Laura NetoandGitHub 8c187a699f Long Running Operations: Ensure eager write lock (#21113)
Use EagerWriteLock for long running operations

Switch from WriteLock to EagerWriteLock when acquiring the lock for
long running operations to ensure proper lock acquisition timing.
2025-12-10 15:24:45 +00:00
e08d80f084 Add Context7 claim file (#21110)
Adds context7.json to claim this repository for Context7 documentation service.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Phil Whittaker <pjw@umbraco.dk>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-10 15:32:00 +01:00
f5e6d85769 Distributed Background Jobs: Add initialization logging to DistributedJobService (#21112)
* Distributed Background Jobs: Add initialization logging to DistributedJobService

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Use registered instead of intitialized

* Update src/Umbraco.Infrastructure/Services/Implement/DistributedJobService.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Be consistent in log messages

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-10 15:03:34 +01:00
497c31ef2c Sync: Fix SyncBootStateAccessor to use ILastSyncedManager to prevent unnecessary cold boots (#21109)
* Sync: Fix SyncBootStateAccessor to use ILastSyncedManager

Update SyncBootStateAccessor to use the new ILastSyncedManager interface
instead of the deprecated LastSyncedFileManager, which was causing cold
boots to be triggered every time.

- Replace LastSyncedFileManager field with ILastSyncedManager
- Add new primary constructor accepting ILastSyncedManager
- Add obsolete constructors for backwards compatibility using StaticServiceProvider
- Update GetSyncBootState to use GetLastSyncedExternalAsync

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Sync: Add integration tests for SyncBootStateAccessor

Add integration tests to verify SyncBootStateAccessor correctly
determines cold boot vs warm boot state based on ILastSyncedManager.

- Test cold boot when no last synced ID exists
- Test warm boot when last synced external ID matches a cache instruction

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 14:38:09 +01:00
1a4ca0ba4d Sync: Fix SyncBootStateAccessor to use ILastSyncedManager to prevent unnecessary cold boots (#21109)
* Sync: Fix SyncBootStateAccessor to use ILastSyncedManager

Update SyncBootStateAccessor to use the new ILastSyncedManager interface
instead of the deprecated LastSyncedFileManager, which was causing cold
boots to be triggered every time.

- Replace LastSyncedFileManager field with ILastSyncedManager
- Add new primary constructor accepting ILastSyncedManager
- Add obsolete constructors for backwards compatibility using StaticServiceProvider
- Update GetSyncBootState to use GetLastSyncedExternalAsync

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Sync: Add integration tests for SyncBootStateAccessor

Add integration tests to verify SyncBootStateAccessor correctly
determines cold boot vs warm boot state based on ILastSyncedManager.

- Test cold boot when no last synced ID exists
- Test warm boot when last synced external ID matches a cache instruction

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 13:02:10 +00:00
8626ae4f2e Distributed Background Jobs: Improve distributed background job locking behavior and performance (#21100)
* Don't take jobs that's already running and handle stale jobs

* Add tests

* Add bulk insert and delete methods to repository

* Optimize EnsureJobsAsync to use batch inserts

* Add EnsureJobs tests

* Remember to keep old constructor

* Minor cleanup

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-12-10 11:23:38 +01:00
Lotte PitcherandAndy Butland 78dfcf97b7 Dotnet new templates: Fix placeholders and port in umbraco-extension template (#20956)
* reset placeholders and port number in umbraco-extension template

* add readme instructions on how to test templates locally
2025-12-10 07:06:29 +01:00
Niels LyngsøandGitHub f8d6a97196 Blocks: localize group headline (#21090)
localize block group headline
2025-12-09 09:17:20 +01:00
c910f544ee Improve deletion logic in UmbracoContentIndex (#21091)
* Improve deletion logic in UmbracoContentIndex

When re-indexing a node it will first delete it, however in many cases the query to delete doesn't return anything, however a delete command is still executed with an empty integer collection. We can avoid allocating and iterating lists and avoid the deletion call all together if the collection is empty.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Clean-up and warning resolution whilst we are modifying class.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-09 08:01:48 +00:00
Niels Lyngsø 0d599f6639 formatting 2025-12-08 15:23:24 +01:00
cbc832d6f3 Collection: Introduce Card and Ref Collection View kinds (#21037)
* Add entity collection item card extension type + default elements

* implement user collection item card

* fix selection events

* map to prop

* add prop/attr for href

* add support for which detail properties to show

* update type import

* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/item/entity-collection-item-card/entity-collection-item-card.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* import card in correct file

* Fix event listener binding for selection events

* implement disabled property for collection item cards

* init commit of collection item ref extension

* fix imports

* add element interface

* Implement UmbEntityCollectionItemElement interface in item cards

Added the UmbEntityCollectionItemElement interface to document and user collection item card elements for improved type safety and consistency. Updated type exports to include the new interface.

* Update collection item ref to use uui-ref-node

Replaces the placeholder div with a uui-ref-node component, passing relevant item properties and event handlers. Adds dynamic icon rendering using umb-icon.

* Refactor entity collection item elements to use shared base

Introduces a new abstract base class for entity collection item elements, consolidating shared logic for card and ref variants. Updates card and ref element implementations to extend the new base, and refactors extension manifest interfaces for consistency. This improves maintainability and reduces code duplication.

* use class instead of magic string

* introduce ref and card collection view kinds

* Utilise card kind for user collection view

* Add item-specific href support to collection views

Introduces a requestItemHref method to collection contexts for retrieving item-specific hrefs. Updates card, ref, and user table collection views to use these hrefs, enabling dynamic linking for collection items. Refactors user table name column layout to accept href via value prop instead of constructing it internally.

* Update ManifestCollectionView import path

Changed the import of ManifestCollectionView from '../extensions/types.js' to '../view/types.js' to reflect its new location.

* use box

* render entity actions

* use edit path builder for user links

* rename method

* Revert "rename method"

This reverts commit 4df577688e.

* Update collection-default.context.ts

* make type lint ignore unused args with an underscore

* temp remove unused

* only make collection vie selectable if there are any registered bulk actions

* don't render name link if there is no href

* fix imports

* use selectable state

* Update language-table-collection-view.element.ts

* Update card-collection-view.element.ts

* clean up

* Refactor collection views to use shared base class

* refactor(collection): parallelize href fetching and make method private

* docs(examples): update collection example to use card and ref kinds

* docs(examples): add icon property to collection example data model

* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/view/types.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update collection-bulk-action.manager.test.ts

* Removed duplicate and redundant '@typescript-eslint/no-unused-vars' rule definitions, consolidating the configuration to use only 'argsIgnorePattern'.

* Handle missing user href in name column layout

Replaces the user name link with a span when the href property is not provided, preventing broken links in the user table name column layout.

* Update user-table-name-column-layout.element.ts

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-08 11:18:28 +00:00
Jacob Overgaard 4bf83a70c1 build: adds keywords to package.json 2025-12-08 10:35:55 +01:00
d7d52dd488 fix(rte): Deduplicate Tiptap extensions to prevent duplicate name warnings
When multiple Umbraco extensions (e.g., BulletList and OrderedList) include
the same Tiptap extension (ListItem), duplicates were added to the extensions
array, causing Tiptap to log warnings. This change uses a Map to deduplicate
extensions by their name property before passing them to the Editor.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 09:53:37 +01:00
475010148b Added 'mandatory' tag as a visual indicator for webhook events being … (#21075)
* Added 'mandatory' tag as a visual indicator for webhook events being mandatory.

* Map the webhook validation for no events specified to a specific API response problem details message.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-12-05 15:44:33 +00:00
830250b682 Docs: Update outdated branch references from contrib to main (#21072)
The contributing documentation still referenced the old `contrib` branch,
which was causing AI tools to incorrectly use it as the base branch for
comparisons. Updated all references to use `main` instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-05 14:24:40 +00:00
fd4ed2cfc1 Back-office auth: Calculate token cookie names at request time (Closes #21050) (#21056)
* Back-office auth: Calculate token cookie names at request time

The __Host- cookie prefix enforces secure cookies at browser level,
which caused cookies to be rejected when running over HTTP in local
development environments even when UseHttps was set to false.

Cookie names are now calculated per-request based on both the UseHttps
setting and whether the current request is over HTTPS, matching the
logic used for the Secure cookie option.

* Update src/Umbraco.Cms.Api.Common/DependencyInjection/HideBackOfficeTokensHandler.cs

Co-authored-by: Sven Geusens <sge@umbraco.dk>

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2025-12-05 11:04:31 +01:00
Andy Butland 80ae0380a2 oEmbed Providers: Updated the X oEmbed provider to use the x.com domain (closes #21052) (#21053)
* Updated the X oEmbed provider to use the x.com domain.

* Fixed issues raised in code review.
2025-12-05 10:55:09 +01:00
Nicklas KramerandGitHub 15b2cb7bd1 News Dashboard: Adding functionality to overwrite the cache duration (#21064)
* Adding functionality to overwrite the cacheduration for NewsDashboard

* Making the extension its own class, as to avoid having to inherit the entire service.

* Changing options to duration and adding interface
2025-12-05 10:43:43 +01:00
Andy ButlandandGitHub 5683ae9e4b oEmbed Providers: Updated the X oEmbed provider to use the x.com domain (closes #21052) (#21053)
* Updated the X oEmbed provider to use the x.com domain.

* Fixed issues raised in code review.
2025-12-05 10:38:58 +01:00
b6580ed40c E2E: QA updated current accceptance test project README to match current project (#21063)
* Updated readme

* Update tests/Umbraco.Tests.AcceptanceTest/README.md

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/README.md

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

---------

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
2025-12-05 07:43:34 +00:00
Andy Butland 9340842ee2 Bump version to 17.0.2. 2025-12-05 06:47:46 +01:00
Andy Butland fd01282798 Merge branch 'release/16.4.1' into v16/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-12-05 06:44:51 +01:00
f7ba2eaa62 Property Editors: Hide "add button" when maximum configuration is 1 (fixes #20407) (#20738)
Hide add button when max 1

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-12-04 16:34:10 +01:00
9485a95c0e Image cropper modal import missing component (#20651)
* Import missing component

* Handle nullable type

* Vertically center image

* Add minimum width for SVG without dimensions

* 100% height until max height

* 100% height minus top/bottom padding

* Revert "100% height minus top/bottom padding"

This reverts commit 67ada4c70f4b75dfcfa2b54ce139ec7465a17ce1.

* Revert "Handle nullable type"

This reverts commit 3130e11a4be83a18b5a7d8c1c24ee23c94d8765d.

* Removed flexbox style

* Fixed circular dependency

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-12-04 16:32:10 +01:00
Lotte PitcherandGitHub 61a69852e3 Dotnet new templates: Fix placeholders and port in umbraco-extension template (#20956)
* reset placeholders and port number in umbraco-extension template

* add readme instructions on how to test templates locally
2025-12-04 15:34:57 +01:00
e6c7ef8904 Segments: Only validate segment values for cultures they are defined for (closes #21029) (#21033)
* Only validate segment values for cultures they are defined for.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Integration test suppressions.

* Remove previous implementation using ISegmentService and rely on values provided in the model to determine segments with cultures.

* Omit null culture and remove passing but unrealistic tests.

* Fixed nullability error.

* Apply suggestions from code review

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Relocated function following code review.

* Reset unchanged files.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-12-04 12:54:44 +01:00
effccef81d Collections: Add selection mode toggle in UmbTableElement update lifecycle (#20486)
* Add selection mode toggle in UmbTableElement update lifecycle

* Update src/Umbraco.Web.UI.Client/src/packages/core/components/table/table.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Markup attribute consistency

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-12-04 11:25:19 +00:00
88f04cd722 Document Tree: Fix undefined name for variants without fallback. (#21046)
* fix(backoffice): Tree menu item shows undefined for variant names without fallback

When a document variant has no name set and there's no fallback language
configured, the tree now falls back to the first variant with any name
instead of displaying "undefined".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(backoffice): Show (Untitled) when no variant has a name

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-04 10:01:57 +00:00
Nicklas KramerandGitHub 26efa520bc Packaging: Fixing bad serialization for data types in packages (#21043)
* Changing data type serialization to datatype

* Moving and correcting comment
2025-12-04 10:52:23 +01:00
f1ab605bb9 Debug mode: Marks UMB-DEBUG cookie as HttpOnly and Secure (#21032)
* fix: sets profiling cookie to httpOnly and strict in order to run non-secure

* fix: adds extra message to explain when you can set a cookie

* fix: simplify cookie explanation comment in WebProfilerRepository

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: checks that the profiler is actually enabled and/or disabled and warns the user if that is not the case

* Update src/Umbraco.Web.UI.Client/src/assets/lang/en.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-04 10:24:12 +01:00
d8c03c426e Property Editors: Fix localization of user-provided labels (closes #20974) (#21045)
* fix: uses localization string() to localize user-provided labels

* fix: localizes placeholder as well

* Refinements to the Toggle input

The localizations can happen in the `config` setter,
then they don't need to re-get the localization each re-render.

Added a `when` directive to show/hide the label `<span>` tag.

Removed `_currentLabel` as unused.

* Refinements to the Textbox input

The localizations can happen in the `config` setter,
then they don't need to re-get the localization each re-render.

Refactored the `uui-input` attributes/properties.

* Refinements to the Number input

The localizations can happen in the `config` setter,
then they don't need to re-get the localization each re-render.

Refactored the `uui-input` attributes/properties.

* Update src/Umbraco.Web.UI.Client/src/packages/core/components/input-toggle/input-toggle.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/text-box/property-editor-ui-text-box.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/number/property-editor-ui-number.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updates based on Copilot feedback

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-04 09:20:33 +00:00
455e7027a0 Block Grid: Sort mode (#20869)
* Added `icon-sort`

from Lucide's "arrow-down-up" icon.

* Added "Sort" package

with property action and context.

* Adds the "sort" property action and context to the Block Grid property

* [WIP] Observing sort mode toggle on Block Grid editor

* [WIP] Further work on Block Grid editor sort-mode

* Added "umb-sort-mode-toolbar" component

* Fixed typo of private method "renderNoting"

* Renamed "sort" property-action to "sort-mode"

* Corrected bad copypasta!

* Renamed "Sort" package to "Sorter"

to include the Sorter controller and maintain backwards-compatibility.

* Code updates based on @copilot feedback

* Fixed circular references

* Removed reference to "sorter/index.ts"

that I'd missed when relocating the package.

* Moved "sorter" back into "core" package

* Moved the "sort" property-action to a combined "property-actions" location

Fixed up other code, use of constants and manifest clarity.

* rename with claude code (#21036)

* rename with claude code

* include property action in name

* renaming

* Rename sortingMode to isSortMode in property sort context

Refactored property sort mode context and related components to use 'isSortMode'

* add jsdocs

* Update vite.config.ts

* no need to export as element

* add tests

* Ordered the tsconfig namespaces

* Reverted the relocation of the "sorter" controller files

* Import ordering

* Reverted some code style tweaks

* Renamed `sortingMode` to `isSortMode`

* Renamed `sortModeEnabled` to `isSortMode`

* Add tests for property sort mode action

* add js docs

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-12-04 09:03:58 +00:00
Jacob OvergaardandGitHub 26679d17db build(deps): bumps monaco-editor from 0.54.0 to 0.55.1 (#21054) 2025-12-04 08:51:45 +00:00
Andreas ZerbstandGitHub 7b462c17f9 E2E: QA updated flaky acceptance tests (#21012)
* Updated tests

* Updated tests

* Cleane up

* Bumped version of test helpers

* Updated tests

* Bumped test helpers
2025-12-04 08:26:47 +00:00
cb454372f2 Debug mode: Marks UMB-DEBUG cookie as HttpOnly and Secure (#21032)
* fix: sets profiling cookie to httpOnly and strict in order to run non-secure

* fix: adds extra message to explain when you can set a cookie

* fix: simplify cookie explanation comment in WebProfilerRepository

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: checks that the profiler is actually enabled and/or disabled and warns the user if that is not the case

* Update src/Umbraco.Web.UI.Client/src/assets/lang/en.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-04 08:55:39 +01:00
84fecd3521 Backoffice: CTRL+Click to open in a new tab should work on Linux (closes #21009) (#21027)
* fix: uses 'href' as property instead of attribute

* build: runs on PR to release branches

* Content references: Avoid requesting references for content that is not yet persisted server side (#21035)

* Avoid requesting references for content that is not yet persisted server side.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor to use condition

* revert

* danish translations

* da translation

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>

* fix: CTRL+Click now opens links in new tab on Linux

The router's anchor click handler incorrectly assumed non-Windows
platforms use Meta (⌘) key for "open in new tab". This broke
CTRL+Click on Linux, which uses CTRL like Windows.

Changed detection from "is Windows" to "is Mac" so Linux correctly
uses CTRL+Click while Mac continues to use Meta+Click.

Also replaced deprecated navigator.platform with navigator.userAgent.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-03 15:03:18 +00:00
Andy Butland 3472ff9ba3 Bump version to 16.4.1. 2025-12-03 15:38:10 +01:00
577dc06d55 Delivery API: Only add default strategy if delivery API is not registered. (#20982)
* Only add if not already present

* Update src/Umbraco.Cms.Api.Management/DependencyInjection/WebhooksBuilderExtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-12-03 15:37:03 +01:00
Jacob Overgaard c35fcf181b Merge remote-tracking branch 'origin/release/17.0' 2025-12-03 15:10:47 +01:00
86411e4ae3 Content references: Avoid requesting references for content that is not yet persisted server side (#21035)
* Avoid requesting references for content that is not yet persisted server side.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor to use condition

* revert

* danish translations

* da translation

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-12-03 12:25:06 +00:00
f4771d1495 Delivery API: Only add default strategy if delivery API is not registered. (#20982)
* Only add if not already present

* Update src/Umbraco.Cms.Api.Management/DependencyInjection/WebhooksBuilderExtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-12-03 12:32:30 +01:00
6104ae60ce Image cropper modal import missing component (#20651)
* Import missing component

* Handle nullable type

* Vertically center image

* Add minimum width for SVG without dimensions

* 100% height until max height

* 100% height minus top/bottom padding

* Revert "100% height minus top/bottom padding"

This reverts commit 67ada4c70f4b75dfcfa2b54ce139ec7465a17ce1.

* Revert "Handle nullable type"

This reverts commit 3130e11a4be83a18b5a7d8c1c24ee23c94d8765d.

* Removed flexbox style

* Fixed circular dependency

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-12-02 17:07:01 +00:00
bcec927e64 Modal: Remove unused uui-dialog element in modal component (#21030)
refactor(backoffice): remove unused uui-dialog element in modal component

Remove dead code that created an unnecessary uui-dialog element inside uui-modal-dialog. The uui-modal-dialog component already manages its own internal dialog element, making the manual creation redundant.

This aligns the dialog implementation with the sidebar implementation pattern, where container elements manage their own internal structure.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-02 18:04:19 +01:00
Andy Butland 5e1f758117 Merge branch 'release/17.0' 2025-12-02 15:57:09 +01:00
Andy Butland b0e5cd768d Reverted accidental change to Program.cs. 2025-12-02 15:56:30 +01:00
Andy Butland a9d8d13735 Merge branch 'release/17.0'
# Conflicts:
#	tests/Umbraco.Tests.Integration/CompatibilitySuppressions.xml
2025-12-02 15:42:32 +01:00
Niels LyngsøandGitHub 857f2900bb Segments: Fix for processing data for Segments-variants (#21018)
* refactor to load segments before processing incoming data

* clean up

* remove unused segment promise
2025-12-02 15:00:25 +01:00
876fc5fff9 Collection: Introduce Collection Item Ref extension type (#20994)
* Add entity collection item card extension type + default elements

* implement user collection item card

* fix selection events

* map to prop

* add prop/attr for href

* add support for which detail properties to show

* update type import

* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/item/entity-collection-item-card/entity-collection-item-card.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* import card in correct file

* Fix event listener binding for selection events

* implement disabled property for collection item cards

* init commit of collection item ref extension

* fix imports

* add element interface

* Implement UmbEntityCollectionItemElement interface in item cards

Added the UmbEntityCollectionItemElement interface to document and user collection item card elements for improved type safety and consistency. Updated type exports to include the new interface.

* Update collection item ref to use uui-ref-node

Replaces the placeholder div with a uui-ref-node component, passing relevant item properties and event handlers. Adds dynamic icon rendering using umb-icon.

* Refactor entity collection item elements to use shared base

Introduces a new abstract base class for entity collection item elements, consolidating shared logic for card and ref variants. Updates card and ref element implementations to extend the new base, and refactors extension manifest interfaces for consistency. This improves maintainability and reduces code duplication.

* use class instead of magic string

* Use ifDefined for href in item card element

* Fix href attribute handling in collection item ref

* Make meta property optional in ManifestEntityCollectionItemBase

* Use ifDefined for href binding in document card

* Fix user card href binding with ifDefined

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-02 13:07:52 +00:00
c612fcc866 Localization: Adds termOrDefault() method to accept a fallback value (#20947)
* feat: adds `termOrDefault` to be able to safely fall back to a value if the translation does not exist

* feat: accepts 'null' as fallback

* feat: uses 'termOrDefault' to do a safe null-check and uses 'willUpdate' to contain number of re-renders

* feat: uses null-check to determine if key is set

* chore: accidental rename of variable

* uses `when()` to evaluate

* revert commits

* fix: improves the fallback mechanism

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-02 11:58:25 +00:00
Niels LyngsøandGitHub c885922a64 Block: open-interaction only available when Content is Editable (#20833)
Only interactive-open area when editable
2025-12-02 10:57:17 +00:00
1cdc15efda Collection: Introduce Collection Item Card extension type (#20954)
* Add entity collection item card extension type + default elements

* implement user collection item card

* fix selection events

* map to prop

* add prop/attr for href

* add support for which detail properties to show

* update type import

* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/item/entity-collection-item-card/entity-collection-item-card.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* import card in correct file

* Fix event listener binding for selection events

* implement disabled property for collection item cards

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-02 10:43:43 +00:00
Kenn JacobsenandGitHub 657ccbd104 Delivery API: Retain the Delivery API login redirect behavior in .NET 10 (closes #21000) (#21023)
* Retain the Delivery API login redirect behavior in .NET 10

* Retrofit fix for backwards compatability
2025-12-02 11:02:18 +01:00
e0999c186b Chore: Move old icons into legacy folder, make new folder for custom. (#20990)
* move legacy icons into a folder

* regenerate icons

* icon compile script for custom

* Reverts "icon-company" to use "building-2" from latest Lucide version

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-12-02 09:49:23 +00:00
da66cbdcf4 Property Editors: Added form control and mandatory support(User, Member, Member Group) (#20672)
* Implement form control for user picker property editor.

* Added form control support to member picker property editor.

* Added form control support to member group picker property editor and removed super.value.

* Reverted max state to infinity.

* Removed console.log inside the render.

* Removed duplicated import.

* Import missing input components in member picker tests

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-12-02 07:44:08 +00:00
Andy ButlandandZeegaan 7d0101170e Management API: Return not found from request for content references when entity does not exist (closes #20997) (#20999)
* Return not found when request for content references when entity does not exist.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Move check for entity existence from controller to the service.

* Update OpenApi.json.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Addressed points raised in code review.

* Update OpenApi.json

* Resolved breaking changes.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit da94e0953b)
2025-12-02 13:28:50 +09:00
da94e0953b Management API: Return not found from request for content references when entity does not exist (closes #20997) (#20999)
* Return not found when request for content references when entity does not exist.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Move check for entity existence from controller to the service.

* Update OpenApi.json.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Addressed points raised in code review.

* Update OpenApi.json

* Resolved breaking changes.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-02 13:25:43 +09:00
Andy ButlandandZeegaan 706ac2d8f6 Static files: Fix tree to only provide items from expected folders (closes #20962) (#21001)
* Applies checks for root folders to static file tree service.

* Add integration tests.

* Fix ancestor test.

* Amends from code review.

* Integration test compatibility suppressions.

* Reverted breaking change in test base class.

(cherry picked from commit 84c15ff4d7)
2025-12-02 10:22:15 +09:00
Andy ButlandandGitHub 84c15ff4d7 Static files: Fix tree to only provide items from expected folders (closes #20962) (#21001)
* Applies checks for root folders to static file tree service.

* Add integration tests.

* Fix ancestor test.

* Amends from code review.

* Integration test compatibility suppressions.

* Reverted breaking change in test base class.
2025-12-02 10:20:08 +09:00
Andy ButlandandZeegaan f408d2a1b3 Migrations: Optimise ConvertLocalLinks migration to process data in pages, to avoid having to load all property data into memory (#21003)
* Optimize ConvertLocalLinks migration to process data in pages, to avoid having to load all property data into memory.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updated obsoletion warning.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 742de79f46)
2025-12-02 10:18:48 +09:00
742de79f46 Migrations: Optimise ConvertLocalLinks migration to process data in pages, to avoid having to load all property data into memory (#21003)
* Optimize ConvertLocalLinks migration to process data in pages, to avoid having to load all property data into memory.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updated obsoletion warning.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-02 10:09:54 +09:00
Jacob OvergaardandGitHub 1694e3bad2 Tree: Fix incorrect error notification when deleting last child (closes #20977) (#20985)
* Fix infinite recursion and incorrect error notifications in tree children loading

This commit addresses two critical issues in the tree item children manager:

1. **Infinite recursion vulnerability**: The #resetChildren() method called
   loadChildren(), which could recursively call #resetChildren() again if
   the underlying issue persisted, creating an infinite loop.

2. **Inappropriate error messages**: The "Menu loading failed" notification
   was shown even in legitimate scenarios, such as when deleting the last
   child of a node, where an empty tree is the expected outcome.

Changes made:

- Add ResetReason type ('error' | 'empty' | 'fallback') to differentiate
  between error states and expected empty states

- Extract #loadChildrenWithOffsetPagination() as a terminal fallback method
  that uses only offset pagination and never calls #resetChildren(),
  structurally preventing recursion

- Update #resetChildren() to:
  - Accept a reason parameter to determine whether to show error notification
  - Reset all retry counters (#loadChildrenRetries, #loadPrevItemsRetries,
    #loadNextItemsRetries) to ensure clean state
  - Call #loadChildrenWithOffsetPagination() instead of loadChildren()
  - Only show error notification when reason is 'error'

- Update all call sites of #resetChildren() with appropriate reasons:
  - 'error' when retries are exhausted (actual failures)
  - 'empty' or 'fallback' when no new target is found (may be expected,
    e.g., after deleting items)

The fix makes infinite recursion structurally impossible by creating a
one-way flow: target-based loading can fall back to #resetChildren(),
which calls offset-only loading that never recurses back.

* Fix undefined items array causing tree to break after deletion

This fixes the root cause of issue #20977 where deleting a document type
would cause the tree to "forever load" with a JavaScript error.

The error occurred in #getTargetResultHasValidParents() which called .every()
on data without checking if it was undefined. When the API returned undefined
items (e.g., after deleting the last child), this caused:

TypeError: can't access property "every", e is undefined

The fix adds a guard to check if data is undefined before calling .every(),
returning false in that case to trigger the proper error handling flow.

* Address code review feedback on terminal fallback method

- Change error throwing to silent return for graceful failure handling
- Remove target pagination state updates from offset-only loading method
- Update JSDoc to clarify that method does not throw errors
2025-12-01 20:12:23 +01:00
Andy Butland 35f73a8a31 Migrations: Set a long timeout by default on the migration of system dates (closes #21013) (#21022)
Set a long timeout by default on the migration of system dates.
2025-12-01 19:24:26 +01:00
Andy ButlandandGitHub 24b3f11329 Migrations: Set a long timeout by default on the migration of system dates (closes #21013) (#21022)
Set a long timeout by default on the migration of system dates.
2025-12-01 19:13:55 +01:00
Andy Butland 025a4e056f Merge branch 'release/17.0'
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	version.json
2025-12-01 19:06:16 +01:00
Andy Butland 822a2fcf70 Migrations: Ensure umbracoPropertyData column casing (#21015)
* Add migration to fix umbracoPropertyData column casing.

* Improve migration with column existence check and logging

- Add ILogger to log when column is renamed
- Check if column exists with incorrect casing before renaming
- Use fluent Rename API instead of raw SQL
- Add XML remarks documentation

?? Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Clarify what old and new column name really is

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: kjac <kja@umbraco.dk>
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
2025-12-01 19:01:55 +01:00
34aabb8413 Migrations: Ensure umbracoPropertyData column casing (#21015)
* Add migration to fix umbracoPropertyData column casing.

* Improve migration with column existence check and logging

- Add ILogger to log when column is renamed
- Check if column exists with incorrect casing before renaming
- Use fluent Rename API instead of raw SQL
- Add XML remarks documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Clarify what old and new column name really is

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: kjac <kja@umbraco.dk>
2025-12-01 17:47:31 +00:00
Laura NetoandGitHub 1d59e20daa Delivery API: Missing Member Open API security scheme references (#21020)
Use AddComponent for OpenAPI security scheme registration

Fixes security requirements being serialized as empty objects in the
OpenAPI document by using the document's AddComponent method instead
of directly manipulating the SecuritySchemes dictionary.
2025-12-01 17:24:28 +01:00
Mads RasmussenandGitHub 1c922f34f5 Table Collection View: Update table view icon to 'icon-table' (#20970)
Update table view icon to 'icon-table'

Replaces the 'icon-list' icon with 'icon-table' for all table view manifests across multiple packages to improve consistency and better represent the table view visually.
2025-12-01 16:09:55 +00:00
Mads RasmussenandGitHub 18bbf5609b Data Type Workspace: Enable client mandatory field validation for configuration properties (#20799)
* Add validation property to PropertyEditorSettingsProperty

Introduces a 'validation' field to the PropertyEditorSettingsProperty interface, allowing configuration of mandatory status and custom mandatory messages for property editor settings.

* Pass validation property to umb-property component
2025-12-01 16:03:14 +00:00
0210e942ed Folder Workspace: Support menu expansion and breadcrumbs (closes #20675) (#20712)
* add menu context and breadcrumbs for document type folders

* add menu context and breadcrumbs for media type folders

* add menu context and breadcrumbs for media type folders

* add menu context and breadcrumbs for partial view folders

* add menu context and breadcrumbs for partial view folders

* add menu context and breadcrumbs for script folders

* Register menu structure workspace contexts and breadcrumbs for document blueprints

* fix menu alias

* remove from blueprints

* fix wrong path when navigating from an inner folder to an outer

* remove debugger

* fix structure link between variant to invariant

* fix up path generation

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-12-01 14:00:00 +00:00
bbc0f1f894 Upgrade: Deprecates Mangement API controller for defunct our.umbraco.com version checker (#21011)
* fix: deprecates the upgrade checker

* fix: removes any deprecated UI that no longer has a function for upgrade checks in the backoffice

* chore: generates new api types

* chore: deprecates types

* chore: returns direct task

* docs: explains deprecation

* chore: deprecated model

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-12-01 12:50:51 +00:00
Mole 75b40e79a2 Cache: Add awaits to memory cache rebuilds to fix race conditions (#20960)
* Await rebuilds and fix multiple open DataReaders

* Add additional missing awaits

(cherry picked from commit eaf5960a4d)
2025-12-01 13:46:23 +01:00
09844204b7 History: Take URL objects into consideration when storing Backoffice history (#20986)
* fix: allows URL to be passed to navigator

* Also adds fix to Block workspace

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-12-01 12:29:07 +00:00
Kenn JacobsenandGitHub 1c4b4c90c9 Rendering: Don't use element cache level on snapshot cache level properties (#21006)
Don't use element cache level on snapshot cache level propreties
2025-12-01 12:52:35 +01:00
820c34432a Preview: Fix preview showing published version when Save and Preview is clicked multiple times (closes #20981) (#20992)
* Fix preview showing published version when Save and Preview is clicked multiple times

Fixes #20981

When clicking "Save and Preview" multiple times, the preview tab would show the published version instead of the latest saved version. This occurred because:

1. Each "Save and Preview" creates a new preview session with a new token
2. The preview window is reused (via named window target)
3. Without a URL change, the browser doesn't reload and misses the new session token
4. The stale page gets redirected to the published URL

Solution: Add a cache-busting parameter (?rnd=timestamp) to the preview URL, forcing the browser to reload and pick up the new preview session token. This aligns with how SignalR refreshes work.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Improve Save and Preview to avoid full page reloads when preview is already open

When clicking "Save and Preview" multiple times with a preview tab already open, the entire preview tab would reload. This enhancement makes it behave like the "Save" button - only the iframe reloads, not the entire preview wrapper.

Changes:
- Store reference to preview window when opened
- Check if preview window is still open before creating new session
- If open, just focus it and let SignalR handle the iframe refresh
- If closed, create new preview session and open new window

This provides a smoother UX where subsequent saves don't cause the preview frame and controls to reload, only the content iframe refreshes via SignalR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Close preview window when ending preview session

Changes the "End Preview" behavior to close the preview tab instead of navigating to the published URL. This provides a cleaner UX and ensures subsequent "Save and Preview" actions will always create a fresh preview session.

Benefits:
- Eliminates edge case where preview window remains open but is no longer in preview mode
- Simpler behavior - preview session ends and window closes
- Users can use "Preview website" button if they want to view published page

Also removes unnecessary await on SignalR connection.stop() to prevent blocking if the connection cleanup hangs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix preview cookie expiration and add proper error handling

This commit addresses cookie management issues in the preview system:

1. **Cookie Expiration API Enhancement**
   - Added `ExpireCookie` overload with security parameters (httpOnly, secure, sameSiteMode)
   - Added `SetCookieValue` overload with optional expires parameter
   - Marked old methods as obsolete for removal in Umbraco 19
   - Ensures cookies are expired with matching security attributes

2. **PreviewService Cookie Handling**
   - Changed to use new `ExpireCookie` method with explicit security attributes
   - Maintains `Secure=true` and `SameSite=None` for cross-site scenarios
   - Uses new `SetCookieValue` overload with explicit expires parameter
   - Properly expires preview cookies when ending preview session

3. **Frontend Error Handling**
   - Added try-catch around preview window reference checks
   - Handles stale window references gracefully
   - Prevents potential errors from accessing closed window properties

These changes ensure preview cookies are properly managed throughout their
lifecycle and support both same-site and cross-site scenarios (e.g., when
the backoffice is on a different domain/port during development).

Fixes #20981

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Track document ID for preview window to prevent reusing window across different documents

When navigating from one document to another in the backoffice, the preview window reference was being reused even though it was showing a different document. This meant clicking "Save and Preview" would just focus the existing window without updating it to show the new document.

Now we track which document the preview window is showing and only reuse the window if:
1. The window is still open
2. The window is showing the same document

This ensures each document gets its own preview session while still avoiding unnecessary full page reloads when repeatedly previewing the same document.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove updates to ICookieManager and use Cookies.Delete to remove cookie.

* Fix file not found on click to save and preview.

* Removed further currently unnecessary updates to the cookie manager interface and implementation.

* Fixed failing unit test.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-12-01 11:16:35 +00:00
b40ea0df8c Content Type Workspace: Create condition that checks content type uniques. (#20906)
* Created condition for workspace content type unique.

* Changed import.

* Revert import.

* Updated name in the alias example and also import.

* Update src/Umbraco.Web.UI.Client/examples/entity-content-type-condition/index.ts

Co-authored-by: Mads Rasmussen <madsr@hey.com>

* Update src/Umbraco.Web.UI.Client/examples/entity-content-type-condition/workspace-view-unique.element.ts

Co-authored-by: Mads Rasmussen <madsr@hey.com>

* Moved the manifest definition to the manifest file.

* Changed default export.

* Updated example element to render the real GUID.

* Fixed import.

* Replaced CONTENT_WORKSPACE for PROPERTY_STRUCTURE_WORKSPACE context.

* Moved content type unique condition to the content type folder.

* Fixed import.

* final adjustments

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-12-01 11:01:09 +01:00
050b37ed1a Installer: Removes unused telemetry functionality (#20995)
* fix: removes the non-functioning installer telemetry and obsoletes all InstallHelper functionality

* fix: deprecates related cookie

* fix: adds ActivatorUtilitiesConstructor for DI

* fix: obsoletes and removes more telemetry functionality

* fix: removes uneeded modifier

* docs: removes docs

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-28 22:21:04 +01:00
f99e9394f8 Culture and Hostnames: Add ability to sort hostnames (closes #20691) (#20826)
* Adding the sorter controller, and fixing some ui elements so you are able to drag the hostname elements around to sort them

* Fixed sorting

* Changed the html structure and tweaked around with the css to make it look better.
Added a description for the Culture section.
Alligned the rendered text to allign better with the name "Culture and Hostnames"

* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts

Forgot to remove this after I was done testing

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts

Changing grid-gap to just gap

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Removed the disabled and readonly props I added since they are not needed.
Removed the conditional rendering that was attached to the readonly and disabled properties

* Removed the item id from the element and changed css and sorter logic to target the hostname-item class instead

* Updated test

* Bumped helpers

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2025-11-28 10:06:20 +01:00
Andy ButlandandGitHub 9c038bc68b Re-enable package validation (#20964)
* Re-enable package validation.

* Remove unnecessary supressions file.

* Removed unnecessary suppressions.

* Restored and obsoleted all overload.
2025-11-28 09:48:06 +01:00
e6b99938db Delivery API: Only add default strategy if delivery API is not registered. (#20982)
* Only add if not already present

* Update src/Umbraco.Cms.Api.Management/DependencyInjection/WebhooksBuilderExtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-11-28 08:25:06 +01:00
Zeegaan 5ab93454d9 Bump version 2025-11-28 10:58:04 +09:00
Warren BuckleyandGitHub f44e9328d7 Extensions: Adds all yet unused Lit directives to @umbraco-cms/backoffice/external/lit (closes #20961) (#20963)
* Adds choose directive to @umbraco-cms/backoffice/external/lit

This can then allow choose to be imported like so
import { html, customElement, LitElement, property, css, choose } from '@umbraco-cms/backoffice/external/lit';

* Exports all of Lits directives for @umbraco-cms/backoffice/external/lit

Also puts them in alphabetical order to help add any new ones Lit may add in the future
2025-11-27 15:22:50 +00:00
Jacob Overgaard ec11714b4b Merge remote-tracking branch 'origin/v16/dev' 2025-11-27 15:46:27 +01:00
Lee KelleherandGitHub 615cb76288 Block editors: adds prefix to workspace title (closes #20588) (#20884)
* Adds `$settings` to the block workspace label renderer

* Adds a prefix to the Block workspace title

* Imports tidy-up
2025-11-27 15:39:27 +01:00
Sven GeusensandGitHub c61bcca066 Add Claude memory files for all relevant project files (#20959)
* Regenerate delivery api claud memory file for updated file lines and inclusion of Secure Cookie-Based Token Storage

* Add delivery api memory file

* claude memory file for in memory modelsbuilder project

* Claud memory file for Imagesharp project

* Claude memory file for legacy image sharp project

* Claude memory files for Persistence projects

* Remaining claude memory files
2025-11-27 10:47:19 +01:00
MoleandGitHub eaf5960a4d Cache: Add awaits to memory cache rebuilds to fix race conditions (#20960)
* Await rebuilds and fix multiple open DataReaders

* Add additional missing awaits
2025-11-26 15:02:07 +01:00
Niels LyngsøandGitHub ff8cbb8b81 PropertyGuards: improved argument names and JSDocs (#20949)
improved argument names and JSDocs
2025-11-26 10:44:38 +01:00
Niels LyngsøandGitHub a364c9e86d Content Property: Remove unused 'entityType'-property (#20948)
remove unused property
2025-11-26 10:41:41 +01:00
ce98184178 Log Viewer: Enhances the donut chart to be responsive, link to log search, and show numbers directly (#20928)
* Log Viewer: Refactor log types chart to use Lit repeat directive

- Import and use repeat directive for better performance
- Add _logLevelKeys state property to track log level keys
- Update setLogLevelCount() to populate _logLevelKeys
- Replace .map() with repeat() in render method for legend and donut slices
- Update willUpdate to observe both filter and response changes
- Resolves TODO comment about using repeat directive

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Donut Chart: Add inline numbers and fix tooltip positioning

- Add showInlineNumbers property to optionally display numbers inside slices
- Implement #getTextPosition() method to calculate text position at slice center
- Render SVG text elements when showInlineNumbers is enabled
- Fix tooltip positioning to appear near cursor (changed from x-10, y-70 to x+10, y+10)
- Recalculate container bounds on each mouse move to handle window resize
- Add pointer-events: none to tooltip to prevent mouse interference
- Add CSS styling for slice numbers (user-select: none)
- Enable inline numbers by default in log viewer log types chart

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Donut Chart: Add clickable slices and visible description

- Add href property to donut-slice element for clickable slices
- Wrap SVG paths in <a> tags when href is provided
- Update Circle interface to include href property
- Add showDescription property to optionally display description text
- Render description as visible text below the chart
- Add CSS styling for description text
- Update log-types-chart to build search URLs with log level and date range
- Observe dateRange from context to build accurate search URLs
- Enable clickable slices and visible description in log-types-chart

Now clicking on a donut slice navigates to the search view filtered by that log level and the current date range.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: uses whole link

* Log Viewer: Fix log types chart layout for larger screens

Add media query to switch from column to row layout on screens wider than 768px. This ensures the legend and donut chart are displayed side by side on desktop resolutions instead of stacked vertically.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: improves mock function

* chore: formatting

* fix: ensures the donut chart works responsively

* feat: adds support for SVGAElement in the router

* adds key for description

* chore: adds test data

* feat: displays numbers in the legend instead of the chart

* chore: restores functionality with lower-cased keys

* fix: adds translation to 'log messages'

* chore: removes unused method

* feat: ensures that the log levels follow the generated LogLevelModel enum from the server, which requires to map the keys as JSON camelCase's the keys

* fix: uses correct property

* fix: reverts back to the original behavior to calculate a relative URL (rather than the automatic .toString() that gets a qualified URL)

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: uses fullUrl for router

* fix: properly translates new aria-label

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-26 09:28:44 +00:00
Nhu DinhandGitHub 69e2f8df74 E2E: QA Added acceptance tests for notification emails (#20918)
* Added tests for notification emails for content

* Bumped version

* Updated tests for notification permission in content

* Added appsettings.json for smtp tests

* Added smtp test project

* Updated nightly E2E test pipeline yaml file to run smtp project in the pipeline

* Fixed command to run smtp4dev in Docker

* Fixed pipeline

* Only run smtp tests on Linux

* Debugged

* Debugging

* Added step to stop smtp4dev container

* Debugging

* Updated port

* Reverted tests

* Added more tests for notification emails

* Formatted code
2025-11-26 07:34:36 +00:00
Andy Butland 4b3ce53acf Merge branch 'release/16.4' into v16/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-11-26 07:18:09 +01:00
Andy Butland bd33246525 Merge branch 'release/17.0'
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-11-25 15:58:55 +01:00
ef282a5211 docs: Add CLAUDE.md documentation for key .NET projects (#20841)
* docs: Add CLAUDE.md documentation for key .NET projects

Add comprehensive CLAUDE.md files for major Umbraco projects:
- Root CLAUDE.md: Multi-project repository overview
- Umbraco.Core: Interface contracts and domain models
- Umbraco.Infrastructure: Implementation layer (NPoco, migrations, services)
- Umbraco.Cms.Api.Common: Shared API infrastructure
- Umbraco.Cms.Api.Management: Management API (1,317 files, 54 domains)
- Umbraco.Web.UI.Client: Frontend with split docs structure

Each file includes:
- Architecture and design patterns
- Project-specific workflows
- Edge cases and gotchas
- Commands and setup
- Technical debt tracking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update src/Umbraco.Cms.Api.Management/CLAUDE.md

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* docs: Update CLAUDE.md with accurate persistence and auth info

- Clarify NPoco is current and fully supported (not legacy)
- Document EF Core as future direction with ongoing migration
- Add secure cookie-based token storage details for v17+
- Update OpenIddict authentication documentation
- Update API versioning (v1.0 and v1.1)
- Minor documentation cleanups (community links, descriptions)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update src/Umbraco.Web.UI.Client/docs/agentic-workflow.md

* Update src/Umbraco.Web.UI.Client/docs/agentic-workflow.md

* Apply suggestions from code review

* Clarifications and duplicate removal.

---------

Co-authored-by: Phil Whittaker <pjw@umbraco.dk>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Sven Geusens <geusens@gmail.com>
2025-11-25 14:37:49 +00:00
Andy ButlandandGitHub 1240d845d4 Dependencies: Updates some dependencies to latest minor or patch releases (#20953)
Updates some dependencies to latest minor or patch releases for 17.1.
2025-11-25 13:55:15 +01:00
20cfdb9c0a Login Screen: Fix css for login screen dark mode (#20922) (#20946)
* Fix css for login screen dark mode

* Removes the outer-layout wrapper, moving the flexbox to the host

Sets the fallback for `--umb-auth-backdrop` to `--uui-color-surface`

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-11-25 12:17:53 +00:00
Andy Butland ca267047d3 Bumped version to 16.4.0. 2025-11-25 12:32:28 +01:00
Lee KelleherandGitHub 4fe60f360f Block Catalogue: Localizes block-type name/description before render (closes #20890) (#20904)
Block Catalogue: Localizes block-type name/description before render

Fixes #20890.
2025-11-25 10:33:11 +00:00
Jacob OvergaardandGitHub 439c1dccd3 Log Viewer: Adds localization in the Backoffice UI + cleans up unused keys (#20923)
* fix: adds localization to the log viewer

* fix: missing log viewer keys for English

* fix: translations for Danish

* fix: removes unused keys and replaces polling keys

* fix: lowercases values to match what was there before
2025-11-25 10:17:32 +00:00
a41c48ad6c Multi URL Picker: change validation for url and anchor/querystring (#20920)
* Fix validation for url and anchor of multi url picker

* fix codesence warning

* remove redundant validation

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-11-25 10:07:21 +00:00
Andy Butland da502e06ae Bump version to 17.0.0. 2025-11-25 09:53:36 +01:00
Andy ButlandandGitHub cf265e248b Examine Management: Allow selection of all available fields in Examine search results, and fix layout issue when not all records have all fields (closes #20878 and #20879) (#20909)
* Allowed selection of all available fields in Examine search results, and fix layout issue when not all records have all fields.

* Updates from code review.
2025-11-24 17:57:10 +00:00
Mads RasmussenandGitHub fd5077d823 Example Docs: Add menu item examples (#20910)
Add menu item registration examples

Introduces example implementations for registering action, link, and entity menu items in the backoffice. Includes manifests and API to demonstrate how to extend the menu system.
2025-11-24 16:32:53 +00:00
3d90fffccd UFM: Update contentName component to respect current backoffice culture. (#20927)
* Updated the content-name element to use the DocumentItemDataResolver.

* Import sorting

* Defaults the entity-type to "document"

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-11-24 16:23:35 +00:00
Jacob Overgaard 8f2532a28a Merge remote-tracking branch 'origin/release/17.0' 2025-11-24 16:32:38 +01:00
Jacob Overgaard bfa3ff4042 Merge remote-tracking branch 'origin/v16/dev' 2025-11-24 16:31:29 +01:00
Jacob Overgaard 0543163817 bumps version to 16.5.0-rc 2025-11-24 16:29:11 +01:00
Jacob Overgaard 72f43a5821 Merge branch 'release/16.4' into v16/dev 2025-11-24 16:28:24 +01:00
aea9034adf Localization: Restores region-specific cultures (#20939) (#20942)
* Adds localization manifests for region-specific cultures

This is to support backwards-compatibility and v13 upgradability.

* Removed `uiCulture` from Vietnamese localizations

since it duplicated the English fallback texts.

* 'en' localization file formatting

* Update src/Umbraco.Web.UI.Client/src/assets/lang/en.ts



---------

Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-24 15:27:35 +00:00
Jacob Overgaard 6e6f822761 bumps version to 16.4.0-rc3 2025-11-24 15:24:58 +01:00
Niels LyngsøandGitHub 137aa20a10 Block Editors: avoid discard changes for no changes (Fixes #20680) (#20941)
* ensure Block List only updates if it has an update

* ensures RTE and Grid Block Editor ony updates value if there is a change
2025-11-24 14:04:59 +00:00
2b7efbe861 Localization: Restores region-specific cultures (#20939)
* Adds localization manifests for region-specific cultures

This is to support backwards-compatibility and v13 upgradability.

* Removed `uiCulture` from Vietnamese localizations

since it duplicated the English fallback texts.

* 'en' localization file formatting

* Update src/Umbraco.Web.UI.Client/src/assets/lang/en.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-24 14:41:24 +01:00
Niels LyngsøandGitHub 4138262a19 Examples: updated naming of example (#20938)
updated naming of example
2025-11-24 12:38:10 +00:00
Niels LyngsøandGitHub ea840bcfde Front-end Example: Initial name example (#20899)
initial name example
2025-11-24 12:37:43 +00:00
9beed532a9 Update Swashbuckle to v10 (#20925)
* Update Swashbuckle to v10

* Regenerate backoffice api client

* Add missing space for consistency

* Simplify nullability check

* Small improvement

Didn't notice that these classes were internal, so tried keeping compatibility, but it wasn't needed.

* Fix failing integration test

* Apply suggestions from code review

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove unnecessary comma

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-24 12:06:03 +01:00
Jacob OvergaardandGitHub 215c4dc540 build(deps): bump @microsoft/signalr to 10.0.0 (#20932) 2025-11-24 10:23:08 +00:00
Jacob OvergaardandGitHub f19aaaee52 build(deps): bump marked to 17.0.1 (#20933) 2025-11-24 10:07:45 +00:00
Andy ButlandandGitHub dc50a6e8c3 Update further dependencies for 17 (#20935)
Update further dependencies.
2025-11-24 09:42:35 +00:00
12611942ff Permissions: Protect GetIdsFromPathReversed against invalid program exception (#20930)
* Updates to protect GetIdsFromPathReversed against invalid program exception.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-24 10:19:37 +01:00
04f98a758d Log viewer: Improves search functionality and code quality (#20913)
* fix: adds correct fallback for dates to avoid console error

* fix: resolves a TODO by using UmbStringState over rxjs Subject

* Refactor log viewer search to use UmbStringState and improve architecture

- Replace RxJS Subject with UmbStringState to follow Umbraco patterns
- Move debounced search observation to messages list component
  - Only triggers when component is mounted (logs are visible)
  - Prevents unnecessary API calls on other views
- Simplify search input to just update context state
- Add semantic form structure with role="search" for accessibility
- Add visually-hidden submit button for keyboard navigation
- Allow re-running same query via form submission (bypasses debounce)
- Follow same architecture pattern as date range selector

This resolves the TODO to not use RxJS directly and significantly improves
separation of concerns where the data consumer (messages list) owns the
fetching logic.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add visible refresh button to log viewer search input

- Add refresh button with icon-refresh next to save and clear buttons
- Allows users to re-run search with same query (bypasses debounce)
- Remove form structure that couldn't work due to Shadow DOM boundaries
- Simplify parent component by removing form submission logic
- Keep role="search" for accessibility

The refresh button provides a more discoverable UI than the hidden submit
button approach and avoids Shadow DOM event bubbling issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix debouncing by adding local state in search input

- Add local UmbStringState to debounce user input (250ms)
- Only update context filterExpression after debounce
- Remove debouncing from messages list (now handled at input level)
- Saved searches and refresh button still bypass debounce for immediate feedback

This restores the expected debouncing behavior while maintaining the clean
architecture where the messages list triggers searches based on context changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: cleans up in docs

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-24 08:44:45 +00:00
Nhu DinhandGitHub bb88be9d2e E2E: QA Updated .fixme() acceptance tests (#20919)
* Added steps to wait for upload to complete

* Update tests for content with media picker

* Removed fixme tags

* Updated fixme tests

* Bumped version
2025-11-24 12:56:52 +07:00
Nhu DinhandGitHub 60b886dc9c E2E: Updated the failing Default Config tests (#20818)
* Updated block list tests as the “Add Block” button is hidden after reaching the maximum limit.

* Updated validation option due to UI changes

* Updated tests for current user profile as waitForNetworkToBeIdle() is removed

* Fixed flaky tests

* Bumped version

* Updated tests for current user profile

* Bumped version
2025-11-24 12:54:36 +07:00
Callum WhyteandZeegaan d7231c5435 Preserve existing Examine FieldDefinitionCollection if it already exists (#20931)
* Preserve existing Examine FieldDefinitionCollection if it already exists (#20267)

* Fix missing bracket

* Minor tidy/addition of comments; addition of unit tests.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
(cherry picked from commit 908974c6ac)
2025-11-24 12:47:08 +09:00
908974c6ac Preserve existing Examine FieldDefinitionCollection if it already exists (#20931)
* Preserve existing Examine FieldDefinitionCollection if it already exists (#20267)

* Fix missing bracket

* Minor tidy/addition of comments; addition of unit tests.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-11-24 09:53:38 +09:00
Niels LyngsøandGitHub 488f373fea Properties: Implement container queries (#20832)
implement container queries for properties
2025-11-21 13:10:36 +01:00
35acfcb7e2 Trashbin: introduce a empty trash icon (#20629)
* add empty trash icon and use it for empty trash-bin and delete from trash-bin

* package lock

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-11-21 13:05:49 +01:00
Niels LyngsøandGitHub 2939eb4f81 Bock Type Card: make actions stand clear from thumbnail/color (#20895)
clean up and make actions stand clear from custom background colors/images
2025-11-21 11:19:34 +01:00
netaddicts-councilandGitHub 2f02bee421 Sets the default name for the content listview workspace name to 'Child items' instead or 'Collection' (#20907)
Sets the default name for thecontent listview workspace name to 'Child items' instead of 'Collection' (Fixes #20860)
2025-11-20 16:03:25 +01:00
6a7360aded Member types: Implement containers (#20706)
* Add MemberType/MemberTypeContainer to supported EntityContainer object types

* Implement MemberTypeContainerRepository

* Update and add member type container API endpoints

* Complete server and client-side implementation for member type container support.

* Fix FE linting errors.

* Export folder constants.

* Applied suggestions from code review.

* Updated management API authorization tests for member types.

* Resolved breaking change on copy member type controller.

* Allow content types to be moved to own folder without error.

* Use flag providers for member type siblings endpoint.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-11-20 11:28:03 +01:00
Niels LyngsøandGitHub f70f6d4aba Content Type Designer: Only update tab name on change (#20786)
Do not update tab name on input, as it is inappropriate when having name conflicts
2025-11-20 09:37:22 +00:00
75dd9fab2b Redirect tracking: Ensure redirects with domains are stored with the domain node id prefix (closes #20894) (#20900)
* Ensure redirects with domains are stored with the domain node id prefix.

* Handle removal of self-referencing redirect when domains are used.

* Use entity path to save further queries for retrieving ancestor IDs.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Applied refactoring suggested in code review.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-20 16:30:38 +09:00
Jacob Overgaard 1e64c8d5af bump version to 17.0.0-rc4 2025-11-20 08:11:41 +01:00
2f6fb7e395 Block-grid, Block-list: Fix issue translation in clipboard is missing (#20756) (#20903)
Fix issue translation in clipboard

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-11-20 07:14:51 +01:00
Lars-Erik AabechandGitHub 43bdad59b6 Integration Tests: Use empty temp folder for legacy lang config when using integration tests outside core (closes #20888) (#20889)
* Use empty folder under temp as localized text source folder in non umbraco core integration tests.

* Added clarifying comment to the GetLocalizedTextService override for tests
2025-11-20 06:54:35 +01:00
Niels Lyngsø 61a5d26a93 Merge branch 'release/17.0' 2025-11-19 17:10:34 +01:00
Niels Lyngsø e45f232f44 update workspace context example readme 2025-11-19 17:10:04 +01:00
Andy Butland be116436d9 Migrations: Handles rich text blocks created with TinyMCE in convert local links migration and refreshes internal datatype cache following migration requiring cache rebuild (closes #20885) (#20887)
Handles rich text blocks created with TinyMCE in convert local links migration.
Refreshes internal datatype cache following migration requiring cache rebuild.
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/MigrationPlanExecutor.cs
2025-11-19 15:35:48 +01:00
Andy Butland 745d74104e Migrations: Handles rich text blocks created with TinyMCE in convert local links migration and refreshes internal datatype cache following migration requiring cache rebuild (closes #20885) (#20887)
Handles rich text blocks created with TinyMCE in convert local links migration.
Refreshes internal datatype cache following migration requiring cache rebuild.
2025-11-19 15:22:57 +01:00
Andy ButlandandGitHub a488d77ce7 Migrations: Handles rich text blocks created with TinyMCE in convert local links migration and refreshes internal datatype cache following migration requiring cache rebuild (closes #20885) (#20887)
Handles rich text blocks created with TinyMCE in convert local links migration.
Refreshes internal datatype cache following migration requiring cache rebuild.
2025-11-19 14:54:12 +01:00
386611bc70 TextBox, TextArea: Message max length validation (close #20710) (#20886)
* fix bug max length messsage

* change localization

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-11-19 14:24:32 +01:00
Niels Lyngsø cc8d90be91 Cherry picked 20733 2025-11-19 10:43:09 +01:00
Niels Lyngsø e2a8bea579 TODOs 2025-11-19 09:55:59 +01:00
Engiber LozadaandGitHub e46e65ef22 Content types: Apply text selection when unlocking alias (#20882)
Added requestAnimationFrame for alias text selection.
2025-11-18 16:17:35 +01:00
Kenn JacobsenandGitHub 95c9d48b6e Rendering: Don't cache RTE value conversion (closes #20867) (#20880)
Don't cache RTE rendering.
2025-11-18 15:36:18 +01:00
Nhu DinhandGitHub a59476a043 E2E: QA Updated tests with the .skip tag (#20739)
* Removed skips for tests whose related issues have been fixed.

* Remove skip tags and update tests for content with list view

* Removed skip tags

* Added comment and change to fixme for tests that need to implement later

* Removed skip tag

* Bumped version
2025-11-18 11:37:53 +00:00
c1b3f41f7c TextBox: Data-type validation for max chars (fixes #18817) (#20843)
* configure max chars for textbox

* min 1

* Adds server-side check for text box min and max character validation.

* Applied suggestion from code review.

* Bumped version of test helper

* Fixed test that was creating a text string data type with too large a maximum characters setting.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
2025-11-18 08:16:59 +01:00
Jacob OvergaardandGitHub 92b5d11c95 Backoffice Preview: Adds notice that the site is not real (#20864)
feat: adds notice to the static backoffice site explaining to the reader that the content is not real
2025-11-17 18:31:55 +01:00
Jacob Overgaard b5ffe8930b chore: fixes merge conflict 2025-11-17 17:20:14 +01:00
Jacob Overgaard a89437e309 test: uses a real non-date value for testing 2025-11-17 17:17:59 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
b8c31350fb Bump the npm_and_yarn group across 2 directories with 1 update (#20863)
Bumps the npm_and_yarn group with 1 update in the /src/Umbraco.Web.UI.Client directory: [js-yaml](https://github.com/nodeca/js-yaml).
Bumps the npm_and_yarn group with 1 update in the /src/Umbraco.Web.UI.Login directory: [js-yaml](https://github.com/nodeca/js-yaml).


Updates `js-yaml` from 4.1.0 to 4.1.1
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

Updates `js-yaml` from 4.1.0 to 4.1.1
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-17 16:01:59 +00:00
Jacob Overgaard bf35477399 chore: fixes merge conflict 2025-11-17 16:59:25 +01:00
Jacob Overgaard 45c8be4bb7 Merge remote-tracking branch 'origin/v16/dev' 2025-11-17 16:40:11 +01:00
Jacob Overgaard aed7505e4b Merge remote-tracking branch 'origin/release/16.4' into v16/dev 2025-11-17 16:39:38 +01:00
Jacob Overgaard 9035f160fe Merge remote-tracking branch 'origin/release/17.0' 2025-11-17 16:37:58 +01:00
MoleandGitHub 57c66faf40 Update microsoft packages to non rc version (#20858)
* Update RC2 packages to 10.0.0

* Also update hybrid cache project
2025-11-17 15:26:30 +00:00
Niels LyngsøandGitHub 08990b9147 Document input: Find variant name (#20853)
* ability to override get name

* implement document name method
2025-11-17 14:41:47 +00:00
Engiber LozadaandGitHub eae35a27ab Block Entry Context: Update the settingsPropertyValueByAlias to observe settings. (#20861)
Replaced content for settings in the settingsPropertyValueByAlias.
2025-11-17 13:54:30 +00:00
Laura NetoandGitHub 6d44b42400 Use dependency track devops task (#20854)
* Replace dependency track bom script with devops task

* Introduce new url variable in order to fix new task uri

The initial variable contained the api path (/api) in the URL.
2025-11-17 14:54:03 +01:00
590a020303 Redact back-office PKCE codes from the server (V16) (#20851)
Redact back-office PKCE codes from the server (#20847)

* Redact back-office PKCE codes from the server

* Update src/Umbraco.Cms.Api.Common/DependencyInjection/HideBackOfficeTokensHandler.cs

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-11-17 11:17:18 +01:00
23fc355e61 Redact back-office PKCE codes from the server (#20847)
* Redact back-office PKCE codes from the server

* Update src/Umbraco.Cms.Api.Common/DependencyInjection/HideBackOfficeTokensHandler.cs

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-11-17 09:50:31 +01:00
Niels LyngsøandGitHub b868a349de Block list: ensure block items stay top-aligned when sorting (#20842)
ensure block items stay top-aligned when sorting
2025-11-15 08:32:18 +01:00
Warren BuckleyandGitHub 1fedaa3d8f Removes npm commands from MSBuild of the CSPROJ for umbraco-extension dotnet new template (#20839)
* Removes npm commands from the MSBuild of the CSPROJ of the umbraco-extension dotnet new template

Was agreed by the community package team to remove this, as this DX can cause more issues than actually help users in our opinion

* Removed the unused value - good catch by Copilot
2025-11-14 21:25:19 +01:00
43230dfac8 Redirects: Fixes self referencing redirects (closes #20139) (#20767)
* Adding fix for self-referncing redirects for 17

* Using umbraco context on failing tests

* Tests to see if self referencing redirects gets deleted

* Refactoring and adding correct tests.

* Expanding tests for RedirectTrackerTests.cs

* Optimize by only retrieving th list of existing URLs for a content item if we have a valid route to create a redirect for.

* Extract method refactoring, added explanatory comment, fixed warnings and formatting.

* Resolved warnings in RedirectService.

* Minor naming and formatting refactor in tests.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-11-14 16:37:59 +00:00
ba7d550a74 Move access/refresh tokens to secure cookies (V17) (#20820)
* Move access/refresh tokens to secure cookies (#20779)

* feat: adds the `credentials: include` header to all manual requests

* feat: adds `credentials: include` as a configurable option to xhr requests (and sets it by default to true)

* feat: configures the auto-generated fetch client from hey-api to include credentials by default

* Add OpenIddict handler to hide tokens from the back-office client

* Make back-office token redaction optional (default false)

* Clear back-office token cookies on logout

* Add configuration for backoffice cookie settings

* Make cookies forcefully secure + move cookie handler enabling to the BackOfficeTokenCookieSettings

* Use the "__Host-" prefix for cookie names

* docs: adds documentation on cookie settings

* build: sets up launch profile for vscode with new cookie recommended settings

* docs: adds extra note around SameSite settings

* docs: adds extra note around SameSite settings

* Respect sites that do not use HTTPS

* Explicitly invalidate potentially valid, old refresh tokens that should no longer be used

* Removed obsolete const

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Remove configuration option

* Invalidate all existing access tokens on upgrade

* docs: updates recommended settings for development

* build: removes non-existing variable

* Skip flaky test

* Bumped version of our test helpers to fix failing tests

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2025-11-14 17:10:57 +01:00
Ronald BarendseandGitHub 0600df4211 Fix EntityContainer.GetUdi() for member type containers (#20840)
Fix EntityContainer.GetUdi() for member type containers
2025-11-14 16:09:46 +00:00
01b300336b Property Editors: Added form control and mandatory support to editors in picker group(Color, Content, Date, Document, Eye dropper, Multi URL). (#20684)
* Added form control support to color picker.

* Avoid submit when readonly is true.

* Added mandatory support.

* Added form control support to date picker.

* Removed an unused import.

* Added form control and mandatory support to document picker.

* Added form control support to Eye dropper.

* Added. mandatory support for multi url picker also bind inner input in the eye dropper.

* Removed unused import.

* fix update of value

* fixing not needed override of get and set methods

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-11-14 14:04:20 +00:00
EricandGitHub 6b4503cc7b Content Sorting: increase modal size (#20835)
Modal size increase for sorting content
2025-11-14 14:42:30 +01:00
Nicklas KramerandGitHub 06c566c074 News Dashboard: Replacing old hostname, with new custom one. (#20837)
Changing hostname of dashboard to a new custom one.
2025-11-14 13:33:35 +00:00
2a609e1eca Load Balancing: Clear request cache in cache version accessor on cache version update to prevent unnecessary cache roll forwards (#20831)
* Clear request cache on version update

* Update src/Umbraco.Core/Cache/IRepositoryCacheVersionAccessor.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-14 14:14:28 +01:00
NillasKA 342cb171eb Revert "Changing news dashboard URL to a new custom hostname"
This reverts commit e850c131e5.
2025-11-14 13:36:26 +01:00
NillasKA e850c131e5 Changing news dashboard URL to a new custom hostname 2025-11-14 13:31:06 +01:00
Andy ButlandandGitHub a4438e5b21 Decimal property editor: Flexibly parse decimal value with different separators (closes #20823) (#20828)
* Flexibly parse decimal value with different separators.

* Applied suggestions from code review.
2025-11-14 10:20:12 +09:00
73847d1eff Property Editors: Added form control and mandatory support to editors in rich content group(Code editor, Markdown, Block grid) (#20693)
* Added mandatory support for block grid property editor.

* Added form control and mandatory support to code editor.

* Added form control and mandatory support to markdown editor.

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-11-13 20:57:27 +00:00
Engiber LozadaandGitHub e549217e66 Content Type Designer: Use input-with-alias and implement regex validation for Alias. (#20755)
* Implemented input-with-alias in the content-type-design-editor.

* Added auto-generate-alias property to the input and revert deletion of checkAliasAutoGenerate method.

* Added form-validation-message.

* Added validation to the input-with-alias element to avoid special characters.
2025-11-13 20:42:48 +00:00
Engiber LozadaandGitHub 8b076597b3 Entity Sign: Improve Firefox visibility and add focus support. (#20733)
* Chenged right and left position of the infobox.

* Added focus support to open the modal.

* Moved tabindex out the constructor and added support for enter and space keys.
2025-11-13 20:37:54 +00:00
bbd30363a2 Media Picker: Remove duplicate loaders in media cards. (#20793)
* Removed isLoding condition from the rich media input and let the thumbnail handle the loader.

* Removed unused import.

* change loader and adjust lit property configuration

* update reflect configuration

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-11-13 20:38:32 +01:00
617d301479 Hides the content files that come from the Microsoft.CodeAnalysis.Workspaces.Common package in the web.ui project in 17 (#20825)
* Hide content files

* Update src/Umbraco.Web.UI/Umbraco.Web.UI.csproj

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-13 14:39:51 +00:00
Jacob Overgaard c48103cd30 bump lockfile 2025-11-13 15:16:23 +01:00
Jacob Overgaard 931041c635 Merge remote-tracking branch 'origin/v16/dev' 2025-11-13 14:19:10 +01:00
Jacob Overgaard 15c6ca7628 Merge remote-tracking branch 'origin/release/16.4' into v16/dev 2025-11-13 14:15:24 +01:00
Mathias HelsengrenandGitHub 714fbf3119 Keyboard navigation: Return to opening element after modal close (#20782)
Removed the detroy from the modelContext.
It being destroyed prevented the uui-button getting into focus again after closing the modal.
2025-11-13 12:55:45 +01:00
Jacob OvergaardandGitHub eeda55c06f Preview: Add validation support to Save and Preview button (closes #20616) (#20805)
* chore(mock): adds missing try/catch around document lookup

* fix: lets the 'save and preview' button extend the 'save' button to follow the same logic in terms of when it enables/disabled - it did not have much logic before

* fix: runs validation from the server when save and previewing to ensure the UI shows what is missing
2025-11-13 11:25:17 +00:00
Mads RasmussenandGitHub 20180c3180 Collection Item Picker: support icon colors (#20787)
Update icon usage in collection menu and example data

Replaces <uui-icon> with <umb-icon> in the default collection menu item element to support colors. Also updates example picker data source items to showcase color support.
2025-11-13 12:16:59 +01:00
Mads RasmussenandGitHub 89d487e449 Picker Data Source: update getConfigValue with alias-based type safety (#20802)
* Improve type safety in getConfigValue function

* Refactor config typing in example document picker

* Update index.ts

* add unit tests
2025-11-13 10:57:18 +01:00
Andy Butland 597eb58063 Merge branch 'release/17.0'
# Conflicts:
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-11-13 10:48:51 +01:00
b65d2b0ec7 Collection view test: update changes for v17 (#20812)
update extension for collection view test

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-11-13 16:00:21 +07:00
Kenn JacobsenandGitHub 640f9f2615 Use HTTPS by default (#20813) 2025-11-13 09:47:08 +01:00
f075223412 Relations: Exclude the relate parent on delete relation type from checks for related documents and media on delete, when disable delete with references is enabled (closes #20803) (#20811)
* Exclude the relate parent on delete relation type from checks for related documents and media on delete, when disable delete with references is enabled.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Applied suggestions from code review.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-13 09:32:18 +01:00
Engiber LozadaandGitHub d4d4b8a50a Content Type Designer: Always register root route to support drag-and-drop into empty Generic tab. (#20809)
Always register root route to enable drag-drop on empty Generic tab.
2025-11-13 09:19:33 +01:00
49ba89c22a Move access/refresh tokens to secure cookies (#20779)
* feat: adds the `credentials: include` header to all manual requests

* feat: adds `credentials: include` as a configurable option to xhr requests (and sets it by default to true)

* feat: configures the auto-generated fetch client from hey-api to include credentials by default

* Add OpenIddict handler to hide tokens from the back-office client

* Make back-office token redaction optional (default false)

* Clear back-office token cookies on logout

* Add configuration for backoffice cookie settings

* Make cookies forcefully secure + move cookie handler enabling to the BackOfficeTokenCookieSettings

* Use the "__Host-" prefix for cookie names

* docs: adds documentation on cookie settings

* build: sets up launch profile for vscode with new cookie recommended settings

* docs: adds extra note around SameSite settings

* docs: adds extra note around SameSite settings

* Respect sites that do not use HTTPS

* Explicitly invalidate potentially valid, old refresh tokens that should no longer be used

* Removed obsolete const

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-11-13 08:19:42 +01:00
Andy Butland 14f4c54312 Bumped version to 17.0.0-rc3. 2025-11-13 07:11:35 +01:00
Andy Butland c295271757 Bumped version to 16.4.0-rc2. 2025-11-13 06:39:10 +01:00
139b528bda Database migrations: Support DateOnly and TimeOnly in syntax providers (#20784)
* sql column type map include dateonly and timeonly

* Split Mapper and add check null value

* Minor code tidy resolving a few warnings.

* add spaces

* clean code

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-11-13 11:10:51 +07:00
ca15aadf0e Fix for partial view caches not being cleared when content is publish… (#20794)
* Fix for partial view caches not being cleared when content is published/unpublished

* Update src/Umbraco.Core/Cache/Refreshers/Implement/ContentCacheRefresher.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Change logic for clearing partial view cache

* Changed logic to only clear partial cache when content is published/unpublished or trashed

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-11-13 09:21:26 +09:00
Andreas ZerbstandGitHub c60cf90ffe E2E: QA added entity picker acceptance tests (#20776)
* Added entity picker settings

* Updated tests

* Updated nightly pipeline

* Updated tests

* Bumped versions

* Fixed indentation

* Added comments

* Cleaned up

* Removed duplicate

* Bumped version

* Updated naming
2025-11-12 10:18:53 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Nhu Dinh
c9fc2f2a19 Bump playwright and @playwright/test in /tests/Umbraco.Tests.AcceptanceTest (#20579)
* Bump playwright and @playwright/test

Bumps [playwright](https://github.com/microsoft/playwright) to 1.56.1 and updates ancestor dependency [@playwright/test](https://github.com/microsoft/playwright). These dependencies need to be updated together.


Updates `playwright` from 1.50.0 to 1.56.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.50.0...v1.56.1)

Updates `@playwright/test` from 1.50.0 to 1.56.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.50.0...v1.56.1)

---
updated-dependencies:
- dependency-name: playwright
  dependency-version: 1.56.1
  dependency-type: indirect
- dependency-name: "@playwright/test"
  dependency-version: 1.56.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bumped version of test helper

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
2025-11-12 13:33:21 +07:00
Andy ButlandandGitHub cbdb1d567f Dependencies: Update to .NET 10 (#20796)
Update to .NET 10.
2025-11-11 19:18:17 +00:00
Niels LyngsøandGitHub 31072bab51 Stop using promise.reject to avoid the promise to resolve. (#20790) 2025-11-11 13:43:28 +00:00
9ad4a7eeba Adds Clear Clipboard button & logic (#20757)
* Adds new dictionary/localization item for the clipboard dialog clear all prompt

* Removes the wrapping uui-box and moved inside the component itself

* Adds Clear Clipboard button and logic

* Adds uui-box from outer components consuimg this into this component
* Adds a header to uui-box
* Adds a conditional uui-button when we have items in clipboard
* Adds confirm dialog/prompt to ask if user wants to clear all items

* Adds in general_clipboard item to use in the UUI-box header

* Removes extra space & moves the requestItems outside the for loop

* Be a better citizen

Make sure the promise for the modal is caught and we return out early if user explictiy cancels modal or presses ESC

* Cleanup my noisy comments for a re-review

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-11-11 11:50:23 +00:00
0858d02172 Single block migration (#20663)
* WiP blocklist migration

* Mostly working migration

* [WIP] deconstructed the migration to prefetch and process all data that requires the old definitions

* Working singleblock migration

* Abstracted some logic and applied it to settings elements too.

* Align class and file name.

* Minor code warning resolution.

* More and better comments + made classes internal where it made sense

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-11-11 11:43:03 +00:00
Andy Butland 524912a893 Fix accidental update to global.json. 2025-11-11 11:37:00 +01:00
d687c4365a Member types: Prepare container support (#20715)
* Add MemberType/MemberTypeContainer to supported EntityContainer object types

* Implement MemberTypeContainerRepository

* Prepare base controller for MemberTypeTreeControllerBase.

* Revert "Prepare base controller for MemberTypeTreeControllerBase."

This reverts commit ad213a23ad.

* Added foldersOnly flag in readiness for support in 17.1.

* Added foldersOnly flag in readiness for support in 17.1 (2).

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
2025-11-11 19:18:52 +09:00
Jacob Overgaard 55769b1747 Merge remote-tracking branch 'origin/release/17.0' 2025-11-11 09:51:49 +01:00
Jacob Overgaard 0797a3fa59 Merge remote-tracking branch 'origin/release/16.4' 2025-11-11 09:51:13 +01:00
41582de9d1 Collection view: add tests for create and using collection view (#20667)
* write test for custom collection view test

* add clean

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/CollectionView.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
2025-11-11 14:46:54 +07:00
Andy ButlandandGitHub cfa32b265a Integration Tests: Avoid asserting on errors for permission tests (#20643)
* Added integration tests for PropertyTypeUsageService and adjusted assert in management API permissions test.

* Commented or fixed management API integration tests verifying permissions where we were asserting on an error response.
2025-11-11 05:59:25 +00:00
Mathias HelsengrenandGitHub d8198d2f5c Accessibility: Adding a label attribute for <uui-button> in news dashboard (#20780)
Added 'label attribute to the uui-button in the umb-news.card.element + Removing the redundant text for uui-button since label attribute is now present
2025-11-11 06:33:31 +01:00
Niels LyngsøandNiels Lyngsø 12b483ff05 Fix block list inline mode (#20745)
* Fix block list inline mode

https://github.com/umbraco/Umbraco-CMS/issues/20618

* Fixed potential runtime errors

* Code cleanup

* Fixed Code Health Review

* Revert some changes

Commented out unused state properties and related code.

* Remove commented-out state property in block workspace view

* fix localization

* no need for question mark after ids, they should be presented as required

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-11-10 17:42:16 +01:00
Niels Lyngsø 43688148ae Cherry pick #20745 2025-11-10 17:40:58 +01:00
9fa382e84d Fix block list inline mode (#20745)
* Fix block list inline mode

https://github.com/umbraco/Umbraco-CMS/issues/20618

* Fixed potential runtime errors

* Code cleanup

* Fixed Code Health Review

* Revert some changes

Commented out unused state properties and related code.

* Remove commented-out state property in block workspace view

* fix localization

* no need for question mark after ids, they should be presented as required

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-11-10 16:17:30 +00:00
ab51aac5c6 Backoffice Item Pickers: Show error for missing items in 10 picker types (closes #19329, #20270, #20367) (#20762)
* Add errorDetail property to umb-entity-item-ref

Add optional errorDetail property to display additional context
(such as file paths or IDs) in error states. This enhances the
error display to show both the error message and relevant details.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Make _removeItem protected in UmbPickerInputContext

Change #removeItem from private to protected to allow subclasses
to reuse the removal logic while customizing the confirmation dialog.
This enables better extensibility for specialized picker contexts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix static file picker to show error state for missing files

Update umb-input-static-file to observe statuses and render based
on item state (loading, error, success). When a static file is
missing (API returns empty array), displays error state with alert
icon and file path detail using umb-entity-item-ref.

Also adds standalone property support for proper single-item styling.

Fixes #19329

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Show file path in static file remove confirmation dialog

Override requestRemoveItem in UmbStaticFilePickerInputContext to
display the file path instead of "Not found" in the confirmation
dialog when removing missing static files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Show GUID in document picker error state

Display the document GUID as errorDetail when a document is
not found (deleted/gone). This provides useful context for
editors to identify which document was referenced.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Show GUID in document picker remove confirmation dialog

Display the document GUID instead of "Not found" in the remove
confirmation dialog when the document no longer exists. This
provides useful context for editors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: apply the temp model which the context uses

* Refactor: Move requestRemoveItem logic to base UmbPickerInputContext

Eliminated duplicate code across three picker contexts by:
- Adding protected getItemDisplayName() method to base class
- Moving requestRemoveItem implementation to base class
- Removing duplicate implementations from document, member, and static file pickers
- Static file picker overrides getItemDisplayName() to show file path

Net reduction: 19 lines of code (69 removed, 50 added)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Document Type Picker: Show error state for missing items (fixes #20367)

Apply the same error state handling to the document type picker that was
implemented for static files, documents, and members. When a referenced
document type is missing or deleted:

- Show error state with the GUID as errorDetail
- Allow removal with proper confirmation dialog
- Use umb-entity-item-ref for error display
- Use uui-ref-node-document-type for successful items

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Additional pickers: Show error states for missing items in user, language, media-type, member-type, member-group, and user-group pickers

Apply the same error state handling pattern to six additional picker types:
- user-input: Users
- input-language: Languages
- input-media-type: Media types
- input-member-type: Member types
- input-member-group: Member groups
- user-group-input: User groups

All pickers now:
- Observe statuses from UmbRepositoryItemsManager
- Show error state with GUID when referenced item is missing/deleted
- Use umb-entity-item-ref for error display
- Use specialized components (uui-ref-node, umb-user-group-ref, etc.) for successful items
- Allow removal with proper confirmation dialog showing GUID

Maintains code reusability by using the base class requestRemoveItem method
with getItemDisplayName() for consistent error handling across all pickers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Lint: Remove unused 'when' imports from input-media-type and user-group-input

* Refactor: Add #renderItem helper method to all pickers for consistency

- Add #renderItem to user-input (extracted from inline repeat callback)
- Change _renderItem to #renderItem in user-group-input for consistency
- Change _renderItem to #renderItem in input-static-file for consistency

All 10 pickers now use consistent #renderItem helper method pattern,
improving code readability and maintainability as suggested by @nielslyngsoe

* `import` sorting

* Corrected (old) JSDoc typos

* Markup tidy-up

* exported `UmbPropertyEditorUIStaticFilePickerElement` as `element`

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-11-10 12:57:24 +00:00
Niels Lyngsø afec900204 Merge branch 'release/17.0'
# Conflicts:
#	src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyEditor.cs
2025-11-10 12:46:47 +01:00
89989d60ce Templates: Fix "Discard changes?" dialog after creating template with master template (fixes #20262) (#20749)
Moves the _data.updateCurrent() call inside the updateLayoutBlock conditional
in setMasterTemplate(). This prevents spurious change detection when loading
templates from the server, while maintaining proper change tracking when users
actually modify the master template via the UI.

This completes the fix started in PR #20529 which added the updateLayoutBlock
parameter but inadvertently left the data model update outside the conditional.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-10 11:00:43 +00:00
73fd52aeea Login: Added custom validation for missing password and user/email on the login form (#20233)
* Added custom validation for missing password and user/email

* Changed some of the logic behind custom validation, so it now uses aria-errormessage

* fix: imports from src folder instead

* build(deps-dev): bump vite to 7.2.0

* formatting

* fix: moves the form into the login.page.element.ts component to better control submission

* fix: creates elements globally

* fix: adds id back to form

* fix: no need to store references to all form elements

* fix: errormessage should show with password field in a span as well

* fix: checks validity of form

* fix: constructs form in auth.element.ts anyway and append localization to validation and add oninput and onblur

* chore: fixes import paths

* fix: fixes special case where ?status was not reset

* fix: changes wording in english

* fix: removes duplicate en-us keys

* feat: adds ariaLive and role attributes

* fix: always clears the text

* fix: username required validation should switch between username and email

* package-lock.json updated on (re)install

* Renamed SVG eye icon filenames

to be conventional and kebab-cased.

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-11-10 10:21:33 +00:00
Niels LyngsøandGitHub bce85e1e88 Package section: use command icon for migrations, remove prop (#20775)
change icon and remove ability to customize
2025-11-10 09:38:53 +00:00
Niels LyngsøandGitHub e39b05f44d Property type: Vary in the same way as the owner Document Type (#20751)
set new property type preset to vary if document type varies
2025-11-10 10:28:40 +01:00
Niels LyngsøandGitHub 2067db1c3c Content Workspace: not displaying varying composition values in a not varying context (Fixes #20707) (#20758)
* only vary if context varies

* add controller aliases to these observations
2025-11-10 10:05:56 +01:00
Andy ButlandandGitHub fcfaff9daa Querying: Restore ability to retrieve all children published in any culture (closes #20760) (#20766)
* Restore ability to retrieve all children published in any culture.

* Fixed typo in test name.
2025-11-10 11:02:10 +09:00
04918ec3d2 Slider property editor: Fix for preset value handling of enableRange (#20772)
Fix config value access in UmbSliderPropertyValuePreset

Updated the `UmbSliderPropertyValuePreset` class to ensure the `.value` property is accessed for configuration items. This change improves the accuracy of retrieving `enableRange`, `min`, `max`, and `step` values, addressing potential bugs in value processing.

Co-authored-by: Luuk Peters <Luuk.Peters@proudnerds.com>
2025-11-09 22:38:16 +01:00
Warren BuckleyandGitHub aae316e17e Localization: Supply the display name to the localization key for the alt and title attributes of the 2FA QR code image (#20770)
Simple fix to supply the display name to the localization key for the 2FA QR Code Image
2025-11-09 13:41:41 +01:00
Andy ButlandandGitHub ca08652a60 Installer: Fix issues with newsletter signup (#20705)
* Add setter to allow handling of requests to subscribe to newsletter on install.

* Correct serialization of newsletter subscription request.

* Fix serialization and use the Umbraco.EmailMarketing service for newsletter signup.

* Remove logging of user when setting telemetry level.

* Applied suggestions from code review.
2025-11-07 14:34:26 +01:00
b866c31105 Property action: Add tests for create and using Property Action UI Extension (#20291)
* add property action tests

* add extension property action code

* remove extension registry config

* update helper version

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/PropertyAction.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/PropertyAction.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/AdditionalSetup/App_Plugins/my-property-action/write-property-action.api.js

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/AdditionalSetup/App_Plugins/my-property-action/read-property-action.api.js

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* change tab space size

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
2025-11-07 15:02:21 +07:00
Andy ButlandandGitHub 6f2b7ab1a0 Flags: Complete renaming of SignProviders to FlagProviders. (#20752)
Complete renaming of SignProviders to FlagProviders.
2025-11-06 22:45:41 +01:00
Andy Butland ea142d51b7 Fix memory leak with IOptionsMonitor.OnChange and non-singleton registered components (closes #20709 for 16/17) (#20723)
* Fix memory leak with IOptionsMonitor.OnChange and non-singleton registered components.

* Dispose disposable data editors in ValueEditorCache.

* Removed unnecessary refactoring and clarified code comments.
# Conflicts:
#	src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyEditor.cs
2025-11-06 17:22:43 +01:00
Andy ButlandandGitHub 7162c458b1 Fix memory leak with IOptionsMonitor.OnChange and non-singleton registered components (closes #20709 for 16/17) (#20723)
* Fix memory leak with IOptionsMonitor.OnChange and non-singleton registered components.

* Dispose disposable data editors in ValueEditorCache.

* Removed unnecessary refactoring and clarified code comments.
2025-11-06 17:16:01 +01:00
Niels LyngsøandGitHub f4a7a2d9be Reset password localization + format (#20750)
localizations + format
2025-11-06 10:43:46 +00:00
Nicklas KramerandAndy Butland e3c394b109 Migrations: Fixes migrations from 13 to 17. Media Folder without Collection & Last Synced Table not existing. (#20743)
* Creating and adding new migration. And fixing another small bug.

* Adding XML Header and renaming to a more clearly defined name
2025-11-06 11:41:45 +01:00
Nicklas KramerandGitHub 3ab12e9b59 Migrations: Fixes migrations from 13 to 17. Media Folder without Collection & Last Synced Table not existing. (#20743)
* Creating and adding new migration. And fixing another small bug.

* Adding XML Header and renaming to a more clearly defined name
2025-11-06 09:40:29 +00:00
Niels LyngsøandGitHub f11b8ffae9 User Workspace: localize password mismatch feedback (#20747)
localize
2025-11-06 09:01:51 +00:00
e155fdff58 Block Custom View: Add tests for create and using block custom view (#20472)
* add test for block custom view

* update format code

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/BlockCustomView.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/BlockCustomView.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/BlockCustomView.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/BlockCustomView.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* fix some name test

* add new test for block custom view

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
2025-11-06 15:57:55 +07:00
Andy ButlandandGitHub 2e85f1bbf8 Dependencies: Update node development dependency to latest secure version of current major (17) (#20735)
Update node development dependency to latest secure version of current major.
2025-11-05 20:57:55 +01:00
Andy ButlandandGitHub 7502a38033 Dependencies: Update dotnet sdk and node development dependency to latest secure version of current major (16) (#20734)
* Update dotnet sdk and node development dependency to latest secure version of current major.

* Update package-lock.json.
2025-11-05 20:02:11 +01:00
Jacob OvergaardandGitHub 594c3f4eac Rich Text Editor: The media picker skips the "edit media" dialog when editing an image (closes #20066) (#20740)
* fix: Tiptap Media Picker: Skip media picker modal when editing existing images

Fixes the media picker workflow to match v13 behavior where clicking
an existing image directly opens the alt text/caption editor instead
of forcing users to re-select the same image from the media library.

Also fixes caption text extraction to properly read from the figcaption
node using Tiptap's NodeSelection API instead of unreliable attribute-based
approach.

Changes:
- Skip media picker when currentMediaUdi exists (lines 77-92)
- Extract caption from NodeSelection.node using descendants() (lines 55-73)
- Add NodeSelection export to tiptap externals for proper typing

* Refactor: Extract nested logic from media picker execute method

Reduces cyclomatic complexity from 15 to 1 by extracting conditional
logic into focused private helper methods. Addresses CodeScene warnings
for complex method and nested conditionals (bumpy road smell).

Created helper methods:
- #extractMediaUdi, #extractCaption, #findFigcaptionText
- #getMediaGuid, #updateImageWithMetadata

No functional changes - improves maintainability and testability.
2025-11-05 14:51:16 +00:00
72d7ed438f Property Editors: Hide "add button" when maximum configuration is 1 (fixes #20407) (#20738)
Hide add button when max 1

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-11-05 12:12:04 +00:00
Mathias HelsengrenandGitHub 297c5d3824 Header: Adjusted button focus border color contrast (#20562)
Made use of the uui-button outline overwrite to change the focus border color to be the contrast color of the header.
2025-11-05 11:04:59 +00:00
Nhu DinhandGitHub e8f2bb33d7 E2E: QA Fixed the failing tests due to the recent UI changes (#20576)
* Added skip tag for the failing tests due to the issues and added waits for the flaky tests

* Commentted code as the reference items displays randomly

* Bumped version

* Added more waits to avoid the flaky tests

* Updated tests for setting culture and hostnames since the first content already has the default domain

* Fixed flaky tests

* Updated tests since the reload step is flaky

* Added more waits for the flaky tests in Windows

* Need to publish first document before set domain for second document

* Make permission tests run in the pipeline

* Added step to ensure the rollback action is completed

* Reverted npm command

* Added skip tag for the permission tests

* Fixed test for the culture and hostname permission

* Removed waits as it is includes in test helper

* Fixed test for adding a media in RTE Tiptap property editor

* Updated test helper function to avoid the flaky tests releated to block

* Added more waits to ensure image uploaded

* Bumped version

* Bumped version

* Reverted

* Reverted code

* Bumped version of test helper

* Bumped version

* Reverted code

* Added more waits to avoid flaky tests

* Added more waits

* Updated nightly pipeline: remove v17/dev, run different app setting tests by default and not run Relation Type in Linux as they are too flaky

* Added more waits

* Added npm command for testWindows

* Added more waits after creating a folder
2025-11-05 15:54:09 +07:00
Jacob Overgaard b22d3ddc00 Auth: Cleans up stale or completed auth details from storage (#20725)
* fix: cleans up stale PKCE keys after auth regardless of success or error

* fix: cleans up stale PKCE data on logout
2025-11-04 14:10:04 +01:00
Jacob Overgaard 5739049f90 Merge remote-tracking branch 'origin/v16/dev' 2025-11-04 14:09:18 +01:00
Jacob Overgaard 4e74dbf218 Merge branch 'release/16.4' into v16/dev 2025-11-04 14:07:30 +01:00
Jacob OvergaardandGitHub fa5c53b571 Auth: Cleans up stale or completed auth details from storage (#20725)
* fix: cleans up stale PKCE keys after auth regardless of success or error

* fix: cleans up stale PKCE data on logout
2025-11-04 11:31:34 +00:00
2b8146f72d Media: Add protection to restrict access to media in recycle bin (closes #2931) (#20378)
* Add MoveFile it IFileSystem and implement on file systems.

* Rename media file on move to recycle bin.

* Rename file on restore from recycle bin.

* Add configuration to enabled recycle bin media protection.

* Expose backoffice authentication as cookie for non-backoffice usage.
Protected requests for media in recycle bin.

* Display protected image when viewing image cropper in the backoffice media recycle bin.

* Code tidy and comments.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Introduced helper class to DRY up repeated code between image cropper and file upload notification handlers.

* Reverted client-side and management API updates.

* Moved update of path to media file in recycle bin with deleted suffix to the server.

* Separate integration tests for add and remove.

* Use interpolated strings.

* Renamed variable.

* Move EnableMediaRecycleBinProtection to ContentSettings.

* Tidied up comments.

* Added TODO for 18.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-04 07:39:44 +00:00
Jacob Overgaard b502e29d51 Merge remote-tracking branch 'origin/release/17.0' 2025-11-04 08:25:04 +01:00
Andreas ZerbstandGitHub 76fed82e91 E2E: QA cherry picked acceptance tests updates from 17 (#20714)
* Updated tests

* Bumped version

* Added v16 to nightly e2e run
2025-11-04 08:23:04 +01:00
Niels LyngsøandGitHub b68a6a9502 Data Type: use Property Editor UI label instead over name (#20716)
Prioritize using the property editor ui label and localize it.
2025-11-03 16:09:31 +00:00
a4d893a7b4 Rich text editor: Treat an "empty" value as a non-value (closes #20454) (#20719)
* Make the RTE treat an "empty" value as a non-value

* Additional tests

* Add tests for invariant and variant content.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-11-03 15:24:55 +00:00
313b60aca5 Load Balancing: Move temporary files and make them configurable to allow for media upload when load balancing the backoffice (#20717)
* make file upload location configurable

* Update src/Umbraco.Core/Configuration/Models/HostingSettings.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix default implementation

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-03 15:22:16 +01:00
Lee KelleherandGitHub c1a8500f12 Tiptap RTE: Localizes property editor UI label (removes "[Tiptap]" from label) (closes #20439) (#20713)
* Localized RTE property-editor UI label, removing "[Tiptap]"

* Updated acceptance test

* Localized the button label in the data-type and property-editor picker modals

* Based on @copilot suggestion, localized the property-editor UI label in the other places
2025-11-03 11:49:55 +00:00
cfa530487b Property Editors: Add mandatory support to Number Range (Refactor). (#20570)
* Added mandatory property to number range property editor and bind it to the inner input.

* Added mandatory message support.

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-11-03 10:56:37 +01:00
Kenn JacobsenandGitHub 4ee1d7b13e Performance: Cache published content instances at cache service level (#20681)
Cache published content instances at cache service level
2025-11-03 10:55:23 +01:00
95cc6cc67b Performance: Request cache referenced entities when saving documents with block editors (#20590)
* Added request cache to content and media lookups in mult URL picker.

* Allow property editors to cache referenced entities from block data.

* Update src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerValueEditor.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add obsoletions.

* Minor spellcheck

* Ensure request cache is available before relying on it.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: kjac <kja@umbraco.dk>
2025-11-03 10:39:58 +01:00
Rick ButterfieldandAndy Butland 43ac32282c Preview: Add allow-forms to iframe sandbox attributes (#20701)
Add 'allow-forms' to iframe sandbox attributes
2025-10-31 13:37:35 +01:00
Rick ButterfieldandGitHub 4fc79ad1f8 Preview: Add allow-forms to iframe sandbox attributes (#20701)
Add 'allow-forms' to iframe sandbox attributes
2025-10-31 13:34:36 +01:00
96ecef0a92 Performance: Request cache referenced entities when saving documents with block editors (#20590)
* Added request cache to content and media lookups in mult URL picker.

* Allow property editors to cache referenced entities from block data.

* Update src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerValueEditor.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add obsoletions.

* Minor spellcheck

* Ensure request cache is available before relying on it.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: kjac <kja@umbraco.dk>
2025-10-31 12:41:46 +01:00
Laura Neto 5e87dead44 Task: Dependency track (#20670)
* Generate BOM files on build

* Upload BOM to Dependency Track

* Move Backoffice BOM generation to right after install

The build and/or pack steps are deleting files that are needed for the BOM to be generated properly.

* Split the BOM uploads into different jobs

* Fix wrong usage of parameters

* Move order of dependency track stage

* Fix wrong umbracoVersion value

* Small fixes

* Log curl response headers

* Correct version sent to dependency track

* Adjusted curl flags

* Fix bom file path

* Fix dotnet bom file name

* Add Login UI to dependency track

* Generate BOM for E2E Tests

* Move dependency track stage

* Move acceptance test .env generation to e2e install template

Needed as the post install script is expecting this to exist.

* Use major version if public release

* Missing ')'

* Reverted npm install command changes in static assets project
2025-10-31 12:11:32 +01:00
Laura Neto 417335a5c6 Task: Dependency track (#20670)
* Generate BOM files on build

* Upload BOM to Dependency Track

* Move Backoffice BOM generation to right after install

The build and/or pack steps are deleting files that are needed for the BOM to be generated properly.

* Split the BOM uploads into different jobs

* Fix wrong usage of parameters

* Move order of dependency track stage

* Fix wrong umbracoVersion value

* Small fixes

* Log curl response headers

* Correct version sent to dependency track

* Adjusted curl flags

* Fix bom file path

* Fix dotnet bom file name

* Add Login UI to dependency track

* Generate BOM for E2E Tests

* Move dependency track stage

* Move acceptance test .env generation to e2e install template

Needed as the post install script is expecting this to exist.

* Use major version if public release

* Missing ')'

* Reverted npm install command changes in static assets project
2025-10-31 11:13:45 +01:00
Niels LyngsøandNiels Lyngsø b4220a4d80 Collection children: A slim navigation of collection children + higher take above target (#20641)
* enforce update of children when collection

* only load one above and below collection children

* take 50 above a target for default experience

* revert reset target

* remove old impl
2025-10-31 10:54:37 +01:00
Laura NetoandGitHub 973a9573cc Task: Dependency track (#20670)
* Generate BOM files on build

* Upload BOM to Dependency Track

* Move Backoffice BOM generation to right after install

The build and/or pack steps are deleting files that are needed for the BOM to be generated properly.

* Split the BOM uploads into different jobs

* Fix wrong usage of parameters

* Move order of dependency track stage

* Fix wrong umbracoVersion value

* Small fixes

* Log curl response headers

* Correct version sent to dependency track

* Adjusted curl flags

* Fix bom file path

* Fix dotnet bom file name

* Add Login UI to dependency track

* Generate BOM for E2E Tests

* Move dependency track stage

* Move acceptance test .env generation to e2e install template

Needed as the post install script is expecting this to exist.

* Use major version if public release

* Missing ')'

* Reverted npm install command changes in static assets project
2025-10-31 10:53:57 +01:00
Niels LyngsøandGitHub bd94522237 Collection children: A slim navigation of collection children + higher take above target (#20641)
* enforce update of children when collection

* only load one above and below collection children

* take 50 above a target for default experience

* revert reset target

* remove old impl
2025-10-31 10:52:10 +01:00
66409b9ebd Performance: Request cache referenced entities when saving documents with block editors (#20590)
* Added request cache to content and media lookups in mult URL picker.

* Allow property editors to cache referenced entities from block data.

* Update src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerValueEditor.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add obsoletions.

* Minor spellcheck

* Ensure request cache is available before relying on it.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: kjac <kja@umbraco.dk>
2025-10-31 10:49:26 +01:00
Nathan WoulfeandGitHub f27fb58e13 box-sizing to ensure height is correct (#20694) 2025-10-31 06:42:45 +01:00
Laura Neto aadf5e7643 Bump the version to 17.0.0-rc2 2025-10-30 16:14:08 +01:00
Mads RasmussenandGitHub b8cb198a1a Document Recycle Bin: Remove non-relevant entity bulk actions (closes #20677) (#20685)
Add 'not trashed' condition to document bulk actions

Introduces the UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS to various document-related bulk action manifests, ensuring actions like duplicate, move, publish, unpublish, and trash are only available for entities that are not already in the recycle bin.
2025-10-30 13:41:20 +01:00
5032b25e3c Icon picker: Better title for icon colors (#20649)
* Better title for icon colors

* Add name for legacy colors

* Translations of colors

* Fixed import, adding missing colour, added Italian translations.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-10-30 13:34:58 +01:00
3d24f0a51e Implementing an inline toggle button to show/hide password. (#20611)
* Implimented an inline toggle button to show/hide your password, also changed the css to accommodate these changes

* Cleaned the css

Added the svg's to their own const for easy reuse

Added localization for the arialabel on the button

Seperated the createFormLayoutItem so there is a seperate for the password input

Moved all the conditional logic in the onclick event to fit inside one if/else statement

* Removed old logic that added a 100ms timeout that would sometimes be enough for localization to load, and replaced it with a function.
The function will try and resolve the promise by checking if the localize.terms methods returns a changed value, if not then it retries every 50ms or untill it hits a max retry of 40/2 seconds.

* Re adding the hide for -ms-reveal to support Microsoft Edge browsers

* Removed a console.log

* Alligned the button behavior so it fits better with what we have in the uui libary.
Now the button is always visible instead of appearing  on hover or when in focus

* Update src/Umbraco.Web.UI.Login/src/auth.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Login/src/auth.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @iOvergaard

* Apply suggestion from @iOvergaard

* Adding the requested changes via my own fork (#20664)

Changed the logic for waitForLocallization Added the svg's as files that are imported instead of having the raw svg in the code

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-30 11:56:15 +01:00
Jacob Overgaard 1c6d4f360d bumps package.json version to 17.1.0-rc 2025-10-30 11:50:19 +01:00
Jacob Overgaard cdf0e5b3b3 Merge remote-tracking branch 'origin/v17/dev' 2025-10-30 11:49:08 +01:00
Niels Lyngsø 837a56652f Merge branch 'release/17.0' into v17/dev
# Conflicts:
#	version.json
2025-10-29 20:04:40 +01:00
Niels Lyngsø e315ae3ae1 Cherry picked Prevent Section URL Retention fix 2025-10-29 20:03:18 +01:00
7af67d2944 Have to control of the state store navigation for custom sections or … (#20637)
* Have to control of the state store navigation for custom sections or overrides

* revert wording

* move logic and update comment

---------

Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-10-29 20:00:36 +01:00
Jacob Overgaard 393179d8a1 build: updates lockfile 2025-10-29 11:40:54 +01:00
Jacob Overgaard b7105c88d8 build: adds back the ^ missing from openapi-ts to allow newer versions to be used 2025-10-29 11:40:46 +01:00
Jacob Overgaard ce59537006 build: updates lockfile 2025-10-29 11:40:10 +01:00
Jacob Overgaard f87e15b941 build: adds back the ^ missing from openapi-ts to allow newer versions to be used 2025-10-29 11:38:44 +01:00
Jacob Overgaard f1b7a33e86 bumps package lock file 2025-10-29 11:34:57 +01:00
Andy ButlandandGitHub e7ccfaaaac Routing: Added method to IDocumentUrlService for retrieving document key from URI (closes #20666) (#20673)
Added method to IDocumentUrlService for retrieving document key from URI.
2025-10-29 09:47:17 +01:00
Andy Butland a61bb8dbef Bumped version to 17.0.0-rc1. 2025-10-29 07:33:27 +01:00
Andy Butland 1f82bdde3d Merge branch 'release/16.3.4'
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-10-29 06:45:38 +01:00
8733230762 Property Editors: Added form control and mandatory support to editors in common group(Number, Tags, Slider). (#20659)
* Added mandatory support to property-editor-ui-number.

* Added form control to property-editor-ui-tags

* Added validator to the slider when value is missing and support for mandatory and mandatory message.

* Removed unnecessary ternary.

* Removed white space lit error.

* Fix tags input to handle undefined items array

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-10-28 12:33:29 +00:00
da0bdbf8c7 Caching: Resolves publish and install issues related to stale cached data retrieval (closes #20539 and #20630) (#20640)
* Request cache published content creation with version.

* Reload memory cache after install with package migrations.

* Improve message on install for database cache rebuild.

* Update src/Umbraco.Infrastructure/Install/MigrationPlansExecutedNotificationHandler.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Relocated memory cache refresh after package install from notification handler to unattended upgrader.

* Fix construtor breaking change

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-10-28 13:32:55 +01:00
Andy Butland f726a7d7c5 Merge branch 'release/17.0' of https://github.com/umbraco/Umbraco-CMS into release/17.0 2025-10-28 13:32:49 +01:00
Andy Butland 498bb5ee24 Merge branch 'main' into v17/dev 2025-10-28 13:32:23 +01:00
0d2393d866 Caching: Resolves publish and install issues related to stale cached data retrieval (closes #20539 and #20630) (#20640)
* Request cache published content creation with version.

* Reload memory cache after install with package migrations.

* Improve message on install for database cache rebuild.

* Update src/Umbraco.Infrastructure/Install/MigrationPlansExecutedNotificationHandler.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Relocated memory cache refresh after package install from notification handler to unattended upgrader.

* Fix construtor breaking change

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-10-28 13:26:26 +01:00
bea21d7b99 Caching: Resolves publish and install issues related to stale cached data retrieval (closes #20539 and #20630) (#20640)
* Request cache published content creation with version.

* Reload memory cache after install with package migrations.

* Improve message on install for database cache rebuild.

* Update src/Umbraco.Infrastructure/Install/MigrationPlansExecutedNotificationHandler.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Relocated memory cache refresh after package install from notification handler to unattended upgrader.

* Fix construtor breaking change

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-10-28 12:25:13 +00:00
Niels Lyngsø cee730517c Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/views/settings/property-workspace-view-settings.element.ts
2025-10-28 11:20:03 +01:00
Andy Butland 3dc65c48b3 Bump package-lock.json to 16.3.4. 2025-10-28 09:58:31 +01:00
Niels LyngsøandAndy Butland 18ab333afc Hotfix: Implement a specific sorting method for statuses as the existing has … (#20609)
Implement a specific sorting method for statuses as the existing has to support deprecated implementation of custom getUnique method
2025-10-28 09:15:17 +01:00
Niels LyngsøandAndy Butland fd91f88a7e Item Repository: Sort statuses by order of unique (#20603)
* utility

* ability to replace

* deprecate removeStatus

* no need to call this any longer

* Sort statuses and ensure not appending statuses, only updating them
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/core/repository/repository-items.manager.ts
2025-10-28 09:15:05 +01:00
Andy Butland 13c164d81f Bump version to 16.3.4. 2025-10-28 08:58:03 +01:00
Nhu DinhandGitHub f6b566c65f E2E: Updated user group and data type acceptance tests to match UI changes (#20658)
* Updated user group tests to match the recent UI changes

* Updated data type collection tests due to UI changes

* Bumped version of test helper
2025-10-28 13:14:52 +07:00
a3d6b4f844 Entity Data Picker: Data editor and value converter (#20661)
* change property value to an object

* add const for picker data source type

* Add value editor and converter server-side

* register schema for property editor + move settings ui

---------

Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-10-27 15:40:16 +00:00
Andy Butlandandmole 1615740bdf Media types: Handle null configured file extensions when populating allowed media types (closes #20620) (#20635)
* Handle null configured file extensions when populating allowed media types.

* Added clarifying comment.

(cherry picked from commit f33eb3f678)
2025-10-27 13:43:39 +01:00
Andy ButlandandGitHub f33eb3f678 Media types: Handle null configured file extensions when populating allowed media types (closes #20620) (#20635)
* Handle null configured file extensions when populating allowed media types.

* Added clarifying comment.
2025-10-27 13:42:48 +01:00
Andy ButlandandGitHub d3b9256b4e Webhooks: Reverts nullability update to continue to allow derived classes 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.
2025-10-27 13:11:51 +01:00
399431b02d Remove references to Our Umbraco - moved to the new forum (#20644)
* Remove unused help controller

* Correct documentation links

* Link to the new release site for compares

* Remove unused translation key with reference to Our

* Update NoNodes / NotFound to point to the forum instead of Our

* Change dashboards form Our to Forum and de-emphasize Discord as a support channel

* Removes Help controller reference

* Forgot to rename the css Id

* Update src/Umbraco.Web.UI.Client/src/assets/lang/ar.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix typo in Community Forum help menu item name

* Refer to releases instead of a download page

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Update the default dashboard with better content and clearer headings

* Obsolete the HelpController instead

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-10-27 11:12:19 +00:00
Andy Butland 33c2838d20 Merge branch 'release/17.0' of https://github.com/umbraco/Umbraco-CMS into release/17.0 2025-10-27 11:43:34 +01:00
981c9a7db2 Load balancing backoffice: Add missing id to distributed jobs when updating (#20642)
* Add ID when updating background job

* Reduce default period to 5 seconds

* Apply suggestions from code review

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-10-27 08:49:25 +01:00
Jan SkovgaardandSebastiaan Janssen e893682723 Don't call generateAlias on #onAliasChange()
Currently it's not possible to use characters like "_" and "-" in aliases due to this check - At least that is was @nul800sebastiaan told me 😇

Suggested fix for #20622
2025-10-25 10:47:56 +02:00
Andy Butland de9cbf9ef5 Merge branch 'release/17.0' of https://github.com/umbraco/Umbraco-CMS into release/17.0 2025-10-24 14:22:42 +02:00
d9cdf03442 Preview: Allows changing the preview environment inside the preview app, and other UX changes that enhance the experience (#20598)
* Preview Device: refactored config

Fixed "flip" icon style.

Removed "shadow" as unnecessary.

Renamed "className" to "wrapperClass" to be descriptive.

* Preview element CSS refinement

* Preview element: load in private extensions

* Added "Preview Environments" preview-app

Made `unique`, `culture` and `segment` observable in the context.

* Aligned preview-app design

with `hidden` attribute and design consistency.

* Created "Preview" package

* Relocated "Preview Apps" and Context to the new package

* Deprecated `UmbDocumentPreviewRepository` (for v19)

as the methods have moved to `UmbPreviewRepository`.

* Removed Preview Sessions event listeners

* Changed localization from "End" to "Exit"

* chore: consumes context only when needed

* feat: uses the UmbPreviewRepository instead

* feat: adds localization to errors and ensures the function does not randomly throw

* feat: prevents creating a new repository for every click

* feat: prevents potential memory leak by adding a signal to the events added to each iframe update

* feat: adds a custom interface to prevent typescript errors

* feat: ensures new string states are checked properly

* docs: adds comment to avoid confusion

* feat: sets up scaling once per iframe load rather than on each update

* fix: ensures that you can go back to the default segment again

* feat: closes popovers when clicking on the iframe (losing blur) and if selecting an item (expect for devices)

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-10-24 08:29:22 +00:00
d9c201e3d1 docs: Add backoffice preview URL to README files (#20623)
* docs: Add backoffice preview URL to README files

Added links to https://backofficepreview.umbraco.com/ in both the main repository README and the Umbraco.Web.UI.Client package README to make the live backoffice preview easily discoverable.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: fix link

* Update .github/README.md

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-10-24 08:36:34 +02:00
Andy Butland a5fcfc231d Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS 2025-10-24 06:44:08 +02:00
Andy Butland 6ba03a48c8 Merge branch 'release/16.3.3'
# Conflicts:
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-10-24 06:43:55 +02:00
8434c7d0cb Icon Picker: Fix empty selection allowed on mandatory fields and add validation. (#20536)
* Not show the empty tile when filtering is active.

* Added mandatory property to the icon picker.

* Avoid deselecting the icon on second click when not showing the empty option.

* Extends the form control mixin to the icon picker.

* Used super.value.

* Support mandatory from settings config.

* Removed mandatoryConf.

* remove requestUpdate

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-10-23 13:49:14 +00:00
Niels Lyngsø 67d1ac3b94 Merge branch 'main' into v17/dev 2025-10-23 14:44:24 +02:00
Mads RasmussenandGitHub e482976a9d User And User Group Workspace: Make views extendable (#20548) (#20617)
* implement user details as a workspace view

* register user group details as a workspace view
2025-10-23 14:43:49 +02:00
Bjarne FyrstenborgandGitHub 3854b2bd53 Block List: Remove bold label from inline editing (#20437)
Remove bold label from block list inline editing
2025-10-23 14:32:37 +02:00
Niels Lyngsø 1d8cadbeee Merge branch 'main' into v17/dev 2025-10-23 13:42:30 +02:00
Niels Lyngsø 602ad420bd Merge branch 'release/17.0' into v17/dev
# Conflicts:
#	version.json
2025-10-23 13:40:35 +02:00
bd6ab83712 Collection: prevent multiple load calls within a very short time (#20528)
* debounce loadCollection calls

* update document collection context

* update media collection context

* remove duplicate request to reload

* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add fadeIn animation to empty state to prevent flicker

* Update collection-default.element.ts

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-10-23 13:15:54 +02:00
Niels LyngsøandGitHub 4252cbc64b Login photo: Update with v.17 edition (#20625)
updated login photo
2025-10-23 11:02:13 +00:00
dependabot[bot]andJacob Overgaard 08d217360e Bump vite from 7.1.9 to 7.1.11 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.1.9 to 7.1.11.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.11/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.11
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-23 12:05:29 +02:00
Lee KelleherandGitHub 9cc2df7acd Preview: Removes sessions (#20561)
Removes preview sessions concept

Fixes #19443 and #19471.

The implementation of exiting sessions was a design flawed.
The v13 feature worked due to an implementation bug.

Exiting preview mode should be a deliberate action by the user.
2025-10-23 11:47:50 +02:00
Sebastiaan JanssenandGitHub b762135554 Exclude 'release/no-notes' from release labels 2025-10-23 11:21:25 +02:00
Laura Neto b3145a01eb Bump version to 17.0.0-rc 2025-10-22 17:01:02 +02:00
Andy ButlandandLaura Neto aeb1437f0e 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.
2025-10-22 16:44:57 +02:00
Andy Butland 644334c63b 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.
2025-10-22 16:43:12 +02:00
Andy Butland a09e1777c4 Migrations: Use reliable GUID to check for existence of data type when creating (#20604)
* Use reliable GUID to check for existence of data type in migration.

* Retrieve just a single field in existence check.
2025-10-22 16:43:04 +02:00
Andy Butland 9cb59fe1b4 Bumped version to 16.3.3. 2025-10-22 16:42:12 +02:00
Andy Butland 04df2652f5 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.
2025-10-22 16:27:37 +02:00
Andy Butland 7dcf329d2c Merge branch 'main' into v17/dev 2025-10-22 16:27:09 +02:00
Andy ButlandandGitHub 6bc498ad41 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.
2025-10-22 14:20:20 +00:00
Andy Butland c422a9ea6a Merge branch 'main' into v17/dev 2025-10-22 15:15:18 +02:00
Nicklas KramerandAndy Butland 1bf53f3554 Filesystem: Prevent tree showing other filetypes than the supported ones (#20567)
* Added check to only find .css files in FileSystemTreeServiceBase.cs

* Marking GetFiles as virtual and overriding it in StyleSheetTreeService.cs to only find .css files

* Redone tests to fit new format

* Fix tests to use file extensions

* Adding file extensions to all other relevant tests

* Adding file filter to remaining trees

* Adding tests to ensure invalid filetypes wont show

* Encapulation and resolved minor warnings in tests.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-10-22 15:13:59 +02:00
f88e28d642 Filesystem: Prevent tree showing other filetypes than the supported ones (#20567)
* Added check to only find .css files in FileSystemTreeServiceBase.cs

* Marking GetFiles as virtual and overriding it in StyleSheetTreeService.cs to only find .css files

* Redone tests to fit new format

* Fix tests to use file extensions

* Adding file extensions to all other relevant tests

* Adding file filter to remaining trees

* Adding tests to ensure invalid filetypes wont show

* Encapulation and resolved minor warnings in tests.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-10-22 15:12:39 +02:00
leekelleher 924af4b565 Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaRepository.cs
#	src/Umbraco.Web.UI.Client/src/apps/preview/preview.context.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/repository/repository-items.manager.ts
2025-10-22 13:33:45 +01:00
Mads RasmussenandNiels Lyngsø 194fee7c91 Use tryExecute for delete API call
Replaces direct await of #delete with tryExecute to improve error handling in the delete method of UmbManagementApiDetailDataRequestManager.
2025-10-22 14:31:41 +02:00
Mads RasmussenandGitHub a5adcbdeef Detail Request Manager: Use tryExecute for delete API call to enable error notifications (#20607)
Use tryExecute for delete API call

Replaces direct await of #delete with tryExecute to improve error handling in the delete method of UmbManagementApiDetailDataRequestManager.
2025-10-22 14:30:46 +02:00
Niels LyngsøandGitHub 4a65f56d9d Hotfix: Implement a specific sorting method for statuses as the existing has … (#20609)
Implement a specific sorting method for statuses as the existing has to support deprecated implementation of custom getUnique method
2025-10-22 11:57:09 +00:00
Sven GeusensandAndy Butland 286e727de8 Webhooks: Register OutputExpansionStrategy for webhooks if Delivery API is not enabled (#20559)
* Register slimmed down OutputExpansionStrategy for webhooks if deliveryapi is not enabled

* PR review comment resolution
2025-10-22 13:51:08 +02:00
Sven GeusensandGitHub 62c1d44a5d Webhooks: Register OutputExpansionStrategy for webhooks if Delivery API is not enabled (#20559)
* Register slimmed down OutputExpansionStrategy for webhooks if deliveryapi is not enabled

* PR review comment resolution
2025-10-22 13:46:56 +02:00
Andy Butland 201906f662 Populate IncludeDescendants on ContentPublishedNotification when publishing branch (forward port of #20578). 2025-10-22 13:37:55 +02:00
Andy Butland c2eea5d6cc Populate IncludeDescendants on ContentPublishedNotification when publishing branch (forward port of #20578). 2025-10-22 13:37:19 +02:00
Andy Butland a4c0da3465 Migrations: Use reliable GUID to check for existence of data type when creating (#20604)
* Use reliable GUID to check for existence of data type in migration.

* Retrieve just a single field in existence check.
2025-10-22 13:27:43 +02:00
Niels Lyngsø 21bf23b67d Dictionary: Fix shortcut Ctrl + S not saving dictionary items (#20605)
* switched event listener from 'change' to 'input'

* Update workspace-view-dictionary-editor.element.ts
2025-10-22 12:37:13 +02:00
Mads RasmussenandGitHub 28c01d2819 Dictionary: Fix shortcut Ctrl + S not saving dictionary items (#20605)
* switched event listener from 'change' to 'input'

* Update workspace-view-dictionary-editor.element.ts
2025-10-22 10:29:08 +00:00
Andy ButlandandGitHub 48759b9852 Migrations: Use reliable GUID to check for existence of data type when creating (#20604)
* Use reliable GUID to check for existence of data type in migration.

* Retrieve just a single field in existence check.
2025-10-22 10:21:42 +00:00
Niels Lyngsø 298db76cb1 Merge branch 'release/17.0' into v17/dev 2025-10-22 11:55:14 +02:00
Niels Lyngsø 2248eeb03e update import 2025-10-22 11:54:50 +02:00
Niels Lyngsø 79639c0571 Item Repository: Sort statuses by order of unique (#20603)
* utility

* ability to replace

* deprecate removeStatus

* no need to call this any longer

* Sort statuses and ensure not appending statuses, only updating them
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/core/repository/repository-items.manager.ts
2025-10-22 11:52:09 +02:00
Niels LyngsøandGitHub f6df0c1828 Item Repository: Sort statuses by order of unique (#20603)
* utility

* ability to replace

* deprecate removeStatus

* no need to call this any longer

* Sort statuses and ensure not appending statuses, only updating them
2025-10-22 09:42:13 +00:00
Jacob Overgaard 44d52392b5 Merge branch 'release/17.0' into v17/dev 2025-10-22 09:50:45 +02:00
63ae29a1aa Preview: Fixes a potential issue where the preview URL could be a different backoffice host (#20591)
* hotfix: ensures that local urls stay relative so we land up on the correct backoffice host that the user initiated the preview session from originally

* feat: since ensureAbsoluteUrl is never supplied anymore, we can remove the parameter altogether

* Remove unused dependency

* Expose IsExternal for URLs

* feat: adds localize controller

* chore: generates api models

* feat: marks the internal preview default url as relative, so that the `<base>` tag is taken into consideration - that way the URL will open on whatever host is active

* Remove IsExternal from the API again

* regenerate types

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-10-22 07:48:55 +00:00
Andy Butland 0792e4358b Merge branch 'release/16.3.2'
# Conflicts:
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-10-22 07:11:02 +02:00
Mads RasmussenandGitHub 6effe32136 Document Recycle Bin: Fix missing item name when restoring (#20599)
allow to pass in a item data resolver
2025-10-21 20:46:16 +02:00
leekelleher 4717264e10 Merge branch 'release/17.0' into v17/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/core/recycle-bin/entity-action/restore-from-recycle-bin/restore-from-recycle-bin.action.ts
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
2025-10-21 16:11:22 +01:00
Jacob Overgaard caeb3454e1 build(dev): adds umbracoapplicationurl to vscode launch params 2025-10-21 16:22:57 +02:00
Jacob Overgaard 942ccc82d9 docs: Add 'Running Umbraco in Different Modes' section to copilot-instructions 2025-10-21 16:22:36 +02:00
f0ac7b4a50 Document/Media Recycle Bin: Add 'Trashed' state to info workspace view (#20581)
* Add 'Trashed' state to document workspace view

Introduces a new 'Trashed' label and tag for documents in the workspace view. Updates localization to include the 'Trashed' term for improved clarity when displaying trashed documents.

* Show trashed state in media workspace info view

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-10-21 15:51:28 +02:00
Andy Butland 8aa9dc8f19 Hybrid Cache: Resolve start-up errors with mis-matched types (#20554)
* Be consistent in use of GetOrCreateAsync overload in exists and retrieval.
Ensure nullability of ContentCacheNode is consistent in exists and retrieval.

* Applied suggestion from code review.

* Move seeding to Umbraco application starting rather than started, ensuring an initial request is served.

* Tighten up hybrid cache exists check with locking around check and remove, and use of cancellation token.
2025-10-21 15:27:15 +02:00
Andy Butland 5488c77e0e Bumped version to 16.3.2. 2025-10-21 15:26:29 +02:00
5f0122e18b Make Create Actions open as dialogs (part 2) (#20523)
* open script create options as a dialog instead of sidebar

* align and simplify the blueprint dialog options

* debounce loadCollection calls

* update document collection context

* update media collection context

* Updated tests

* Bumped test helpers

* Revert "debounce loadCollection calls"

This reverts commit 1c15dda08d.

* Revert "update document collection context"

This reverts commit 47d74a8f5d.

* Revert "update media collection context"

This reverts commit f2eb1f22c1.

* align create dialog texts

* fix indention

* Bumped version of test helpers

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2025-10-21 15:24:52 +02:00
Jacob OvergaardandGitHub de5a9ca5af Preview: Replaces WebSocket with the SignalR library to improve connectivity in the preview window (#20585)
* feat: replaces manual WebSocket with the actual SignalR library on the preview context

* feat: informs the developer what went wrong in preview mode

* feat: awaits the stop connection before proceeding

* feat: ensures no existing connection exists
2025-10-21 13:20:17 +00:00
Kenn JacobsenandGitHub 58068d1aa7 Rendering: Explicitly contextualize variation context for language fallback (closes #20350) (#20587)
Expliticly contextualize variation context for language fallback rendering
2025-10-21 14:41:29 +02:00
5f1c65e7ea User group: permissions grouping (#20584)
* clean up

* localizations

* group user permission by entity type

* adjustments

* fix lint errors

* Support granular permissions without entity type

Updated granular permission handling to allow permissions that are not tied to a specific entity type. Adjusted rendering logic and manifest interface to support undefined or empty forEntityTypes, and added UI for displaying ungrouped granular permissions.

* revert for now

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-10-21 12:10:41 +00:00
Laura NetoandGitHub 20eedda4c7 Template: Update dotnet project template to remove previous LTS checks (#20573)
* Remove now unnecessary LTS checks from project dotnet template

* Update the starter kit versions
2025-10-21 13:12:25 +02:00
1099332edb Fixes broken integration test for v17 release (#20582)
Fixes broken integration test

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-10-21 10:42:22 +00:00
Andy ButlandandLaura Neto 3a83e4a494 Publishing: Resolve exceptions on publish branch (#20464)
* Reduce log level of image cropper converter to avoid flooding logs with expected exceptions.

* Don't run publish branch long running operation on a background thread such that UmbracoContext is available.

* Revert to background thread and use EnsureUmbracoContext to ensure we can get an IUmbracoContext in the URL providers.

* Updated tests.

* Applied suggestion from code review.

* Clarified comment.
2025-10-21 12:22:50 +02:00
Andy ButlandandGitHub daace4b4a0 Publishing: Resolve exceptions on publish branch (#20464)
* Reduce log level of image cropper converter to avoid flooding logs with expected exceptions.

* Don't run publish branch long running operation on a background thread such that UmbracoContext is available.

* Revert to background thread and use EnsureUmbracoContext to ensure we can get an IUmbracoContext in the URL providers.

* Updated tests.

* Applied suggestion from code review.

* Clarified comment.
2025-10-21 12:05:10 +02:00
Andy ButlandandLaura Neto af3b17243b Media: Fixes SQL error to ensure database relation between user group media start folder and deleted media item is removed (closes #20555) (#20572)
Fixes SQL error to ensure database relation between user group media start folder and deleted media item is removed.
# Conflicts:
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaRepository.cs
2025-10-21 11:42:19 +02:00
Andy ButlandandGitHub 1ceec183a3 Media: Fixes SQL error to ensure database relation between user group media start folder and deleted media item is removed (closes #20555) (#20572)
Fixes SQL error to ensure database relation between user group media start folder and deleted media item is removed.
2025-10-21 11:38:01 +02:00
d05add4e1f Tiptap RTE: Allow removal of unregistered extensions (#20571)
* Tiptap toolbar config: enable removal of unregistered extensions

* Tiptap statusbar config: enable removal of unregistered extensions

* Tiptap toolbar config: Typescript tidy-up

* Tiptap toolbar sorting amend

Removed the need for the `tiptap-toolbar-alias` attribute,
we can reuse the `data-mark`.

* Tiptap extension config UI amend

If the extension doesn't have a `description`,
then add the `alias` to the title/tooltip, to give a DX hint.

* Tiptap toolbar: adds `title` to placeholder skeleton

* Added missing `forExtensions` for Style Select and Horizontal Rule toolbar extensions

* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/toolbar-configuration/property-editor-ui-tiptap-toolbar-configuration.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/statusbar-configuration/property-editor-ui-tiptap-statusbar-configuration.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-21 10:43:52 +02:00
Andy Butlandandmole 68d1b9481a Hybrid Cache: Resolve start-up errors with mis-matched types (#20554)
* Be consistent in use of GetOrCreateAsync overload in exists and retrieval.
Ensure nullability of ContentCacheNode is consistent in exists and retrieval.

* Applied suggestion from code review.

* Move seeding to Umbraco application starting rather than started, ensuring an initial request is served.

* Tighten up hybrid cache exists check with locking around check and remove, and use of cancellation token.

(cherry picked from commit 81a8a0c191)
2025-10-21 09:59:49 +02:00
Andy ButlandandGitHub 81a8a0c191 Hybrid Cache: Resolve start-up errors with mis-matched types (#20554)
* Be consistent in use of GetOrCreateAsync overload in exists and retrieval.
Ensure nullability of ContentCacheNode is consistent in exists and retrieval.

* Applied suggestion from code review.

* Move seeding to Umbraco application starting rather than started, ensuring an initial request is served.

* Tighten up hybrid cache exists check with locking around check and remove, and use of cancellation token.
2025-10-21 09:57:29 +02:00
Laura NetoandGitHub e6f48799a1 Property Editors: DateTimeWithTimeZone - Changing timezone mode to Local shows invalid time zone error (#20526)
* Store local time zone as UTC and do not throw validation error when stored time zone is different

* Additional fixes when switching between date time editors with and without time zone

* Additional fixes

* Ensure that an update is triggered when the expected value does not match the stored value

This will happen when switching between editors (with and without time zone) or switching between a specific time zone to the editor's local time zone.

* Fix inconsistencies with null and undefined

* Fix inconsistencies between date/time provided to the client and returned in the value converter (when switching between editors)

* Fix unit tests and small bug

* Adjust integration test

* Small improvement

* Update test data

* Adjust logic so that time zone offsets are updated every time the date value changes

* Do not pre-select time zone when switching between unspecified and time zone editors
2025-10-21 09:29:46 +02:00
ae41438a36 Tiptap RTE: Allow removal of unregistered extensions (#20571)
* Tiptap toolbar config: enable removal of unregistered extensions

* Tiptap statusbar config: enable removal of unregistered extensions

* Tiptap toolbar config: Typescript tidy-up

* Tiptap toolbar sorting amend

Removed the need for the `tiptap-toolbar-alias` attribute,
we can reuse the `data-mark`.

* Tiptap extension config UI amend

If the extension doesn't have a `description`,
then add the `alias` to the title/tooltip, to give a DX hint.

* Tiptap toolbar: adds `title` to placeholder skeleton

* Added missing `forExtensions` for Style Select and Horizontal Rule toolbar extensions

* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/toolbar-configuration/property-editor-ui-tiptap-toolbar-configuration.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/statusbar-configuration/property-editor-ui-tiptap-statusbar-configuration.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-21 07:28:01 +00:00
dependabot[bot]andJacob Overgaard 1efdde2473 Bump vite from 7.1.9 to 7.1.11 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.1.9 to 7.1.11.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.11/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.11
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-21 09:14:05 +02:00
dependabot[bot]andJacob Overgaard 5337c38f2c Bump vite from 7.1.9 to 7.1.11 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.1.9 to 7.1.11.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.11/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.11
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-21 09:13:34 +02:00
Nhu DinhandGitHub 7751e40ba8 E2E: QA Fixed the flaky tests related to publishing content with image cropper (#20577)
Added more waits
2025-10-21 08:50:13 +02:00
Mads RasmussenandGitHub c666c00ac5 Document/Media Recycle Bin: Add missing root workspace views (#20494) (#20569)
* add document recycle bin root workspace

* add media recycle bin root workspace

* export consts
2025-10-20 16:42:52 +02:00
Mads RasmussenandGitHub 94692cccb7 Document/Media Recycle Bin: Show full breadcrumb (#20547)
* register structure context for recycle bin

* Update manifests.ts

* export consts

* move href construction to context + override for document and media
2025-10-20 13:43:10 +02:00
Lee Kelleherandleekelleher ab4be79da0 Preview: Redirect to published URL on exit (#20556)
* Preview Exit: Gets the page's published URL on exit for redirect

* Preview Open Website: Uses the page's published URL

* Tweaked the published URL logic

* Code amends based on @copilot's suggestions

(cherry picked from commit d5a2f0572e)
2025-10-20 10:55:08 +01:00
Andy ButlandandGitHub a808e3ab46 Added direct dependency to secure version of Microsoft.Build.Tasks.Core in Umbraco.Web.UI (#20546)
Added direct dependency to secure version of Microsoft.Build.Tasks.Core in Umbraco.Web.UI.
2025-10-20 11:54:26 +02:00
Lee KelleherandGitHub d5a2f0572e Preview: Redirect to published URL on exit (#20556)
* Preview Exit: Gets the page's published URL on exit for redirect

* Preview Open Website: Uses the page's published URL

* Tweaked the published URL logic

* Code amends based on @copilot's suggestions
2025-10-20 11:51:38 +02:00
Mads RasmussenandGitHub 92dbaf7162 Document/Media: Readonly when in recycle bin (#20541)
* make document and media readonly when trashed + reload the entity

* introduce restore event + remove readonly

* handle media audit log todos

* disable content type picker when trashed

* disable template picker when trashed
2025-10-17 17:49:05 +00:00
Kenn JacobsenandGitHub ae2c59b703 Make the indexing batch size configurable (#20543)
* Introduce configurable batch size for indexing

* Stop using Examine indexing events for reporting index rebuild operation completeness (it is volatile)
2025-10-17 15:45:03 +02:00
Andy Butland 72d44decd4 Update OpenApi.json and client-side models. 2025-10-17 15:30:43 +02:00
Anders ReusandAndy Butland 7e7d9da144 Added trashed state so when requesting content from the recycle bin via the management api it will return trashed instead of published state (#20542)
Added trashed state so when requesting content from the recycle bin via the management api, the state will be trashed instead of published.
2025-10-17 15:22:11 +02:00
Andy Butland b142dcc84f Merge branch 'main' into v17/dev 2025-10-17 15:20:55 +02:00
Andy Butland 8b1f18699d Update OpenApi.json and client-side models. 2025-10-17 15:20:01 +02:00
Lee KelleherandJacob Overgaard f82c0a90e7 UFM: Adds $index support to Block editors (fixes #20470) (#20488)
* Block List: adds `$index` support for UFM labels

* Block Grid: adds `$index` support for UFM labels

* Block RTE: adds `$index` support for UFM labels

Which is always zero `0`.
But has been wired up if we do implement the index order in future.
2025-10-17 15:03:21 +02:00
Andy Butland 5a65eb1758 Update OpenApi.json and client-side models. 2025-10-17 15:01:09 +02:00
Andy Butland 5278b67f60 Merge branch 'main' into v17/dev 2025-10-17 14:41:06 +02:00
Anders ReusandGitHub 105cb9da41 Added trashed state so when requesting content from the recycle bin via the management api it will return trashed instead of published state (#20542)
Added trashed state so when requesting content from the recycle bin via the management api, the state will be trashed instead of published.
2025-10-17 14:40:18 +02:00
Andy ButlandandJacob Overgaard a3a8be4717 Templates: Retain layout from file when loading template (closes #20524) (#20529)
Retain layout from file when loading template.
2025-10-17 10:47:21 +02:00
Andy ButlandandGitHub 65798b5722 Templates: Retain layout from file when loading template (closes #20524) (#20529)
Retain layout from file when loading template.
2025-10-17 10:46:54 +02:00
Jacob Overgaard 7d0adc4755 build(deps): bumps @umbraco-ui/uui from 1.16.0-rc.0 to 1.16.0 2025-10-17 10:36:38 +02:00
Jacob Overgaard d17ba805b2 build(deps): bumps @umbraco-ui/uui from 1.16.0-rc.0 to 1.16.0 2025-10-17 09:56:42 +02:00
Andy Butland 96f597e440 Merge branch 'release/16.3.1'
# Conflicts:
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-10-17 09:55:20 +02:00
Andreas ZerbstandGitHub 11bf60a67c E2E: Updated exisiting acceptance tests to match updates from front end (#20525)
* Updated tests

* E2E: Updated acceptance tests to match changes (#20493)

* Updated tests to match changes

* More updates

* Bumped version

* Reverted change
2025-10-17 09:37:44 +02:00
Andy Butland de0503d90c Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyValueEditor.cs
2025-10-16 21:12:57 +02:00
Ben WhiteandAndy Butland 6458bb40f9 Don't use non-generic ILogger as a fallback in BlockEditorPropertyValueEditor (#20532)
Update logger service retrieval in BlockEditorPropertyValueEditor
2025-10-16 21:07:16 +02:00
Ben WhiteandGitHub 31bcbc1147 Don't use non-generic ILogger as a fallback in BlockEditorPropertyValueEditor (#20532)
Update logger service retrieval in BlockEditorPropertyValueEditor
2025-10-16 21:06:10 +02:00
Andy Butland 62edad17a1 Bumped version to 16.3.1. 2025-10-16 20:50:59 +02:00
4a504e8c95 Extensions: Adds @provideContext and @consumeContext decorators for a better developer experience (#20510)
* feat: adds first draft of a context consume decorator

* feat: uses an options pattern

* feat: changes approach to use `addInitializer` and `queueMicroTask` instead

* feat: adds extra warning if context is consumed on disconnected controllers

* feat: example implementation of consume decorator

* feat: adds support for 'subscribe'

* feat: initial work on provide decorator

* docs: adds license to consume decorator

* feat: adds support for umbraco controllers with `hostConnected`

* feat: uses asPromise to handle one-time subscription instead

* test: adds unit tests for consume decorator

* feat: adds support for controllers through hostConnected injection

* feat: adds support for controllers through hostConnected injection

* test: adds unit tests for provide decorator

* docs: adds more documentation around usage and adds a few warnings in console when it detects wrong usage

* feat: removes unused controllerMap

* docs: adds wording on standard vs legacy decorators

* docs: clarifies usage around internal state

* feat: adds proper return types for decorators

* docs: adds more types

* feat: makes element optional

* feat: makes element optional

* feat: uses @consume in the log viewer to showcase

* chore: cleans up debug info

* feat: renames to `consumeContext` and `provideContext` to stay inline with our own methods

* chore: removes unneeded typings

* chore: removes not needed check

* chore: removes not needed check

* test: adds test for rendered value

* feat: splits up code into several smaller functions

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docs: augments code example for creating a context

* Update src/Umbraco.Web.UI.Client/src/packages/log-viewer/workspace/views/search/components/log-viewer-search-input.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-16 15:38:26 +01:00
Engiber LozadaandGitHub 271edb5214 News Dashboard: split into card + container, parent handles the data from the repo (#20503)
* Made card element it is own reusable component and passing the data as property.

* Created the umb-news-container element to handle all the priority grouping.

* Added hover styles to normal-priority cards.

* Removed unused variable.
2025-10-16 12:55:43 +00:00
Kenn JacobsenandAndy Butland 369b020d9d Explicitly flush isolated caches by key for content updates (#20519)
* Explicitly flush isolated caches by key for content updates

* Apply suggestions from code review

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-10-16 14:17:04 +02:00
Mads RasmussenandGitHub 8beb7f2acc Collection menu item extension point (#20506)
* add extension option for collection menu item

* Add collection menu module export

* remove unused css

* register user collection menu item

* register user collection menu

* use collection modal for user picker

* Delete user-picker-modal.element.ts

* Update manifests.ts

* explicit exports to avoid name collision

* hack to avoid circular dependency

* fix lint errors

* fix missing const export

* Update collection-menu-item.element.ts
2025-10-16 12:57:15 +01:00
498754e170 Explicitly flush isolated caches by key for content updates (#20519)
* Explicitly flush isolated caches by key for content updates

* Apply suggestions from code review

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-10-16 10:56:32 +00:00
Andreas ZerbstandGitHub ae73fb3431 E2E: Updated acceptance tests to match changes (#20493)
* Updated tests to match changes

* More updates

* Bumped version

* Reverted change
2025-10-16 09:24:56 +00:00
Laura Neto ec354cef92 Merge branch 'release/16.3'
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-10-16 10:05:33 +02:00
Andy ButlandandGitHub 3830d75413 Obsolete GetAtRoot on DocumentCache (#20514)
Obsolete GetAtRoot on DocumentCache.
2025-10-16 08:23:20 +02:00
Laura Neto a504fd1ef8 Bump version to 16.3.0 2025-10-16 08:22:11 +02:00
Andy Butland f1f2f702c0 Restored and obsoleted removed extension method AsEnumerableOfOne. 2025-10-15 20:22:58 +02:00
Andy Butland c5c417d08e Merge branch 'release/17.0' into v17/dev 2025-10-15 20:13:08 +02:00
2503cabbce Dependencies: Update to .NET 10 RC 2 (#20508)
* Update to .NET 10 RC 2.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-15 20:12:11 +02:00
Niels Lyngsø cee163ae1f Merge branch 'release/17.0' into v17/dev 2025-10-15 14:13:47 +02:00
Niels Lyngsø 7e8a7f0b40 Cherry picked 4c05a114c5 2025-10-15 14:11:25 +02:00
Warren BuckleyandGitHub 4c05a114c5 Fixes 20476 - Changes icon to be no entry sign (#20496) 2025-10-15 14:10:39 +02:00
Niels LyngsøandGitHub 126c8a56d5 variant selector: hint badge should render in append slotfor the variant selector (#20504)
ensure variant-selector badge gets rendered at the right spot
2025-10-15 09:29:49 +00:00
Niels Lyngsø 2412c662df Merge branch 'release/17.0' into v17/dev
# Conflicts:
#	version.json
2025-10-15 10:23:39 +02:00
Andy Butland 99ea8b9087 Back Office: Fixes link to workspace root from breadcrumb trail (closes: #20455) (#20459)
Fixes link to workspace root from breadcrumb trail.
2025-10-15 10:12:58 +02:00
Andy Butland b25feac011 Merge branch 'main' into v17/dev 2025-10-15 10:12:28 +02:00
Andy ButlandandGitHub e71f36d816 Back Office: Fixes link to workspace root from breadcrumb trail (closes: #20455) (#20459)
Fixes link to workspace root from breadcrumb trail.
2025-10-15 10:06:00 +02:00
Andy Butland 86dda9f9b3 Content Types: Prevent creation of document type with an alias that case insensitively matches an existing alias (closes #20467) (#20471)
Prevent creation of document type with an alias that case insensitively matches an existing alias.
2025-10-15 09:49:32 +02:00
Andy Butland a95fd9f340 Merge branch 'main' into v17/dev 2025-10-15 09:48:05 +02:00
Andy ButlandandGitHub fdf759d08d Content Types: Prevent creation of document type with an alias that case insensitively matches an existing alias (closes #20467) (#20471)
Prevent creation of document type with an alias that case insensitively matches an existing alias.
2025-10-15 09:41:41 +02:00
Nikolaj Geisle 9c082c613e bump version to beta2 2025-10-15 08:55:15 +02:00
1ab13a970b Dashboard: Add tests for create and using custom dashboard (#20253)
* add tests for custom dashboard

* update test dashboard using helper

* remove extensionRegistry for playwright config

* update helper version for dashboard

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/CustomDashboard.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* fix format code

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
2025-10-15 13:33:41 +07:00
e22b459d9c WorkspaceView: Add tests for create and using custom workspace view (#20408)
* WorkspaceView: Add tests for create and using custom workspace view

* update helper version

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/WorkspaceView.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/WorkspaceView.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* update format code

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/WorkspaceView.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/WorkspaceView.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/WorkspaceView.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
2025-10-15 13:33:24 +07:00
Copilotandleekelleher 5af9df1871 UFM: Add camelCase aliases for UFM filters to support UFMJS expressions (closes #20500) (#20501)
* Initial plan

* Add camelCase aliases for UFM filters with hyphens (stripHtml, titleCase, wordLimit)

Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>

* Add manifest tests for camelCase filter aliases

Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>

* discards tests that are not useful

* test: updates imports for stripHtml api

* Exports `UmbUfmStripHtmlFilterApi` class

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
(cherry picked from commit a19b9fb5fe)
2025-10-14 17:42:22 +01:00
CopilotGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>iOvergaardleekelleher
a19b9fb5fe UFM: Add camelCase aliases for UFM filters to support UFMJS expressions (closes #20500) (#20501)
* Initial plan

* Add camelCase aliases for UFM filters with hyphens (stripHtml, titleCase, wordLimit)

Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>

* Add manifest tests for camelCase filter aliases

Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>

* discards tests that are not useful

* test: updates imports for stripHtml api

* Exports `UmbUfmStripHtmlFilterApi` class

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-10-14 16:35:42 +00:00
Mads RasmussenandGitHub 12297ea617 Picker data source: Add support for pickable filters (#20491)
* add pickable to vs code dictionary

* set up types for pickable filters in data sources

* pass search pickable filter to search result

* apply filter config in document data source example

* add pickable filters to custom tree example

* Update input-entity-data.context.ts

* remove unused

* Update types.ts
2025-10-14 17:11:34 +01:00
Anders ReusandAndy Butland 3892670d92 Added culture to the ApiContentRouteBuilder to include variant languages. (#20366) (#20499)
Added culture to the ApiContentRouteBuilder to include variant languages.
2025-10-14 16:14:02 +02:00
Andy Butland 07d0d7d2ee Merge branch 'main' into v17/dev 2025-10-14 16:10:59 +02:00
Anders ReusandGitHub cdf9ee4566 Added culture to the ApiContentRouteBuilder to include variant languages. (#20366) (#20499)
Added culture to the ApiContentRouteBuilder to include variant languages.
2025-10-14 16:06:48 +02:00
Mads Rasmussen d9de69c40f fix import in storybook of moved file 2025-10-14 12:27:21 +02:00
Mads Rasmussen ac56bffef2 fix import in storybook of moved file 2025-10-14 12:26:25 +02:00
Sven GeusensandSven Geusens 49f3fc9993 Delivery API: Fix not reindexing branch descendants when branch root already published but unchanged (closes #20370) (#20462)
* Fix deliveryApi not reindexing branch descendants when branch root already published and unchanged

* Commit update and name improvement
2025-10-14 12:18:26 +02:00
Sven Geusens 068183ac35 Merge branch 'main' into v17/dev 2025-10-14 12:17:06 +02:00
Sven GeusensandGitHub e53220c8f5 Delivery API: Fix not reindexing branch descendants when branch root already published but unchanged (closes #20370) (#20462)
* Fix deliveryApi not reindexing branch descendants when branch root already published and unchanged

* Commit update and name improvement
2025-10-14 12:15:01 +02:00
7f1cdf8ef5 Auhorization: Cherrypicked integration tests from V15 (#20492)
* V15 QA Added the authorization integration tests (#18419)

* Added authorization integration tests

* Removed unnecessary tests and update tests for preview controller

* Updated to use the newest changes from v15/dev and added an override for the AuthenticateClientAsync to use the userGroupKey

* Updated CompatibilitySuppressions to include changes from integration tests

* Updated pipelines

* Skips managementApi tests

* Only run necessary tests

* Added new schema per fixture to reduce test setup time

* Fixed failing tests

* Updated test setup

* Updated test

* Added suppression

* Fixed failing tests

* Updated addOnTeardown methods to protected

* Added method for clearing the host

* Added teardown

* Updated model usage

* Added a lot of cleanup for memory leak issues when running tests

* Added CompatibilitySuppressions.xml

* Updated tests

* Cleaned up

* Adjusted base classes

* Updated pipeline

* Updated CompatibilitySuppressions.xml

* Updated test logging

* Fixed reponse

* Updated condition to skip tests

* Updated tests, not done

* Reworked test to expect correct responses with correct setup

* Updated tests

* More updates to tests

* Updated tests

* Cleaned up tests

* Updated setup

* Cleaned up tests to match setup

* Cleaned up setup

* Removed suppression

* Fixed tests

* Move order of checks

* Fix naming

* Formatting

* Dispose of host

* Keep track of if we're disposed

* Compat suppression

* Dont dispose

* Fix failing tests

* removed unused virtual

* Updated CompatibilitySuppressions.xml

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Zeegaan <skrivdetud@gmail.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
# Conflicts:
#	tests/Umbraco.Tests.Integration/CompatibilitySuppressions.xml
#	tests/Umbraco.Tests.Integration/ManagementApi/ManagementApiTest.cs
#	tests/Umbraco.Tests.Integration/ManagementApi/Policies/AllCultureControllerTests.cs
#	tests/Umbraco.Tests.Integration/ManagementApi/Policies/CreateDocumentTests.cs
#	tests/Umbraco.Tests.Integration/ManagementApi/Policies/UpdateDocumentTests.cs
#	tests/Umbraco.Tests.Integration/ManagementApi/Preview/EndPreviewTests.cs
#	tests/Umbraco.Tests.Integration/ManagementApi/Preview/EnterPreviewTests.cs
#	tests/Umbraco.Tests.Integration/TestServerTest/UmbracoTestServerTestBase.cs

* Updated test

* Updates

* Removed unnessecary test

---------

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
Co-authored-by: Zeegaan <skrivdetud@gmail.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-10-14 10:04:10 +00:00
Andy ButlandandZeegaan 37b239b8ca Performance: Reduce number of database calls in save and publish operations (#20485)
* Added request caching to media picker media retrieval, to improve performance in save operations.

* WIP: Update or insert in bulk when updating property data.

* Add tests verifying UpdateBatch.

* Fixed issue with UpdateBatch and SQL Server.

* Removed stopwatch.

* Fix test on SQLite (failing on SQLServer).

* Added temporary test for direct call to NPoco UpdateBatch.

* Fixed test on SQLServer.

* Add integration test verifying the same property data is persisted as before the performance refactor.

* Log expected warning in DocumentUrlService as debug.

(cherry picked from commit 12adfd52bd)
2025-10-14 11:29:24 +02:00
Andy ButlandandGitHub 12adfd52bd Performance: Reduce number of database calls in save and publish operations (#20485)
* Added request caching to media picker media retrieval, to improve performance in save operations.

* WIP: Update or insert in bulk when updating property data.

* Add tests verifying UpdateBatch.

* Fixed issue with UpdateBatch and SQL Server.

* Removed stopwatch.

* Fix test on SQLite (failing on SQLServer).

* Added temporary test for direct call to NPoco UpdateBatch.

* Fixed test on SQLServer.

* Add integration test verifying the same property data is persisted as before the performance refactor.

* Log expected warning in DocumentUrlService as debug.
2025-10-14 11:22:21 +02:00
Laura Neto ea44850804 Dependencies: Remove Microsoft.CodeAnalysis.CSharp dependency from Umbraco.Infrastructure (#20481)
* Remove Microsoft.CodeAnalysis.CSharp from Infrastructure project

This was only needed for runtime compilation and thus is no longer needed in Infrastructure.
It also caused dependency problems with EF Core Design in previous versions.

* Disable CPM for UI project to better reflect consumers

This will ensure that we face any potential dependency issues consumers are also likely to run into.

* Add `Microsoft.CodeAnalysis.CSharp` reference to `Umbraco.Cms.DevelopmentMode.Backoffice`
2025-10-14 09:49:46 +02:00
Laura Neto 4dbb4eb48b Merge branch 'main' into v17/dev
# Conflicts:
#	Directory.Packages.props
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
2025-10-14 09:48:16 +02:00
Laura NetoandGitHub b5662d9c89 Dependencies: Remove Microsoft.CodeAnalysis.CSharp dependency from Umbraco.Infrastructure (#20481)
* Remove Microsoft.CodeAnalysis.CSharp from Infrastructure project

This was only needed for runtime compilation and thus is no longer needed in Infrastructure.
It also caused dependency problems with EF Core Design in previous versions.

* Disable CPM for UI project to better reflect consumers

This will ensure that we face any potential dependency issues consumers are also likely to run into.

* Add `Microsoft.CodeAnalysis.CSharp` reference to `Umbraco.Cms.DevelopmentMode.Backoffice`
2025-10-14 09:39:53 +02:00
494674d354 Entity Actions: More create button discernible text, extension of #20434 (#20458)
* added hovering and focus border to RTE

* fix main to OG

* fix to main again

* I'm going to cry

* Missing localiztion feature, maybe UmbLitElement?

* added localization controller to fetch localized version

* localization successful for viewActionsFor and CreateFor

* clean up button text

* Changed label for content header to display proper name

* clean up code

* Included button labels for media section

* clean code

* Relocated localization keys,

as `actions_viewActionsFor` already existed.

Also made into a function, to support a fallback label.

* Simplified the "Create for" label/localization

Removed the need for a `getCreateAriaLabel()` method.

* Removed the double-localizations (of `actions_viewActionsFor`)

as the "umb-entity-actions-bundle" component handles this now.

* imports tidy-up

* Simplified localization key condition

* switched to new localization key for other sections for new labeling

* Bumped `@umbraco/playwright-testhelpers` 16.0.55

https://github.com/umbraco/Umbraco.Playwright.Testhelpers/releases/tag/release%2F16.0.55

---------

Co-authored-by: Oskar kruger <obk@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-10-14 07:20:01 +00:00
Niels Lyngsø 4c42175ffc Merge branch 'release/17.0' into v17/dev
# Conflicts:
#	version.json
2025-10-14 08:54:54 +02:00
Lee KelleherandGitHub 4ba186633c UFM: Adds $index support to Block editors (fixes #20470) (#20488)
* Block List: adds `$index` support for UFM labels

* Block Grid: adds `$index` support for UFM labels

* Block RTE: adds `$index` support for UFM labels

Which is always zero `0`.
But has been wired up if we do implement the index order in future.
2025-10-14 08:46:48 +02:00
Andy Butland e336f9dfb0 Merge branch 'release/16.3'
# Conflicts:
#	version.json
2025-10-14 08:22:07 +02:00
Mads RasmussenandGitHub 8be2d77006 Only register the Entity Data Picker when we have some registered Data Sources (#20484)
Add conditional registration for Entity Data Picker

Introduces an entry point for the Entity Data Picker property editor that registers its manifests only if picker data sources are present, preventing an unusable UI from appearing by default.
2025-10-13 20:56:07 +02:00
Niels LyngsøandGitHub a6eb2a1527 Modals: Make Create Actions open a Dialogs (#20489)
* generic create dialog

* document create dialog

* media create dialog

* member create

* partial view
2025-10-13 20:53:29 +02:00
11fcfba091 News dashboard: API and rendering of news stories on dashboard (#20416)
* Adding controller

* Lower case route to match other endpoints

* Adding service and typed output

* Renaming to NewsDashboard

* Moving more stuff to service

* Removing unused code

* Some refactoring in accordance with better architecture

* Created repository and mock data source for the news dashboard also display some data in the UI.

* Minor refactoring: naming, aligning with existing controller patterns.

* Update OpenApi.json.

* Update typed client sdk and types.

* Provide language to API endpoint, just in case we want to localize news in the future.

* Obsoleted configuration

* Moved mock data to mocks folder and updated repository to use the actual response model and service from the Api

* Prepared news repository with server data source.

* Rendered news items according to required group structure.
Added TODOs for remaining tasks.

* Fixed FE build issues.

* Update src/Umbraco.Core/Constants-Configuration.cs

* Fixed grid spacing, sanitize code and make the styles closer to the v13.

* Added container query and padding to the card body.

* Fix padding

* Fixed title according to priority.

* Relocated/renamed the news server data-source file

* Simplified the news repo/data-source classes

by extending `UmbControllerBase`, the host constructor is handled for us.

* Added `types.ts` export type files

* Refactored interface name + typing

* Added `uui-loader` component

* Tweaked styles, added box-shadow to cards

Added flexbox gap to the card body.

* Sorted import order

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-10-13 20:27:07 +02:00
3393febdca News dashboard: API and rendering of news stories on dashboard (#20416)
* Adding controller

* Lower case route to match other endpoints

* Adding service and typed output

* Renaming to NewsDashboard

* Moving more stuff to service

* Removing unused code

* Some refactoring in accordance with better architecture

* Created repository and mock data source for the news dashboard also display some data in the UI.

* Minor refactoring: naming, aligning with existing controller patterns.

* Update OpenApi.json.

* Update typed client sdk and types.

* Provide language to API endpoint, just in case we want to localize news in the future.

* Obsoleted configuration

* Moved mock data to mocks folder and updated repository to use the actual response model and service from the Api

* Prepared news repository with server data source.

* Rendered news items according to required group structure.
Added TODOs for remaining tasks.

* Fixed FE build issues.

* Update src/Umbraco.Core/Constants-Configuration.cs

* Fixed grid spacing, sanitize code and make the styles closer to the v13.

* Added container query and padding to the card body.

* Fix padding

* Fixed title according to priority.

* Relocated/renamed the news server data-source file

* Simplified the news repo/data-source classes

by extending `UmbControllerBase`, the host constructor is handled for us.

* Added `types.ts` export type files

* Refactored interface name + typing

* Added `uui-loader` component

* Tweaked styles, added box-shadow to cards

Added flexbox gap to the card body.

* Sorted import order

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-10-13 18:20:01 +00:00
Niels Lyngsø 28e4caaad3 fix merge gone wrong 2025-10-13 18:42:06 +02:00
Lee KelleherandGitHub 3ac37f3686 Recycle Bin: Trigger cache invalidation for trashed document/media items (#20483)
* Configure document/media items to listen for `Trashed` server-events for cache invalidation

* Fire reload event on restore destination tree/menu

* Removed "trashed" part of the code comment
2025-10-13 16:32:48 +01:00
0a027dd80d Dependencies: Fixed dependency conflicts when installing Microsoft.EntityFrameworkCore.Design (closes #20421) (#20474)
* Add explicit references to Microsoft.CodeAnalysis.* packages to fix conflicts when installing Microsoft.EntityFrameworkCore.Design

This allows consumers to simply install Microsoft.EntityFrameworkCore.Design without having to manually install specific versions to deal with transitive dependency problems.

* Disable CPM for UI project to better reflect consumers

* Update src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-13 13:12:45 +02:00
Mads RasmussenandGitHub d6b9eb61b2 Entity data picker: Hide tree root (#20473)
Change tree root visibility in entity data picker
2025-10-13 06:44:11 +00:00
Bjarne FyrstenborgandAndy Butland 0367e56db6 UX: Center align log type in media history view (#20469)
Center align log type in media
2025-10-13 06:35:24 +02:00
Andy Butland e28153f004 Merge branch 'main' into v17/dev 2025-10-13 06:34:47 +02:00
Bjarne FyrstenborgandGitHub 7b4684cd70 UX: Center align log type in media history view (#20469)
Center align log type in media
2025-10-13 06:34:02 +02:00
Mads RasmussenandGitHub 2ce6c8f8c8 Make data source field mandatory, when supported, in data type details (#20463)
Make data source field mandatory in data type details
2025-10-12 17:52:35 +00:00
fd1c9f1673 Refactoring: Fixed spelling mistake in method name (#20460)
* Fixed spelling mistake in method name.

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-10 15:06:49 +02:00
Andy Butland 2c284a702a Merge branch 'main' into v17/dev 2025-10-10 15:06:11 +02:00
3df8b9e41a Refactoring: Fixed spelling mistake in method name (#20460)
* Fixed spelling mistake in method name.

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-10 13:00:47 +00:00
Mads RasmussenandGitHub c68a26cb5f Input Entity Data Picker: wire up client validation (#20456)
trigger client validation if the amount configuration is not met
2025-10-10 14:47:39 +02:00
c037323910 PropertyType workspace: layout & labeling adjustments (#20131)
* Property workspace update

* Fixed error with updating the properties

* Unused variable

* Added data-mark to description textarea

* make select 100% width

* tiny appearance-option style adjustments

* Make placeholder property inside the input-with-alias optional

* Moving variations and member type option to their own boxes

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-10-10 12:37:26 +02:00
f60436270f Property Editor Data Source (#20375)
* Add property editor data source extension types

Introduces types and extension interfaces for property editor data sources, including manifest and API definitions. Updates the main property-editor types export to include the new data source types.

* add test data sources

* wip collection and item repos

* export consts

* fix picker modal token

* make global components file

* render picker in data type

* wire up repositories

* append editor data source alias to data type detail model

* fix global manifest declaration

* make optional

* fix types

* register collection item picker modal element + wip collection menu extension

* register collection menu for property editor data source

* wire up modal tokens

* fix circular

* register as global element

* register default kind for collection menu

* wip fleshing out collection menu

* pass props + listen for selection events

* fix imports

* accept icon in manifest

* extend base type

* use correct data to calculate length

* export types

* add load more button

* wire up load more

* remove debugger

* add search for property editor data sources

* only select one data source

* rename file

* add entity type

* add manifest for search result item

* fix imports/exports

* fix manifest imports

* wire up data source value with workspace

* remove debugger

* wip property editor + input

* move data-source files

* more specific extension types

* remove copy from file name

* allow settings in manifests

* export types

* merge settings

* fix ui alias

* remerge if data source is removed

* Update data-type-details-workspace-view.element.ts

* reset data

* Update data-type-workspace.context.ts

* update merging + move mapping to data source

* Fix mutation of data.values in data type detail mapping

Refactored #mapServerResponseModelToEntityDetailModel to avoid mutating the original data.values array when removing the editorDataSourceAlias. This ensures the original server response remains unchanged and improves data integrity.

* add  forDataSourceTypes to manifest

* update interfaces

* test data source implementations

* only show data source select if property editor supports it

* remove custom context

* remove unused token

* use generic collection item picker modal

* remove custom modal

* export types

* render data source alias on data type into view

* pass data source alias

* allow data source alias

* allow data source alias

* pass data source alias

* add prop for data source alias

* Add property editor data source alias support

* Add editor data source alias to property context

Introduces support for storing and retrieving the editor data source alias in UmbPropertyContext. Updates UmbPropertyElement to use the context for managing the data source alias and ensures the alias is set on the property editor element.

* pass data source alias to input

* pass data source alias to context

* update js docs

* split types from token file

* fix import

* update error message

* add more test sources

* Refactor repository manager initialization logic

Changed the initialization flow in UmbRepositoryItemsManager to support optional repository alias and deferred repository setup. Added setItemRepository and getItemRepository methods for explicit repository management, and moved repository initialization logic to a dedicated private method.

* remove support for passing a filter

* wip wire up input with modal

* add constant

* test user data source

* add todo

* require entityType on webhook items

* add entityType

* use id as unique

* add default icon

* wire up search

* add search to media

* pass config

* support configuration in data sources + temp test cases

* remove temp text

* change to one generic extension type with a data type sub type

* search in label

* pass filter args to collection item picker

* clean up

* aligning interfaces

* iterate status instead of item

* simplify examples

* add types for config

* move to examples

* add custom data examples for collection and tree

* update imports

* add manifests for collection and tree custom data examples

* add type guards

* add type guards

* Update types.ts

* add return type

* remove debuggers

* make observables optional

* add null checks for observables

* use statuses

* extend picker input context

* map config

* use data to set value when there is no observable

* store as string array

* Add getDefaultApiConstructor to tree item element

* make it optional

* fix search types

* add fallback icon and name

* remove unused imports

* pass stored value to input

* rename file

* remove unused config value

* make api observable

* add search to custom collection example

* render fallback item

* fix import order

* add fallback render to tree item element

* Update tree-item.element.ts

* Revert "Update tree-item.element.ts"

This reverts commit 3458877de9.

* Revert "add fallback render to tree item element"

This reverts commit b30219d3ed.

* move from data type to property editor

* align file names

* introduce picker-property-editor module

* remove custom types

* use basic types

* use tree item type

* Update input-entity-data.context.ts

* update types

* add interface for item model

* force unique on collection item model

* require an item model in picker context

* allow icon to be null

* extend item model from user group item model

* add entity type to mapped data

* Update user-group-item.server.data-source.ts

* align static file models

* correct types for user picker

* extend item model

* fix types

* more type fixing

* align models

* align models

* fix types

* add utils for fallback name and icon

* add todo

* use fallback name and icon functions

* Update default-picker-search-result-item.element.ts

* add fallback tree item if none is registered

* add search to example

* extract data source config and pass to api

* align naming

* temp type cast

* move search module into core

* fix illegal imports

* add missing const exports

* make property-editor-data-source module

* register property editor data source ref item + render description

* remove console log

* remove indention

* simplify data source type

* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/entity-data-picker/input/input-entity-data.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/core/property-editor-data-source/input/input-property-editor-data-source.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/menu/default/default-collection-menu.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add todo

* hide add button when readonly

* check correct amount config

* Update input-entity-data.element.ts

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-10 09:46:48 +00:00
Bjarne FyrstenborgandAndy Butland 9b0b60e6cb Icon Picker: Fit icons scroll container to modal height (#20438)
* Fill height and align icons to top

* Auto scrollbar instead

* Auto height of grid rows

* Enforce scroll again
2025-10-10 10:33:21 +02:00
Andy Butland 0996891c5c Merge branch 'main' into v17/dev 2025-10-10 10:32:45 +02:00
Bjarne FyrstenborgandGitHub fd34ce5bd7 Icon Picker: Fit icons scroll container to modal height (#20438)
* Fill height and align icons to top

* Auto scrollbar instead

* Auto height of grid rows

* Enforce scroll again
2025-10-10 10:32:19 +02:00
Andy Butland 7a48c11ddd Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Security/IdentityMapDefinition.cs
2025-10-10 09:54:19 +02:00
99c2aaf17a Members: Forward port of fix for member lockout issue #16988 from PR #17007 for 16 (#20441)
* Port PR #17007

* Update src/Umbraco.Infrastructure/Security/IdentityMapDefinition.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-10 09:52:57 +02:00
leekelleher de449079dd Fixed build error 2025-10-10 08:43:32 +01:00
leekelleher 10bcf5ba72 Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts
2025-10-10 08:20:55 +01:00
a4c373d3b5 Entity Actions: Create button discernible text (fixes #20205) (#20434)
* added hovering and focus border to RTE

* fix main to OG

* fix to main again

* I'm going to cry

* Missing localiztion feature, maybe UmbLitElement?

* added localization controller to fetch localized version

* localization successful for viewActionsFor and CreateFor

* clean up button text

* Changed label for content header to display proper name

* clean up code

* Included button labels for media section

* clean code

* Relocated localization keys,

as `actions_viewActionsFor` already existed.

Also made into a function, to support a fallback label.

* Simplified the "Create for" label/localization

Removed the need for a `getCreateAriaLabel()` method.

* Removed the double-localizations (of `actions_viewActionsFor`)

as the "umb-entity-actions-bundle" component handles this now.

* imports tidy-up

* Simplified localization key condition

---------

Co-authored-by: Oskar kruger <obk@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-10-09 13:56:30 +00:00
Andy Butland 5f14365470 Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Mail/EmailSender.cs
2025-10-09 15:41:26 +02:00
bcedc8de2a Emails: Add Expires header (#20285)
* Add `Expiry` header to emails, set default expiry to 30 days and allow user config via `appsettings`

* Remove `IsSmtpExpirationConfigured` as it will always have a value

* Check for `emailExpiration` value

* Removed `EmailExpiration` default value as it should be opt-in

* Simplify SMTP email expiration condition

* Fix APICompat issue

* Add implementation to `NotImplementedEmailSender`

* Rename `emailExpiration` to `expires` to match the SMTP header

* Obsolete interfaces without `expires` parameter, delegate to an existing method.

* Set expiry TimeSpan values from user configurable settings with defaults

* Fix formating

* Handle breaking changes, add obsoletion messages and simplify interfaces.

* Fix default of invite expires timespan (was being parsed as 72 days not 72 hours).

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-10-09 14:27:53 +02:00
767894b723 Color Picker: Validate uniqueness of selected colors (#20431)
* Added unique color checker to color picker.

* Added Unittest for duplicates

* optimized for codescene

* removed the bump and simplified the function

* Fixed behaviour for duplicate checks so unit test passes.
A little refactoring.

* Adds continue so invalid colors aren't checked for duplicates.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-10-09 11:50:11 +02:00
Laura NetoandAndy Butland f539a27a19 Migrations: Adjust the JsonBlockValueConverter to handle conflicts with 'values' property (#20429)
* Adjust the `JsonBlockValueConverter` to handle conflicts with 'values' property (due to old data schema)

* Simplify code

* Add unit test to verify change.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-10-09 10:17:20 +02:00
Laura Neto 296858c1ca Merge branch 'main' into v17/dev
# Conflicts:
#	templates/UmbracoProject/.template.config/template.json
2025-10-09 09:51:31 +02:00
1fe7931d07 Migrations: Adjust the JsonBlockValueConverter to handle conflicts with 'values' property (#20429)
* Adjust the `JsonBlockValueConverter` to handle conflicts with 'values' property (due to old data schema)

* Simplify code

* Add unit test to verify change.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-10-09 09:41:41 +02:00
Nikolaj Geisle 832bd7eb61 bump version to beta 2025-10-09 08:58:24 +02:00
Andy ButlandandGitHub 64836e0b7a Update version from 17.0.0-rc to 17.1.0-rc 2025-10-09 08:54:36 +02:00
Andy ButlandandGitHub 16132b0075 Update Umbraco version for LTS release in template 2025-10-09 06:37:21 +02:00
d6ce8d91a9 PropertyType workspace: layout & labeling adjustments (#20131)
* Property workspace update

* Fixed error with updating the properties

* Unused variable

* Added data-mark to description textarea

* make select 100% width

* tiny appearance-option style adjustments

* Make placeholder property inside the input-with-alias optional

* Moving variations and member type option to their own boxes

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-10-08 18:24:58 +00:00
Nikolaj Geisle fb91ade164 Merge branch 'main' into v17/dev 2025-10-08 19:18:04 +02:00
Niels LyngsøandGitHub 9a18dd547d Content Type Designer: Fix moving a group to an inherited tab (#20138)
move group to inherited tab
2025-10-08 16:49:48 +00:00
Niels LyngsøandGitHub 7ecc6ece7e Block Workspace: dynamic headline & browser title (#20424)
* get content type name method

* use local virtual render for the workspace headline and browser title
2025-10-08 15:40:42 +00:00
a676dc4bad Announce newest notification using live region (#19979)
* Added screen readers notification support

* Making the sr-live div not visible for users

* Moved aria-live outside the repeat

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-10-08 15:27:56 +00:00
Niels Lyngsø 38a9a79c75 Merge branch 'main' into v17/dev 2025-10-08 17:23:48 +02:00
9fe8b2162b Adjust styling for inherited content type property (#20261)
* Adjust styling for inherited content type property

* Slight style adjustments inherited property

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-10-08 15:22:09 +00:00
Mads RasmussenandGitHub 429f8b0bed Permissions: Added User fallback permission condition (closes #20097) (#20224)
* add user fallback permission condition

* add example
2025-10-08 16:17:35 +01:00
Niels LyngsøandGitHub 1a462bcc7d Content Workspace: Invariant Breadcrumbs does not work (fix #20423) (#20428)
fix navigating to an invariant document via breadcrumb
2025-10-08 15:09:15 +00:00
Niels Lyngsø 924b1446e3 Merge branch 'main' into v17/dev 2025-10-08 16:37:50 +02:00
Niels LyngsøandGitHub 2e0d006a6c Single Block property editor (#20414)
* single block property editor

* clean up

* auto create a block as part of rendering
2025-10-08 13:02:15 +00:00
d9f8faf509 Load balancing: Load balance isolated caches to allow the backoffice to be load balanced (#20417)
* V16:  Cache Version Mechanism (#19747)

* Add RepositoryCacheVersion table

* Add repository

* Add Cache version lock

* Add GetAll method to repository

* Add RepositoryCacheVersionService

* Remember to add lock in data creator

* Work my way out of constructor hell

This is why we use DI folks. 🤦

* Add checks to specific cache policies

* Fix migration

* Add to schema creator

* Fix database access

* Initialize the cache version on in memory miss

* Make cache version service internal

* Add tests

* Apply suggestions from code review

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Add missing obsoletions

* Prefer full name

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>

* fixed merge

* V16/feature/move last synced id to db (#19884)

* Foundation work for moving last synced id

* register manager and repo in dependency injection

* Fixing to make tests work

* Replacing the use of the old LastSyncedFileManager.cs with the new LastSyncedManager.cs

* Testing to delete out of sync id and old entries

* changing some stuff to please the reviewer.

* Inverted saving methods id check and fixed documentation mishaps

* Loadbalancing: Add Cache Sync service to allow us to roll forward isolated caches when backoffice is load balanced. (#20398)

* Split cache refreshers into internal and external caches

* Add obsolete constructor for CacheInstructionsPruningJob

* Add xml docs

* Move lastID management into CacheInstructionService

* Cache last synced ids in memory

* Lock when processing instructions

* Sync caches when out of sync

* Fix constructors for ICacheSyncService

* Cache version on request

* Register caches as synced when instructions are processed

* Rename CacheVersionAccessor to IRepositoryCacheVersionAccessor

* Set caches as synced before actually syncing the caches

* Set caches as synced before syncing, within scope, this should also lock the cache version from being written to whilst updating caches

* Only check version for backoffice requests

* Clear request cache when caches are syned

* Default to using NOOP cache version service

* Don't generate local identity in database server messenger anymore

* Fix ambiguous constructor

* Add helper method to switch to load balanced isolated caches

* Fix LastSyncedManagerTests

* Fix RepositoryCacheVersionServiceTests

* Fix DefaultCachePolicyTests

* Use correct constructor in FullDataSetRepositoryCachePolicy

* Minor cleanup

* Add XML docs

* Add more xml docs

* Apply suggestions from code review

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

---------

Co-authored-by: Zeegaan <skrivdetud@gmail.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Fix migration plan

* fix tests

* Fix integration tests

* Fix changes from github review

* Move premigrations to v17

* Make lock constantws sequential

* Fix comment

* Make IRepositoryCacheVersionService and ICacheSyncService protected on EntityRepositoryBase

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Nicklas Kramer <nik@umbraco.dk>
Co-authored-by: NillasKA <kramernicklas@gmail.com>
Co-authored-by: Zeegaan <skrivdetud@gmail.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-10-08 14:55:50 +02:00
eaac515b30 V16/bug/20035 validation context uncaught promise (#20036)
* #20035 Updated validation context example to reflect issue

* Fixes #20035 by handling returned promise

* just catch if it was rejected

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-10-08 12:33:04 +00:00
Mads Rasmussen 5eaf7fdb90 Update document-tree.server.data-source.ts 2025-10-08 13:27:58 +02:00
Mads Rasmussen 0dcb10ad41 Merge branch 'main' into v17/dev 2025-10-08 13:27:52 +02:00
leekelleher 15089b28bf Fixed failing UmbTreeItemActiveManager unit-test 2025-10-08 11:42:28 +01:00
c6e5df40c9 Backoffice: Add Entity Signs (overlay icons) to tree items. (#20328)
* entity signs folder

* update package.json

* entity sign extension type

* implement entity sign extension

* POC document has collection sign

* implement icon kind

* rename file

* note about this being wrong

* move type

* change import

* entity sign bundle element

* implement icon kind label

* Display icon and show popover on hover

* Fix the popover logic

* Moving the sign icon to the iconContainer to handle position

* fix missing document tree icon

* revert removal of icon slot render

* remove unused styles

* document tree item - inherit styles from the base element

* correctly extend styles

* revert document tree item icon change

* move icon container html

* add method to get an icon name

* Adding delay to the popover when opens

* Add animation to popover when it opens

* Making the parent of the entity bundle trigger popover on hover

* Display 2 icons over the main icon

* Updating some styles

* Position one icon on top of the other and add css style variables

* Changing popover-container for position-anchor

* generate server types

* Using css properties to display and animate the signs

* Stacked icons using grid property

* Use translate property to move the icons around

* Added fallback styles for firefox

* formatting of state properties

* implement entity flags across content types

* lint fixes

* fix import extension mess

* await both properties for this to work

* transfer flags to entity sign bundle ext initializer

* is-protected entity sign

* Made signs infobox show downward.

* Changed px to rems

* Change the manifest for the actual signs we will display

* add icon color, remove unused label, add weight

* changes styles + animation + slotted icon inside

* Overwrite pending changes when schedule is active and added green color to schedule.

* adjust animation

* add background for sign

* avoid re-rendering when properties are being set

* Bind the flags to each sign manifest.

* increase signs offset

* fix document tree item draft style

* Removed unused exports.

* Remove duplicated hover timer logic.

* Added eslint disable line to keep the empty method for future implementation.

* rename class

* Rename interface for optional entity flags

* make alias more explicit to prevent future collisions

* include alias in field name to make it clear that we do not except all colors

* align function names with conventions

* always include flags in document items

* compose tree types

* set up entity-flag module and move related types

* change label

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-10-08 10:40:27 +00:00
Engiber LozadaandGitHub 193d8af9af Icon Picker: Deselect current icon & add “No icon” tile inside the modal. (#20342)
* Show selected icon and color(if any) when open the modal.

* Add a button inside the modal that clears the value

* Deselect the value if we click the already selected icon.

* Add placeholder icon and some localization for labels

* Remove unused variable

* Added config for the placeholder icon in case no icon is selected.
2025-10-08 10:28:44 +00:00
ebe056df05 Collection: hide children of collection until active child (#20392)
* remove use of modals in collections

* add parent path to support absolute path generation

* add note

* make tree load more minimalistic

* set type and expand inherited styles

* also set title

* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/table/document-table-collection-view.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* create actions should not open as modal

* remove unused import

* fix router getActivePath

* make expand open the collection

* setTargetTakeSize to low when Collection parent

* expose typeUnique

* fix opening collection

* remove log

* active manager

* export

* impl active manager

* prepare for search param redirects

* fixed collapse feature

* set routes to undefined

* preserveQuery

* ensureSlash

* make a hard redirect for collections

* only if anscenstors are present in data.

* not full match anyway

* only forceShow on hasCollection

* remove umb-section-sidebar-context-menu

* rename to isMenu

* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace-split-view.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/tree/tree-item/document-tree-item.context.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-08 10:11:46 +00:00
dc92cf4b19 Add accessibility label for splitview divider (#20380)
* added hovering and focus border to RTE

* fix main to OG

* fix to main again

* I'm going to cry

* Added label for splitviewdivider

* Added localization to divider label and updated common lang files

* Removes unused import

---------

Co-authored-by: Oskar kruger <obk@umbraco.dk>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-10-08 11:11:40 +01:00
Jacob Overgaard 54407a0687 add missing import (merge failure) 2025-10-08 11:27:04 +02:00
mole 787a5ccc2d Merge remote-tracking branch 'origin/main' into v17/dev 2025-10-08 10:45:16 +02:00
Jacob Overgaard edf95e6fab adds deprecation notices to AllowNonExistingSegmentsCreation 2025-10-08 09:58:22 +02:00
Sebastiaan Janssen adf8708987 Move yml file to the correct location 2025-10-08 09:17:43 +02:00
Sebastiaan JanssenandGitHub de2b15d89e Add workflow to create release discussions from labels 2025-10-08 09:15:37 +02:00
17a5477242 Serverside generated preview URLs (#20021)
* Serverside generated preview URLs

* Add URL provider notation to UrlInfo

* Change preview URL generation to happen at preview time based on provider alias

* Update XML docs

* Always add culture (if available) to preview URL

* Do not log user input (security vulnerability)

* Fix typo

* Re-generate TypeScript client

from Management API

* Deprecated `UmbDocumentPreviewRepository.enter()` (for v19)

Fixed TS errors

Added temp stub for `getPreviewUrl`

* Adds `previewOption` extension-type

* Adds "default" `previewOption` kind

* Relocated "Save and Preview" workspace action

reworked using the "default" `previewOption` kind.

* Added stub for "urlProvider" `previewOption` kind

* Renamed "workspace-action-default-kind.element.ts"

to a more suitable filename.

Exported element so can be reused in other packages,
e.g. documents, for the new "save and preview" feature.

* Refactored "Save and Preview" button

to work with first action's manifest/API.

* Reverted `previewOption` extension-type

Re-engineered to make a "urlProvider" kind for `workspaceActionMenuItem`.
This is to simplify the extension point and surrounding logic.

* Modified `saveAndPreview` Document Workspace Context

to accept a URL Provider Alias.

* Refactored "Save and Preview" button

to extend `UmbWorkspaceActionElement`.

This did mean exposing certain methods/properties to be overridable.

* Used `umbPeekError` to surface any errors to the user

* Renamed `urlProvider` kind to `previewOption`

* Relocated `urlProviderAlias` inside the `meta` property

* also throw an error

* Added missing `await`

* Fix build errors after forward merge

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
2025-10-08 08:27:01 +02:00
Jacob Overgaard 74328e9496 Merge remote-tracking branch 'origin/main' into v17/dev 2025-10-08 08:19:56 +02:00
Andy Butland dab9df3f10 Bumped version to 16.3.0-rc4. 2025-10-08 07:59:10 +02:00
Andy Butland b036eb3a75 Performance: Added request cache to media type retrieval in media picker validation (#20405)
* Added request cache to media type retrieval in media picker validation.

* Applied suggestions from code review.
2025-10-08 07:58:35 +02:00
Andy ButlandandGitHub 913b79d682 Performance: Added request cache to media type retrieval in media picker validation (#20405)
* Added request cache to media type retrieval in media picker validation.

* Applied suggestions from code review.
2025-10-08 07:56:49 +02:00
Andy Butland cd9dda2aad Merge branch 'main' into v17/dev 2025-10-08 06:29:30 +02:00
Jacob OvergaardandGitHub 4197ca637b build(deps): bumps @umbraco-ui/uui from 1.15.0 to 1.16.0-rc.0 (#20402) 2025-10-08 04:29:03 +00:00
Niels Lyngsø 62efc2631e remove not existing umb-section-sidebar-context-menu 2025-10-07 22:56:46 +02:00
20de48a496 Load Balancing: Implement distributed background jobs (#20397)
* Start work

* Introduce dto

* Start making repository

* Add migrations

* Implement fetchable first job

* Fix up to also finish tasks

* Refactor jobs to distributed background jobs

* Filter jobs correctly on LastRun

* Hardcode delay

* Add settings to configure delay and period

* Fix formatting

* Add default data

* Add update on startup, which will update periods on startup

* Refactor service to return job directly

* Update src/Umbraco.Infrastructure/Services/Implement/DistributedJobService.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Infrastructure/BackgroundJobs/DistributedBackgroundJobHostedService.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Infrastructure/BackgroundJobs/DistributedBackgroundJobHostedService.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove unused

* Move jobs and make internal

* make OpenIddictCleanupJob.cs public, as it is used elsewhere

* Minor docstring changes

* Update src/Umbraco.Core/Persistence/Constants-Locks.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* ´Throw correct exceptions

* Update xml doc

* Remove business logic from repository

* Remove more business logic from repository into service

* Remove adding jobs from migration

* fix creation

* Rename to ExecuteAsync

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-10-07 18:49:21 +02:00
Laura NetoandGitHub df81264794 Integration tests: Fix failing SQLServer integration tests (#20406)
Fix failing SQLServer integration tests

Adjusted the tests so that the created content is retrieved again after creation, instead of using the returned IContent.
This is needed because SQLServer, when using datetime, rounds to the closest .000, .003, or .007, which would cause the comparisons to fail.
We should consider moving away from datetime to datetime2, as the former should be avoided according to Microsoft.

https://learn.microsoft.com/en-us/sql/t-sql/data-types/datetime-transact-sql?view=sql-server-ver17
2025-10-07 16:55:31 +02:00
Piers TaylorandGitHub e9ae3cf5db Repositories: Retrieve users for groups in batches to fix UserService.GetAllInGroup failing on too many users in a group (#20298)
* fix: Identified everywhere the bugs happen and implemented the InGroupOf() extension to successfully batch the SQL queries

* Added helper function in case this batching functionality is in future scopes

* Accidently deleted a groupIds.Any() check while adding BatchFetch helper function

* Removed helper function and instead utilising built in FetchByGroups extension method
2025-10-07 16:09:24 +02:00
f0cf4703fa Member type container in management API (#16914)
* Member type container in management API

* Fix naming

* Update service

* Fix services

* Register IMemberTypeContainerService in DI container

Added a new service registration for `IMemberTypeContainerService`
in the `AddCoreServices` method of `UmbracoBuilder.cs`.

* Replace auditRepository with auditService in constructor

* Add MemberTypeContainer to UdiEntityType mapping

---------

Co-authored-by: georgebid <91198628+georgebid@users.noreply.github.com>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2025-10-07 15:31:35 +02:00
Jacob Overgaard 0cf8279e65 Merge branch 'main' into v17/dev 2025-10-07 14:52:10 +02:00
Jacob Overgaard f5da0db977 chore: generate new openapi types 2025-10-07 14:43:31 +02:00
Lee KelleherandGitHub 2f712cab08 Refactors backoffice sections with default element and context API (#20305)
Refactors backoffice sections

using the extensions registry to set a default/fallback
element and API for the section.
2025-10-07 14:40:00 +02:00
Niels LyngsøandGitHub 034cf2894c Tree: Minimalistic styles for load more (#20376)
* make tree load more minimalistic

* set type and expand inherited styles

* also set title
2025-10-07 13:21:41 +01:00
Lee KelleherandGitHub 1498f3bdc6 Removed umb-media-picker-create-item component (#20403)
Remove `umb-media-picker-create-item` component

it was not being used internally.

There was previously an issue due to a routing issue,
(in that the Media Picker modal wasn't routed),
so the Media create workspace wouldn't work.
This could be resolved in future and see this feature return.
2025-10-07 14:20:02 +02:00
CopilotGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>iOvergaard
cb8c331777 UFM: Fixes the truncate filter to only add ellipsis when text is actually truncated (closes #20395) (#20396)
* Initial plan

* Fix UFM truncate filter to only add ellipsis when text is actually truncated

Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>

* feat: trims string before evaluating

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>
2025-10-07 14:19:11 +02:00
Mads RasmussenandGitHub 324e5bcb0a Fix: undefined document name when trashing an item (#20401)
* add interface for item data resolver

* export interface

* add interface to Document item data resolver implementation

* allow to pass a item data resolver to trash action

* pipe resolver to modal

* pass resolver to document trash manifest

* use resolver in modal when available
2025-10-07 11:26:44 +00:00
Kenn JacobsenandGitHub ba4a874fb4 Models Builder: Make Models Builder better at not performing "rude edits" (#20394)
Make Models Builder better at not performing rude edits
2025-10-07 12:47:26 +02:00
1f351244d4 Dependencies: Update server dependencies (#20385)
* Bump Azure.Identity from 1.13.2 to 1.16.0

* Bump BenchmarkDotNet from 0.14.0 to 0.15.4

* Bump Bogus from 35.6.3 to 35.6.4

* Bump HtmlAgilityPack from 1.12.1 to 1.12.4

* Bump MailKit from 4.11.0 to 4.14.0

* Bump MessagePack from 3.1.3 to 3.1.4

* Bump Microsoft.AspNetCore.Mvc.Testing from 9.0.4 to 9.0.9

* Bump Microsoft.Data.SqlClient from 6.0.1 to 6.1.1

* Bump Microsoft.Extensions.Caching.Hybrid from 9.8.0 to 9.9.0

* Bump Microsoft.Extensions.Logging.Debug from 9.0.4 to 9.0.9

* Bump Microsoft.NET.Test.Sdk from 17.13.0 to 18.0.0

* Bump ncrontab from 3.3.3 to 3.4.0

* Bump Nerdbank.GitVersioning from 3.7.115 to 3.8.118

* Bump OpenIddict packages from 6.2.1 to 7.1.0

* Bump Serilog from 4.2.0 to 4.3.0

* Bump Serilog.Sinks.File from 6.0.0 to 7.0.0

* Bump Swashbuckle.AspNetCore from 8.1.1 to 9.0.6

* Bump System.Data.Odbc from 9.0.4 to 9.0.9

* Bump System.Data.OleDb from 9.0.4 to 9.0.9

* Bump Microsoft.IdentityModel.JsonWebTokens from 8.8.0 to 8.14.0

* Bump SixLabors.ImageSharp.Web from 3.1.5 to 3.2.0

- Implicit global usings were made opt-in (https://github.com/SixLabors/ImageSharp.Web/pull/391)

* Bump NJsonSchema from 11.0.2 to 11.5.1

* Bump Microsoft packages from 10.0.0-preview.7.25380.108 to 10.0.0-rc.1.25451.107

* Remove Azure.Identity package reference as implicitly referenced versions are no longer vulnerable

* Remove System.Runtime.Caching package reference as it is not used

* Remove System.Net.Http package reference as it is not used

* Set 'allowPrerelease' to true

Global.json was showing as invalid due to a pre-release version being referenced while 'allowPrerelease' was set to 'false'. This can be set to 'false' again later on.

* Remove System.Security.Cryptography.Xml package reference as implicitly referenced versions are no longer vulnerable

* Remove System.Text.RegularExpressions package reference as implicitly referenced versions are no longer vulnerable

* Remove Microsoft.IdentityModel.JsonWebTokens package reference as implicitly referenced versions are no longer vulnerable

* Remove System.Text.Encodings.Web package reference as it is not used

* Remove Microsoft.Data.SqlClient package reference as implicitly referenced versions are no longer vulnerable

* Remove Lucene.Net.Replicator package reference as implicitly referenced versions are no longer vulnerable

* Remove Microsoft.Extensions.Caching.Memory package reference where not used

* Add EFCore migration for OpenIddict v7 update

* Apply suggestion from @kjac

Cosmetic update: Removed blank line as suggested by Copilot

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-10-07 12:13:14 +02:00
Mads RasmussenandGitHub e3d2001477 SectionSidebarContextMenu: Delete element and methods for interaction (#20399)
Delete sction-sidebar-context-menu element + context methods
2025-10-07 11:08:35 +01:00
7c0b5b7dd4 Collections: Stop opening items in modals (#20384)
* remove use of modals in collections

* add parent path to support absolute path generation

* add note

* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/table/document-table-collection-view.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-07 10:48:09 +01:00
Nhu DinhandGitHub 4af9b1e156 User Profile: QA Add acceptance tests for the regression issue #18084 (#20329)
* Added tests for changing own password

* Updated tests for current user profile

* Bumped version

* Make CurrentUserProfile tests run in the pipeline

* Added step to ensure the error notification toast not displays

* Reverted npm command
2025-10-07 09:17:58 +00:00
Nhu DinhandGitHub 7bcef5fde5 Nightly E2E test pipeline: QA Run E2E tests on v17/dev and enable the different setting app tests by default (#20379)
Update yaml file to run the nightly E2E tests against the v17/dev branch and run different app settings tests by default
2025-10-07 15:36:54 +07:00
Jacob OvergaardandGitHub b4e97ea49f Dependencies: Updates all npm dependencies for Client, Login, and UmbracoExtension (#20386)
* build(deps): bump backoffice dependencies

* revert types

* build(deps): updates @hey-api/openapi-ts to 0.85.0 and regenerates files on client and template

* build(deps): updates all icons + regenerate

* build(deps): bumps all login dependencies + regenerate api

* chore: runs eslint --fix

* chore: runs prettier fix on files

* chore: fixes imports
2025-10-07 07:14:23 +00:00
Nhu DinhandGitHub d400ba5899 Delivery API: QA Add acceptance test for media delivery api (#20182)
* Added tests for media delivery api

* Added tests for content delivery api

* Fixed import

* Updated skip tag and issue link for the failing tests

* Bumped version

* Split delivery api tests into 2 files

* Updated tests for media delivery Api

* Cleaned up

* Fixed comments

* Fixed comments
2025-10-07 06:58:16 +00:00
Nikolaj Geisle 629e905187 Bump version 2025-10-06 21:21:14 +02:00
Andy ButlandandNikolaj Geisle bfd2594c7b Hybrid cache: Check for ContentCacheNode instead of object on exists for hybrid cache to ensure correct deserialization (closes #20352) (#20383)
Checked for ContentCacheNode instead of object on exists for hybrid cache to ensure correct deserialization.

(cherry picked from commit 184c17e2c8)
2025-10-06 21:20:56 +02:00
Andy ButlandandGitHub 184c17e2c8 Hybrid cache: Check for ContentCacheNode instead of object on exists for hybrid cache to ensure correct deserialization (closes #20352) (#20383)
Checked for ContentCacheNode instead of object on exists for hybrid cache to ensure correct deserialization.
2025-10-06 21:20:16 +02:00
Bjarne FyrstenborgandGitHub 4330a99830 Block Grid: Styling of group drag with handle (#20361)
* Adjustment of block grid group drag with handle

* Adjust input, handle and delete button
2025-10-06 18:12:43 +02:00
Bjarne FyrstenborgandGitHub fa5f6b9acc Block Grid: Configure minimum one column for areas (#20363)
Configure minimum 1 column for areas in block grid
2025-10-06 18:10:34 +02:00
Niels Lyngsø 173887d0a1 Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts
#	src/Umbraco.Web.UI.Client/src/packages/property-editors/slider/types.ts
2025-10-06 16:38:59 +02:00
7819b6dfac Value Presets: also run value presets on load (#20239)
* term example

* better localization options

* localize range

* ensure range value handling

* extract lox high from value setting

* further improvements

* stop requiring entity-type for values

* setup for parsing blueprints as values to the value preset manager

* write test for blueprint values in value preset controller

* deprecate scaffold method in order to use a new more generic name

* Avoid manipulating the incoming data

* Update src/Umbraco.Web.UI.Client/src/assets/lang/en.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* use max here

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-06 15:15:38 +02:00
Jacob Overgaard 11b62518ae Removed v10/dev, added v17/dev 2025-10-06 13:39:55 +02:00
Nhu DinhandGitHub f3d121d91f Content: QA Add acceptance tests for regression issue #17735 (#20330)
* Added tests for duplicate a content

* Bumped version

* Make all tests for duplicating a content run in the pipeline

* Fixed comments

* Reverted npm command
2025-10-06 10:54:18 +00:00
84fb1f4d6c Extension Registry: QA Added acceptance tests for readOnlyGuards rule, entity action and custom property editor (#19939)
* Added tests for readOnlyGuard rules

* Added backoffice override files for readOnlyGuard tests

* Bumped version

* Added project for ExtensionRegistry tests in playwright configs

* Updated nightly E2E test pipelines to run Extension Registry tests

* Updated nightly E2E test pipeline

* Updated nightly E2E test pipeline

* Updated playwright configs

* Updated nightly E2E test pipeline

* Add test for Entity Action Extension to retrieve entityType and unique (#20020)

* Add entity action test to get unique and entity type

* update test entity action

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>

* Added job to run the Extension Registry tests in the nightly pipeline

* Cleaned up

* Restructure AdditionSetup folder for extension registry

* Updated yaml file for nightly E2E pipeline

* Updated json file for lock action

* Skip test for content delivery API

* Updated port

* Comment out others to run only extension registry tests

* Updated port

* Remove retrieve action folder to test

* Reverted nightly E2E test pipeline

* Reverted

* Updated umbraco package json

* Reverted

* Renamed AdditionalSetup folder

* Renamed folder

* Added appsetting.json file

* Updated appsettings.json

* Updated appsettings.json

* Added debug step

* Added step to build backoffice

* Reverted

* Only spec.ts file run in the extension registry project

* Property Editor: Add tests for create and using custom property editor (#20213)

* Property Editor: tests for create and using custom property editor

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/PropertyEditorTest.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/PropertyEditorTest.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/PropertyEditorTest.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* update review from Nhu

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/CustomPropertyEditor.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/CustomPropertyEditor.spec.ts

Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* fix comment from Nhu

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>

* Format code

* Fixed

* Format code

* Format code

* Format code

* Updated indentation

* Fixed comments

* change the name of test

---------

Co-authored-by: NguyenThuyLan <116753400+NguyenThuyLan@users.noreply.github.com>
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2025-10-06 09:47:06 +00:00
Niels LyngsøandGitHub e7fde8c01f Entity-Action Bundle: Ensure First Action are updated in rendering (#20351)
ensure requesting rendering update
2025-10-06 11:43:10 +02:00
Niels LyngsøandGitHub a95a2b955f Loader bar: Implement loader for Content Workspaces (#20288)
* no need for a ctrl alias here

* added ctrl aliases and clean up unused css

* implement view loader
2025-10-06 11:41:50 +02:00
02b93e90cb Slider: improved value fallback handling + validation (#20228)
* term example

* better localization options

* localize range

* ensure range value handling

* extract lox high from value setting

* further improvements

* Update src/Umbraco.Web.UI.Client/src/assets/lang/en.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-06 11:28:38 +02:00
Jacob OvergaardandGitHub c67478874e Segmentation: The Backoffice should use the enhanced endpoint to fetch segment options for documents based on GUID (#20340)
* feat: adds new repository for document by id segment options

* chore: mocks up the new endpoint

* feat: all 'null' segments should appear on all languages

* feat: uses new endpoint in content detail workspace base

* feat: maps up the name of the segment

* chore: mock segment data

* feat: adds filter on available segments

* feat: do not alter behavior depending on "undefined" and "null"

* chore: updates mock handler

* feat: ensures that the segments are loaded based on an override method (because they only work for documents) and that they use a generic type (to avoid circular imports)

* feat: refines the segment filter

* chore: updates deprecated model

* feat: treats all culture-less segments as applying to everything

* docs: updates console warn for developers
2025-10-06 09:09:17 +02:00
16c0de803b Block Grid: Add a bit more spacing and align button in block grid areas config (#20374)
* Add a bit more spacing and align button in block grid areas config

* Remove unnecessary blank line in CSS

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-10-06 05:20:25 +00:00
Bjarne FyrstenborgandGitHub e80cc1a9f0 Block Grid: Add more spacing in combobox group header (#20373)
Add a bit more spacing in combobox group header
2025-10-06 06:37:00 +02:00
Andy Butland 0daf5ea506 Merge branch 'main' into v17/dev 2025-10-03 17:19:03 +02:00
963331448a APIs: Use EndpointMetadata to check for MapToApiAttribute at runtime to include Controller in Swagger document (#20144)
* Use EndpointMetadata to check for existing MapToApiAttribute at runtime

* fix api breaking change

* revert MethodInfoApiCommonExtensions.cs

* remove empty line in ActionDescriptorApiCommonExtensions.cs

* Add xml comments to ActionDescriptorApiCommonExtensions

* Revert boy scout refactoring to primary constructur

* Better xml comments in ActionDescriptorApiCommonExtensions

---------

Co-authored-by: Marcus Wilhelmson <marcus.wilhelmson@consid.se>
2025-10-03 16:42:39 +02:00
Andreas ZerbstandGitHub 29bdd3cac0 E2E Pipeline: QA Remove continue on error condition (#20371)
Remove
2025-10-03 14:50:23 +02:00
Bjarne FyrstenborgandGitHub e5c942b459 Block Grid: Add icon to allowed block types in area (#20364)
* Add icon to allowed block types in area

* Adjust type with icon property

* Use umb-icon instead

* Add styling for combo list option
2025-10-03 11:23:47 +02:00
28fa373b0c Change to layout of default Content area dashboard (#20355)
Change to layout of default content dashboard.

I have removed the max width on the wrapper and increased the padding on the small pods to match the larger pod. This improves consistency with all other default dashboards in other sections of the CMS, none of which had a max width applied and where all pods had larger padding.

Co-authored-by: Paul <paul@madebycrunch.com>
2025-10-03 11:21:52 +02:00
c5b4571cd5 Shared status: improve for segmented scenario (#20354)
* improve shared status messages

* Update src/Umbraco.Web.UI.Client/src/packages/core/property/components/property/property.context.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-03 09:59:07 +02:00
Niels LyngsøandGitHub d45a8f2049 Segments: The experience of working with Segments and Segmented Blocks (#20358)
* initial notes

* flat mapper impl

* first tests passed

* return incoming value to ensure it does not result in an error from an extension

* define the manifest type on UmbPropertyValueResolver

* finish property value flat-mapper

* make sure also to map values with no extension

* clean up test

* export controller

* fix block editor property resolver

* fix mapper types

* ensureVariantsData method

* ensure Block List only updates if it has an update

* ensure varians across for shared across segment and shared across cultures

* fix variant selector hints for segments

* fix hints in variant selector for segmented variants
2025-10-03 09:58:09 +02:00
Andreas ZerbstandGitHub e0449d3c00 E2E Pipeline: QA Remove continue on error condition (#20365)
Cherrypicked changes
2025-10-03 09:02:10 +02:00
Bjarne FyrstenborgandGitHub 5a565b7e8d Localization: Added translations for area validation property labels (#20362)
Localization of property labels
2025-10-03 08:03:16 +02:00
Bjarne FyrstenborgandGitHub cd1cbb3b15 Color Picker: Styling for drag handle at swatch items (#20360)
Add styling for drag handle at color picker item input
2025-10-03 07:53:21 +02:00
Bjarne FyrstenborgandGitHub 36dbab2289 Color Picker: Set initial hex value for picker (#20357)
* Set intial color for hidden color input

* Expand 3-digits hex to 6-digits
2025-10-03 07:47:36 +02:00
Andy Butland d9592aa26d Bumped version to 16.3.0-rc2. 2025-10-02 21:16:25 +02:00
Andy ButlandandKenn Jacobsen 97e0c79d94 Caching: Fixes regression of the caching of null representations for missing dictionary items (closes #20336 for 16) (#20349)
* Ports fix to regression of the caching of null representations for missing dictionary items.

* Fixed error raised in code review.

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-10-02 21:15:21 +02:00
Carl SargunarandMatthew-Wise 3f8ad2238f trust certificate (for local dev only) 2025-10-02 20:07:00 +01:00
Carl SargunarandMatthew-Wise 42c7b744c5 update tool path 2025-10-02 20:07:00 +01:00
CarlandMatthew-Wise 589285d081 Switch container to use SQL 2022 instead of SQL Edge 2025-10-02 20:07:00 +01:00
61277b3812 Caching: Fixes regression of the caching of null representations for missing dictionary items (closes #20336 for 16) (#20349)
* Ports fix to regression of the caching of null representations for missing dictionary items.

* Fixed error raised in code review.

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-10-02 18:10:16 +00:00
e6d1d7a6b9 Data Type: Improve missing property editor and property editor UI feedback (#20339)
* Adjust data type workspace UI when opening a data type that has an editor or editor UI that could not be found

* Also display a custom UI in a document property where the editor UI could not be found

* Fix circular dependency

* Small renames

* provide data-path for property editor picker

* update console warning

* Text copy changes

* add comment to element

* Fix editor alias not updating when selecting a different property editor UI

* Remove outdated comment

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-10-02 17:41:11 +02:00
Niels LyngsøandGitHub 5d64f51003 Segments: Auto unfold the culture variant in non-culture-variant mode (#20189)
in segment only variant situation then auto unfold the culture variant
2025-10-02 16:57:21 +02:00
Mathias HelsengrenandGitHub 1f747d3b7f Login form: Improved accessibility by removing duplicate label and aria-label (#20232)
Removed Aria label from the username and password input, since we already have <label> tag
2025-10-02 16:49:22 +02:00
mole 0ded9a74fb Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Core/Services/DocumentUrlService.cs
2025-10-02 15:08:48 +02:00
Niels LyngsøandGitHub b35db9cb5b Handle vary by segment variant-entires (#20191)
* refactor code

* display language name for empty names

* ensure all culture variants when entering a segment-shared value, shared across cultures

* Revert parts of "ensure all culture variants when entering a segment-shared value, shared across cultures"

This reverts commit 0e64f72695.
2025-10-02 14:51:34 +02:00
436be6ec3f Exception handling: Improve error messaging on invalid umbraco-package.json file (#20332)
* Improve error messaging on invalid umbraco-package.json file.

* Adjust failing unit tests

---------

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
2025-10-02 13:03:00 +02:00
Laura Neto cf61356b80 Merge branch 'release/16.3' 2025-10-02 12:22:29 +02:00
99c51a54f1 Tiptap RTE: Upgrade to Tiptap v3 (#20318)
* Upgrade to Tiptap v3

* Uses `@ts-expect-error` to ignore the TS complication errors

These can be removed once Tiptap has resolved the TypeScript definitions.

* Off-topic: corrected `flags` property in the mock data

Added in PR #19915

* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/link/link.tiptap-extension.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-10-02 07:44:00 +00:00
3da8f41292 Deprecations: Client-side removal of v17 deprecated code (#20294)
* Webhooks: Removal of client-side deprecations for v17

* User: Removal of client-side deprecations for v17

* UFM: Removal of client-side deprecations for v17

* Tiptap: Removal of client-side deprecations for v17

* Templating: Removal of client-side deprecations for v17

* RTE: Removal of client-side deprecations for v17

* Relations: Removal of client-side deprecations for v17

* Search: Removal of client-side deprecations for v17

* Property Editors: Removal of client-side deprecations for v17

* URL Picker: Removal of client-side deprecations for v17

* Members: Removal of client-side deprecations for v17

* Media: Removal of client-side deprecations for v17

* Extension Insights: Removal of client-side deprecations for v17

* Documents: Removal of client-side deprecations for v17

* Media: Removal of client-side deprecations for v17

(part 2)

* Data Types: Removal of client-side deprecations for v17

* Core: Removal of client-side deprecations for v17

* Content: Removal of client-side deprecations for v17

* Clipboard: Removal of client-side deprecations for v17

* Blocks: Removal of client-side deprecations for v17

* Mocks: Removal of client-side deprecations for v17

* Libs: Removal of client-side deprecations for v17

* Apps: Removal of client-side deprecations for v17

* DevOps: Removal of client-side deprecations for v17

* Document Publishing Workspace: Removal of client-side deprecations for v17

Refactored to use `UmbDocumentPublishingWorkspaceContext`

* Reverted/modified some of my TODO comments

* Updated TODO comment

* Code cleanup sweep of TODO comments and tweaks

* Updated OpenApi.json, re-gen TS client

Tried to fix up mock data.

* Refactored the document variant name/fields

* Implemented co-pilot suggestions

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-10-02 09:14:55 +02:00
Jacob Overgaard f14c4d5968 Merge remote-tracking branch 'origin/main' into v17/dev 2025-10-02 07:42:32 +02:00
AlexandGitHub 0d98527c58 Media: Prevent svg image to extend outside the editor bounds (#20346)
Prevent svg image to extend outside the editor bounds
2025-10-02 07:02:56 +02:00
78f4caa2be Refactoring: Add extension method for retrieval of language ISO codes if that's all we need (#20324)
* Retrieve only ISO codes from the database rather than full language objects if that's all we need.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Removed repository updates and migrated the new service method to an extension method.

* Fixed issue after merge.

* Removed left-over using

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-10-01 18:21:41 +00:00
Jacob Overgaard 5d986e44f6 Merge remote-tracking branch 'origin/main' into v17/dev 2025-10-01 16:03:06 +02:00
Anders ReusandGitHub 3f0428c8ef Removed the dot "." in front of the jpg file extension example. (#20334) 2025-10-01 15:46:33 +02:00
Erik-Jan WestendorpandGitHub b261628b4b Extend logging (add delay and period) (#20333) 2025-10-01 11:54:27 +00:00
a84d67eff8 Migrations: Create missing tabs on content types when referenced by both composition and content type groups (closes #20058) (#20303)
* Add migration to create missing tabs

In v13, if a tab had groups in both a composition and the content type, the tab might not exist on the content type itself.
Newer versions require such tabs to also exist directly on the content type. This migration ensures those tabs are created.

Also fixes an issue in LeftJoin where nested sql arguments were being discarded.

* Small fixes

* WIP: Integration test.

* Added asserts to show the current issue with the integration test.

* Adjusted the integration test

* Added logging of result. Minor re-order and extraction refactoring in integration test.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-10-01 09:39:56 +02:00
51575e5e36 Property Editors: New Date Time property editors (#19915)
* Started the implementation of the new date time property editor

* Display picked time in local and UTC

* Adjustments to the way the timezones are displayed and the picker is configured

* Filter out `Etc/` (offset) timezones from the list

* Additional adjustments

* Introduced date format and time zone options (all, local or custom)

* Adjustments to the property editor configuration and value converter

* Use UUICombobox instead of UUISelect for displaying time zone options. Display UTC offset instead of short offset name in label.

* Allow searching by offset

* Ignore case when searching for time zone

* Store dates consistently (always same format)

* Add custom PropertyIndexValueFactory for the new property editor

* Adjustments when switching between time zone modes

* Small fixes and cleanup

* Started improving time zone config selection

* Small adjustments

* Remove selected time zones from the list + display label instead of value

* Localizing labels

* Remove unwanted character

* Fix incorrect order of custom time zones list

* Small fixes (mostly validation)

* Rename input time zone component

* Small adjustments

* Using model for stored value

* Save examine value as ISO format

* Adjusting class names for consistency

* Small fixes

* Add default data type configuration

* Rename `TimeZone` to `UmbTimeZone`

* Fix failing tests

* Started adding unit tests for DateWithTimeZonePropertyEditor

* Additional tests

* Additional tests

* Additional tests

* Fixed searches with regex special characters throwing errors

* Remove offset from generic UmbTimeZone type and added new type specific for the property editor

* Adjust property editor to show error when selected time zone is no longer available, instead of pre-selecting another one

* Do not preselect a time zone if a date is stored without time zone

This most likely means that the configuration of the editor changed to add time zone support. In this case we want to force the editor to select the applicable time zone.

* Fix failing backoffice build

* Added tests for DateTimeWithTimeZonePropertyIndexValueFactory

* Improved picker validation

* Remove unused code

* Move models to their corresponding places

* Renaming `DateTimeWithTimeZone` to `DateTime2`

* Fix data type count tests

* Simplifying code + adjusting value converter to support old picker value

* Adjustments to property editor unit tests

* Fix validation issue

* Fix default configuration for 'Date Time (Unspecified)'

* Rename validator

* Fix comment

* Adjust database creator default DateTime2 data types

* Update tests after adjusting default data types

* Add integration test for DateTime2 returned value type

* Apply suggestions from code review

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Aligning DateTime2Validator with other JSON validators. Added new model for API.

* Removed unused code and updated tests

* Fix validation error message

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Splitting the new date time editor into multiple (per output type)

* Adjust tests in DateTime2PropertyIndexValueFactoryTest

* Update value converter tests

* Group the new date time tests

* Adjust new property editor tests

* Adjust property editor integration tests

* Update data editor count tests

* Naming adjustments

* Small fixes

* Cleanup

- Remove unused files
- Remove 'None' option from configuration and update all the tests

* Update luxon depedencies

* Move GetValueFromSource to the value converter

* Add new property editor examples to mock data

* Re-organizing the code

* Adjustments from code review

* Place the date time property index value factories in their own files

* Small adjustments for code consistency

* Small adjustments

* Minor adjustment

* Small fix from copilot review

* Completed the set of XML header comments.

* use already existing query property

* fail is form control element is null or undefined

* using lit ref for querying and form control registration

* state for timeZonePickerValue and remove _disableAddButton

* Adjustments to form control registration

* Remove unused declaration

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-09-30 13:21:09 +00:00
Mads RasmussenandGitHub 0c3e9fb832 16.3 Hotfix: remove status entry when removing item (#20316)
* Add removeStatus method to repository manager

Introduces a removeStatus method to UmbRepositoryItemsManager, allowing removal of a status by its unique identifier.

* Remove item status on picker input removal

Calls removeStatus on the item manager when an item is removed from the picker input selection to ensure its status is updated accordingly.
2025-09-30 12:47:26 +00:00
Bjarne FyrstenborgandGitHub 1082bf17b2 Fix localized message in block group delete confirm modal (#20312)
* Fix localized message in block group delete confirm modal

* Add translation for block configuration removal

* Fix typo

* Fix a few translations

* Adjust translation
2025-09-30 07:01:28 +00:00
Kenn JacobsenandGitHub 07203b7270 Segments: Property level default segment fallback (#20309)
Property level default segment fallback
2025-09-30 08:45:20 +02:00
Andy Butland cdb2be64d4 Merge branch 'main' into v17/dev
# Conflicts:
#	tests/Umbraco.Tests.UnitTests/Umbraco.Tests.Common/Builders/PropertyTypeBuilderTests.cs
2025-09-30 07:54:26 +02:00
418043bf59 Log Viewer: Fixes continuous polling (closes #20274) (#20310)
* LogViewer: Fixes continuous polling (closes #20274)

* Update src/Umbraco.Web.UI.Client/src/packages/log-viewer/workspace/logviewer-workspace.context.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-30 07:31:00 +02:00
65393ff3d9 Models: PropertyType constructor sets the DataTypeKey if IDataType has identity (#20301)
* PropertyType constructor sets the DataTypeKey if passed IDataType has identity

* Updated unit tests to verify behaviour.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-30 05:18:26 +00:00
Niels LyngsøandGitHub 82fc41a459 Media Workspace Path: add parent path to support absolute path generation (#20302)
add parent path to support absolute path generation
2025-09-29 19:21:55 +01:00
ac6b205e7f Unattended install: Added the ability to set the telemetry level (#20249)
* Added the ability to set the telemetry level for an unattended install

Added 'UnattendedTelemetryLevel' to 'UnattendedSettings'

Renamed 'CreateUnattendedUserNotificationHandler' to 'PostUnattendedInstallNotificationHandler'

Set the telemetry level in the unattended install notification handler

* Add DefaultValue attribute to 'UnattendedTelemetryLevel'

* Added UnattendedTelemetryLevel to template.

* Updated cli and ide hosts.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-29 17:07:30 +02:00
Nhu DinhandGitHub 1ca7f3162f E2E nightly pipeline: QA Fix failing acceptance tests for invalid cases (#20289)
* Updated steps to verify the error validation message

* Updated default extension for Tiptap

* Removed skip tag for fixed smoke tests

* Bumped version
2025-09-29 15:12:38 +02:00
Jacob Overgaard a30f837384 Merge remote-tracking branch 'origin/release/16.3' 2025-09-29 13:17:08 +02:00
Jacob Overgaard 2758813547 Merge branch 'release/16.3' 2025-09-29 13:16:43 +02:00
Lee KelleherandGitHub 062b185edf Mocks: Replaced signs for flags (#20293) 2025-09-29 10:47:45 +00:00
03bb658e2e Dependencies: Update ImageSharp to latest patch releases (16) (#20276)
Update ImageSharp dependencies.

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-09-29 07:23:56 +00:00
HenrikandGitHub fbbbc45c24 Micro-optimization: Move compilation of some Regex generation to compile time instead of runtime, make some static ones compiled (#20287)
Move compilation of some Regex generation to compile time instead of runtime, make some static ones compiled
2025-09-28 23:40:50 +02:00
Janus HasseriisandMatthew-Wise fc60b5b5ff Add custom property for #headerColumn 2025-09-26 09:25:28 +01:00
Mads RasmussenandAndy Butland 811cccf24f AllowEditInvariantFromNonDefault : Fix property write guard to use correct variant ID (closes #20250) (#20277)
Fix property write guard to use correct variant ID

Replaces the use of propertyVariantId with _datasetVariantId in the property write guard check to ensure permissions are evaluated for the correct variant.
2025-09-26 09:34:12 +02:00
Mads RasmussenandGitHub 84811046f1 AllowEditInvariantFromNonDefault : Fix property write guard to use correct variant ID (closes #20250) (#20277)
Fix property write guard to use correct variant ID

Replaces the use of propertyVariantId with _datasetVariantId in the property write guard check to ensure permissions are evaluated for the correct variant.
2025-09-26 09:25:51 +02:00
Andy Butlandandleekelleher e752828a24 Fixes issue with service registration for file system tree service (#20273)
* Display the latest update date in document collection view

* Fix issue with service registration of physical file system tree service.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 61f1c4abd0)
2025-09-25 14:34:36 +01:00
7572ef5fff NuGet vulnerability warnings: Warn in non-Release mode, Error in non-Release mode (#17244)
* Initial adjustment of the projects with package vulnerabilities that errored, to change to ignore the four specific Nuget vulnerability warnings in Debug mode (but not Release) as per https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1901-nu1904 (NU1901,NU1902,NU1903,NU1904)

* Fixed formatting errors with tests

* No trailing whitespace

* Move NuGet vulnerability warnings error suppression to Directory.Build.props, combine WarningsNotAsErrors and fix minor issues

* Update Umbraco.JsonSchema.csproj

Removed unwanted change

* Update Umbraco.JsonSchema.csproj

Removed unwanted change

* Revert unecessary changes since merge

* Tweak more unecessary changes

* Small tweaks

* Remove space

* Reverted spacing changes

* Remove no longer required warning exclusions

* Reverted unwanted change

* Reversed order

* A few tweaks to reduce warnings in Umbraco.TestData

* More warnings removed as no longer an issue

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Emma Garland <emma.garland@rocksolidknowledge.com>
Co-authored-by: Jason Elkin <jasonelkin86@gmail.com>
2025-09-25 15:31:36 +02:00
leekelleher 81f29be53b Corrected Tiptap import namespaces
for newer heading extensions, introduced in v16.3.0.
2025-09-25 14:19:22 +01:00
61f1c4abd0 Fixes issue with service registration for file system tree service (#20273)
* Display the latest update date in document collection view

* Fix issue with service registration of physical file system tree service.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-25 13:13:02 +00:00
dependabot[bot]andJacob Overgaard cf10a59a4c Bump tar-fs from 3.1.0 to 3.1.1 in /src/Umbraco.Web.UI.Client
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 3.1.0 to 3.1.1.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 3.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-25 14:09:27 +02:00
Lee KelleherandGitHub ac23ff5f38 Tiptap: Relocation of external extensions/package (#20256)
* Relocated "Bubble Menu" extension

* Relocated "Table" extension

* Relocated "Anchor" extension

* Relocated "HTML Tag: Div" extension

* Relocated "HTML Tag: Span" extension

* Refactored "HTML Attribute" extensions

* Relocated "Figure" extension

* Relocated "Text Direction" extension

* Relocated "Text Indent" extension

* Relocated "Trailing Node" extension

* Relocated "Embedded Media" extension

* Relocated "Link" extension

* Relocated "Image" extension

* Removed "@umbraco-backoffice/external-tiptap" package

relocated Tiptap exports to the "@umbraco-cms/backoffice/tiptap" package.

* `import` fixes

* Naming of Tiptap extension option interfaces
2025-09-25 14:09:00 +02:00
Bjarne FyrstenborgandGitHub 149b191cf4 Add slightly more padding at top so user card outline is not cutoff (#20258) 2025-09-25 13:54:01 +02:00
099e7d7d3a Adding SourceWidth and SourceHeight to ImageUrlGenerationOptions (#14499)
* Update Readme to signpost the Forum (#20268)

Update README.md with information about the forum

Making a small change to the Readme to signpost the Forum now that it's the place to go for help/questions

* Adding SourceWidth and SourceHeight to ImageUrlGenerationOptions

* Update src/Umbraco.Web.Common/Extensions/FriendlyImageCropperTemplateExtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* QA Skip the known failing smoke test to avoid blocking other PRs (#20269)

Added skip for the failing smoke test

---------

Co-authored-by: Owain Williams <owaingdwilliams@gmail.com>
Co-authored-by: Jason Elkin <jasonelkin86@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
2025-09-25 13:38:49 +02:00
Nhu DinhandGitHub 9e3b27cfdd QA Skip the known failing smoke test to avoid blocking other PRs (#20269)
Added skip for the failing smoke test
2025-09-25 09:31:05 +00:00
Owain WilliamsandGitHub 54b49f90bd Update Readme to signpost the Forum (#20268)
Update README.md with information about the forum

Making a small change to the Readme to signpost the Forum now that it's the place to go for help/questions
2025-09-25 10:33:53 +02:00
Jacob OvergaardandGitHub 6714050f4b Installer: Improves user accessibility by adding missing <form> elements and setting the right focus (#20265)
* fix: adds a <form> element around the consent/telemetry step to ensure proper form handling

also adds a submit action so that you can continue with click of ENTER

* fix: adds umbFocus to select inputs to allow the user to proceed with tabbing too much around, i.e. they will start within the form
2025-09-25 09:07:08 +01:00
Bjarne FyrstenborgandGitHub b1956dea3e Localization/UX: Add a new general translation for "Fields" (#20259)
* Add a new general translation for "Fields"

* 100% height of scroll container
2025-09-25 05:19:36 +00:00
Andy Butland 8d5117fec1 Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Core/Services/PropertyValidationService.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs
#	src/Umbraco.Infrastructure/PublishedContentQuery.cs
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	src/Umbraco.Web.UI.Client/src/packages/core/tree/default/default-tree.context.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts
#	templates/UmbracoProject/.template.config/template.json
#	version.json
2025-09-24 23:31:14 +02:00
Andy Butland d8e8e32f75 Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS 2025-09-24 22:30:10 +02:00
Bjarne FyrstenborgandGitHub e93802769c Make remove button consistent with other multi value item remove button (#20257) 2025-09-24 21:19:14 +02:00
Andy Butland 765e5b0ba9 Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS 2025-09-24 20:41:02 +02:00
Laura Neto 1aa8bdf3aa Bump version to 16.4.0-rc 2025-09-24 14:01:34 +02:00
Andreas ZerbstandGitHub a8cdba6e70 Tiptap: QA Added acceptance tests for regression issue #19763 (#20226)
* Added test

* Finished up test

* Updated tests

* Removed comment

* Updated testCommand

* Reverted smokeTest
2025-09-24 11:05:00 +00:00
Niels LyngsøandGitHub 6001d94f50 Add more icons correct Content Type Designer Icons (#20252)
* add more icons correct Content Type Designer Icons

* add icon
2025-09-24 10:55:00 +00:00
Laura Neto 7a3c711add Bump @umbraco-cms/backoffice to 16.2.0 in Umbraco.Web.UI.Login 2025-09-24 12:01:40 +02:00
6d7c722ec3 Upload field Property Editor: Fix resetting value to undefined when empty (#20134)
* set value to undefined when empty

* fix nullable checks

* ensure promise rejection when validation fails

* avoid js error when detailStore is not present

* implement editor as form control

* remove unused

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-09-24 09:29:42 +00:00
Bjarne FyrstenborgandGitHub a6c92d8a91 Tiptap RTE: Adds heading (h4-h6) toolbar buttons (#20243)
* Register more heading icons

* TipTap heading extensions

* Change icon for headings
2025-09-24 10:18:58 +01:00
Bjarne FyrstenborgandGitHub cacd5c23bd Register more heading icons (#20242) 2025-09-24 09:16:28 +00:00
3c7e05dc4a Server Validation: Ugly hack to convert server validation path to match JSON model (#20240)
* Ugly hack to convert server validation path to match JSON model

* Update src/Umbraco.Web.UI.Client/src/packages/core/validation/context/server-model-validator.context.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/core/validation/context/server-model-validator.context.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-24 08:18:39 +00:00
Niels LyngsøandGitHub 909bc5ac33 View Context: rename setBrowserTitle to setTitle (#20248)
rename setBrowserTitle to setTitle
2025-09-24 07:58:38 +00:00
36d46624bf Dropdown: Support migrated empty values (closes #20029) (#20247)
* Display the latest update date in document collection view

* Don't consider "" as a missing option when initializing the drop down list.

* Don't flag "" as a missing option when validatng server-side.

---------

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
2025-09-24 08:48:47 +01:00
Niels LyngsøandGitHub 8c25295294 Workspace Base: make nonesense getter method to make Lit happy (#20238)
make nonesense getter method to make lit happy
2025-09-24 08:32:58 +01:00
Andy Butland 099fd2aa7c Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS 2025-09-24 08:09:06 +02:00
Laura NetoandGitHub e96f0e58b7 Collection view: Wrong Last edited date displayed in document collection view (closes #19988) (#20235)
Display the latest update date in document collection view
2025-09-24 07:11:58 +02:00
Andy Butland cea2184d47 Merge branch 'v16/bugfix/sorting-by-updateDate-isnt-working-correctly' of https://github.com/umbraco/Umbraco-CMS 2025-09-24 07:09:00 +02:00
Bjarne FyrstenborgandGitHub 8136b251f1 Adjust height of image crop input append (#20245) 2025-09-24 07:03:14 +02:00
Bjarne FyrstenborgandGitHub 9cc801a7f7 Make package item readonly instead of disabled (#20246) 2025-09-24 06:59:21 +02:00
Bjarne FyrstenborgandGitHub a02cd8ecb1 Alignment of daterange in logviewer (#20244) 2025-09-24 06:53:10 +02:00
Laura NetoandGitHub f5cfbb110e Merge branch 'main' into v16/bugfix/sorting-by-updateDate-isnt-working-correctly 2025-09-23 17:51:29 +02:00
Laura Neto aa2a85328e Display the latest update date in document collection view 2025-09-23 17:12:57 +02:00
Lee KelleherandGitHub 85cf3d835e Block List: Fixed clipboard label for nested block items (closes #19929) (#20223)
* Clipboard label for nested block item

* Falsey check
2025-09-23 14:10:46 +02:00
9f2d404ca3 Add test for sibling endpoint returning parent id even when its a folder (#20118)
* Improve GetManagementApiUrl to use the globally defined default version if not specified on the controller

* Add a test to check logic introduced in #20083

* Update tests/Umbraco.Tests.Integration/ManagementApi/Trees/DocumentTypeSiblingControllerTests.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Update tests/Umbraco.Tests.Integration/ManagementApi/Trees/DocumentTypeSiblingControllerTests.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-23 13:56:52 +02:00
Nicklas KramerandGitHub 7db7346d4a Test Data: Fixing endpoint not working #20044 (#20227)
* It worked before i must have broken it somehow. Commit as checkpoint

* Adding a reference from Web.UI.csproj to TestData to allow composers to be composed

* Changing readme and removing project reference
2025-09-23 11:22:29 +00:00
859505e751 Models builder: Move InMemoryAuto models builder and razor runtime compilation into its own package to enable hot reload (#20187)
* Move in memory models builder out of core

* Move runtime validations into backoffice development project

* Obsolete ModelsMode enum

* Move the InMemoryModelsbuilder/RRC novel into the Backoffice development umbraco builder extension

* Add runtime validator to warn if InMemoryAuto is selected but the package isn't installed

* Add backoffice development to template

* Remove propertyGroup

* Remove oopsie

* Check for modelsbuilder in notification handler instead of runtime validator

* Update src/Umbraco.Cms.Api.Management/Controllers/ModelsBuilder/BuildModelsBuilderController.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Infrastructure/Runtime/RuntimeModeValidators/ModelsBuilderModeValidator.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove ModelsMode enum and ModelsModeExtensions

* Apply suggestions from code review

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Move project to source folder

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-09-23 11:58:09 +02:00
Jacob OvergaardandGitHub 8a2f1bc233 Localization: Fixes an issue where the fallback localization was not available after changing DefaultUILanguage (fixes #20216) (#20230)
fix: always load the default/fallback language code so it is available
2025-09-23 10:55:56 +01:00
8213da1b77 Trees: Expanding sibling endpoints to include all entities with trees (#20150)
* Adding member types sibling endpoints

* Introducing sibling endpoint for Partial Views and logic.

* Introducing sibling endpoint for stylesheets

* Introducing sibling endpoint for scripts

* Introducing FileSystemTreeServiceBase.cs

* Introducing interfaces for implementation specific services

* Introducing services for specific trees

* Modifying controller bases to fit new interface and logic.

* Obsoleting old constructors related to PartialView

* Obsoleting ctors related to Stylesheets

* Obsoleting ctors related to scripts

* Adding tests for scriptsTreeService

* Adding tests for siblings

* Removing unused dependencies

* Removing signs and replacing it with flags

* Fixing breaking changes by obsoletion

* Fixing more breaking changes

* Registering missing service

* Fixing breaking changes again

* Changing name of method GetSiblingsViewModels

* Rewritten tests for less bloat and less duplicate code

* Expanding tests to include other methods from service

* Test refactoring: avoided populating file systems that weren't under test, updated encapsulation, renaming, further re-use.

* Management API: Expanding the existing sibling endpoints to support trashed entities (#20154)

* Refactoring existing logic to include trashed items

* Including tests for trashed entities

* Groundwork for trashed siblings

* Documents trashed siblings endpoint

* Controller for Media trashed items

* Expanding tests to include a test for trashed siblings

* Code review corrections

* Resolving code review

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-23 11:17:25 +02:00
Lee KelleherandGitHub f379c9bbdd Member Workspace: Fixes property validation (closes #20210) (#20222) 2025-09-23 09:05:50 +02:00
493dd1dc78 Fix DecimalPropertyEditor on non-English systems (#20215)
* Directly convert from double or float when possible. Also fixes string parsing to work on all cultures. Fixes #20214

* Added unit tests to verify behaviour.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-23 06:59:08 +00:00
Andy ButlandandGitHub a6e736849f Update Umbraco version for LTS release in UmbracoProject template 2025-09-23 06:23:00 +02:00
Niels LyngsøandGitHub 3b8d8c57c3 Content Editor: Fix shared label and localize it (#20188)
* correct shared label and localize it

* fix localization
2025-09-22 17:05:30 +01:00
Niels LyngsøandGitHub fb0f719c7d Shortcuts: Implement context and a few shortcuts of interest (#20204)
* setup files

* allow Unproviding as a valid word

* setup context

* declare new module

* clean up on destroy

* implement keydown listener

* rename to all

* Revert "rename to all"

This reverts commit 5384408d5f.

* revert shortcuts revert

* move view initialization to submittable workspace base

* comment on destroy thingy

* submit workspace shortcut

* rename to action

* observe parent activation to make sure children follows along.

* fix comment to make AI happy

* implement modal view and titles

* fix getting title from token

* rename context alias

* use controller not context here

* provide modal view at modal element

* implement view context at app level

* Refactor view inheritance logic

* reverse children to be activated loop

* note on global shortcuts

* additional note
2025-09-22 15:19:28 +00:00
Nikolaj GeisleandGitHub e29e612e46 Caching: Don't remove null values from hybrid cache to avoid broken content references repeatedly requiring a database hit (closes #18892) (#20209)
* Implement initial fix

* Revert "Implement initial fix"

This reverts commit 05e5803eba.

* Don't remove null cache values, they can always get removed when clearing cache
2025-09-22 16:13:00 +02:00
dependabot[bot]andJacob Overgaard 3c592ad2cd Bump vite from 7.1.3 to 7.1.5 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.1.3 to 7.1.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-22 13:45:13 +02:00
Andy Butland 2be39d8b9f Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS 2025-09-22 13:34:55 +02:00
Andy Butland 410fc1900d Cherry-pick of #20129 to 16 (part 2). 2025-09-22 13:34:44 +02:00
5d17920a73 UTC data migration doesn't work in Linux (closes #20002) (#20112)
* Adjusted the UTC SQL Server migration to convert time zone ids to the correct format

* Apply suggestions from code review

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Small rename

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-22 13:16:13 +02:00
d7d39658e0 Permissions: Fix removal of check on removal the final admin user (closes #19917) (#19921)
Reworks update of user groups on a user by updating in place rather than deleting and re-adding.
Ensure user groups affected by the update are invalidated in the repository cache.

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-09-22 12:51:27 +02:00
79de4e3871 Tiptap RTE: Adds hover and focus border input states (#20172)
* added hovering and focus border to RTE

* fix main to OG

* fix to main again

* I'm going to cry

* added hovering and focus border to RTE

* fix indentation

* Refactored to set `--umb-tiptap-edge-border-color` variable

so that the toolbar and statusbar can pick up the state changes.

* Applies `transition` to the toolbar/statusbar components

---------

Co-authored-by: Oskar kruger <obk@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-09-22 10:35:52 +00:00
8ff11e7c64 Link rendering: Add support for UrlMode parameter in HtmlLocalLinkParser (port to 16) (#20207)
* Add support for UrlMode parameter in HtmlLocalLinkParser (port of #20200 from 13 to 16).

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-09-22 09:34:08 +00:00
Andy Butland 2c3a2e2b2d Cherry-pick of #20129 to 16. 2025-09-22 11:26:25 +02:00
5dd75c0877 Update label for tree item caret to identify if open or closed (#20199)
* added hovering and focus border to RTE

* fix main to OG

* fix to main again

* I'm going to cry

* added dynamic label to expand/collapse button on parent/child treeitems

---------

Co-authored-by: Oskar kruger <obk@umbraco.dk>
2025-09-22 11:09:54 +02:00
182b7e0cfa Accessibility changes for the top navbar tabs and settings tabs (#20107)
* Accessibility changes for the top navbar tabs and settings tabs

* fix indention

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-09-22 08:33:58 +00:00
815f28e3b9 Section Sidebar Menu: Auto expand to paginated tree items (closes #17074) (#19883)
* align naming

* mute updates

* lower threshold

* add expansion model with target

* add function to link entries

* fix self import

* export constants

* update js docs for entity expansion manager

* link entries

* fix import

* do not export from menu here

* fix import

* fix import

* align how we register manifests

* add specific managers for section sidebar menu

* use structure items

* dot not expand current item

* Refactor section sidebar menu to use programmatic extension slot

Replaces the template-based <umb-extension-slot> with a programmatically created UmbExtensionSlotElement for improved performance and UX.

* add section context extension

* register menu as section context instead of hardcoding

* rename folder

* align naming

* export extension slot elements

* fix typings

* destroy extension slot element when host is disconnected

* Added user start node restrictions to sibling endpoints.

* use entry model

* move and rename

* register global context to hold menu state across sections

* temp observe section specific expansions

* temp observe section specific expansions

* add method to collapse multiple items

* Further integration tests.

* Tidy up.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* bind expansion to section

* make entity expansion manager generic

* Revert previous update.

* add helper method

* remove temp test data

* Retrieves item counts before and after the target for sibling endpoints and returns in API response.

* Applied previous update correctly.

* Removed blank line.

* Fix build and test asserts following merge.

* add getItem method

* Update OpenApi.json.

* generate new server types

* include last item in target

* add target pagination type

* return totalBefore and totalAfter

* call siblings endpoint for documents

* add method to load children with target

* rename to item

* wip target pagination manager

* add button to load prev tree items

* render prev and nexts buttons for tree items

* Update tree-load-prev-button.element.ts

* add util to append to unique array

* add state method to prepend data

* implement methods to load next and prev items

* add methods to interface

* Update tree-item-element-base.ts

* Update tree-item-context-base.ts

* remove unused

* align methods

* update types

* add jsdocs

* add deprecation notice

* fix jsdocs

* fix import

* Update tree-data-source.interface.ts

* remove duplicate type

* clean up

* fix page calculations

* remove unused

* clean up

* pass full entry to event

* add type for menu item expansion

* export types

* add menuItem alias

* Update types.ts

* support menu item expansion entry

* add const for menu item alias + use for breadcrumb and menu item

* add data type menu item alias const + apply to breadcrumb

* move to correct manifest

* add menu item alias to expand entries

* Update manifests.ts

* add menu structure kind types

* add kind to manifests

* add menu item context

* filter menu items

* handle menu item expansion

* clean up

* fix order

* add example dashboard and entity action

* import types

* align model type names

* align naming

* use ui component

* add guard for menu item entry

* use correct type

* Update section-sidebar-menu.element.ts

* Update entity-expansion.manager.ts

* export constants

* add menuItemAlias to manifest

* add menuItemAlias to manifest

* add menuItemAlias to manifest

* add menuItemAlias to manifest

* add menu item alias

* add menuItemAlias to manifest

* add menuItemAlias to manifest

* add menuItemAlias to manifest

* add alias

* add kind

* fix import path

* do not expand menu from modal

* collect all menu-item files in one folder

* fix lint errors

* Update content-detail-workspace-base.ts

* clean up

* rename to example

* add button to collapse everything within a section

* return correct data from base

* recalculate after

* fix breadcrumb for non-variant structure

* reload entity

* destroy

* remove self

* Updated acceptance tests to check if a caret button is open before clicking

* Bumped version of test helpers

* use const

* add target paging for tree root items

* more specific field names

* update field name

* add model for offset pagination

* add request to model name

* correct

* using Event Contsants for event map

* comment

* clean event listeners before adding new ones

* use createObservablePart

* add paging type guards

* add types

* add check for unique

* add comment

* pass data type id

* wip reload tree logic

* move start + end target logic to target pagination manager

* use target pagination manager in tree item context

* remove local references to start, end and base targets

* calculate before and after when reloading

* clean up

* support children in tree item context

* add methods to observe an expansion entry

* reload structure when item is created

* UX adjustments

* add controller alias to observer

* Update default-tree.context.ts

* Update default-tree.context.ts

* Update default-tree.context.ts

* test targets in document type tree data source

* when reloading only send the target if its part of the current items

* wip tree request manager

* make data source base a controller

* add tree request helper for document types

* use request helper in data source

* clear more data when clear is called

* when reopening a tree item - reuse previous state

* add tree item children manager

* split to manager

* clean up

* only return an entity model when getting target

* allow entity model as target

* add null checks

* add method for getSiblingsFrom

* implement target for tree data request manager

* Update default-tree.context.ts

* set parent for tree root

* reload if target is new

* add types for tree data request manager

* implement request manager for document tree

* use request manager for media tree

* add request manager for data type tree

* move into folder

* move into folder

* move into folder

* add target support for document blueprint

* add request manager for template tree

* add request manager for media type tree

* add hasChildren flag for root

* make start node its own thing

* move hasChildren logic to children manager

* Create tree-item-expansion.manager.ts

* use expansion manager

* align tree item managers

* Update tree-item-context-base.ts

* support take 0

* add methods to get new targets

* add retries

* add button loading states

* fix next start and end

* reset baset target

* use clear when restting children

* throw error if parent doesn't match request

* show notifcation when children is reset

* only render menu context for non trashed document and media items

* use correct import

* fix types

* update interfaces and imports to fix circular dependencies

* move into tree-item folder

* rename file

* Update tree-item-context-base.ts

* move token out of context file to remove circular dependency

* set take size to 50

* remove unused

* export const

* correct default value

* check on both sides after a new base target

* `import type` sort ordering

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-09-22 07:22:54 +00:00
96b37889ae Docs: Updated contribution guidelines to include PR naming best practices (#20180)
* Add naming PR guide to Update contributing-creating-a-pr.md

* Add PR naming guide to contributing-creating-a-pr.md

* Update contributing-creating-a-pr.md

* Updates note on versions and default branch

Updated default branch reference and contribution guidelines.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-20 13:15:53 +00:00
Niels LyngsøandGitHub fa575d1f84 View Context: observe parent activation to make sure children follows along. (#20206)
observe parent activation to make sure children follows along.
2025-09-20 14:03:41 +02:00
Mads RasmussenandGitHub 37f9dea259 Tree: Optimize tree root total children calls (#20192)
* Remove redundant call to #loadTreeRoot in tree context

* Update tree root requests to use take: 0

Changed all tree repository requestTreeRoot methods to call getRootItems with { take: 0 } instead of { take: 1 }. This ensures that no items are fetched when only the total count is needed to determine if children exist, improving efficiency.
2025-09-20 13:57:38 +02:00
61c0ab6759 Management API: Add user data delete endpoint (closes #19793) (#20040)
* Add user data delete endpoint to the management API

* Fix typo and remove unused umbracoMapper

* Applied changes from code review.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-20 10:45:14 +00:00
a7bb1fc20d Repositories: Quote table and columns and use NPoco extensions over raw SQL (#20034)
* fix sql syntax issues

* unify all dtos, fix autoIncrement for NPoco.Insert and .BulkInsert

* fix Copilot review comments

* fix sql syntax in TrackedReferencesRepository.GetPagedDescendantsInReferences()

* remove changes in TemplateServiceTests

* Tweaks and fixes from first review.

* Reverted changes outside scope of PR.

* Use FirstOrDefault over SelectTop.

* Fix delete member issue.

* Fixed issue with create of webhooks.

* Reverted changes to default data install.

* Removed unused method.

* Rationalised use of quoting helpers.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix nullability issue.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-20 11:40:16 +02:00
Niels LyngsøandGitHub 07f0b7c6ae Content/Document Picker: make not existing items appear as not found items (#20198)
make not existing items appear as not found items
2025-09-19 17:45:46 +00:00
Niels LyngsøandGitHub 12ae51d67e Hints: Chore, just renaming files to fit name (#20203)
rename files to fit name
2025-09-19 19:22:16 +02:00
Niels LyngsøandGitHub 3a196ef996 Icons: add badge icon (#20201)
add badge icon
2025-09-19 19:01:19 +02:00
Niels LyngsøandGitHub c1b74b6883 Badge: Make badge go on top (#20196)
* umb badge and implementation

* only show variant selector hint if hint on none active variant
2025-09-19 13:18:35 +02:00
Mads Rasmussen 5921950ea0 remove console.log 2025-09-19 12:53:25 +02:00
Nhu DinhandGitHub 0f11ee3357 E2E nightly pipeline: Fix the Tiptap failing tests (#20194)
* Updated default value of tiptap toolbar and tiptap extensions

* Bumped version

* Updated default extension value of Tiptap
2025-09-19 16:00:43 +07:00
dca70a0bd0 Dependencies: Updates to .NET 10 RC and NPoco 6.1 (#20184)
* Update to .NET 10 RC 1.

* Update NPoco to 6.1.0 and resolve binary breaking changes.

* Resolved behavioural breaking changes (need to use List<string> over string[] for Contains).

* Update dependency on NPoco.SqlServer.

* Further fixes from manual testing.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixed comment typos.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixed nullability issue.

* Fix database creation issue

* Fix missing to list

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2025-09-19 08:59:03 +00:00
Niels LyngsøandGitHub eb19346432 View Context: Implement browser title (#20145)
* POC browser title

* support view-alias as null

* provide tab view contexts

* refactor view context

* refactor workspace implementation of view context

* clean up context + revert title order

* view context for section context

* update type

* disable and re-active parent views

* remove unused import

* remove log

* Implementation of Browser Title

* implement more browser titles

* sort imports

* remove unused imports

* use _internal_

* lint updates

* reactive titles

* fix hints for root tab

* implement use of UmbEntityDetailWorkspaceContextBase
2025-09-18 18:50:03 +00:00
ec23f7008e Interaction Memory: Feature for picker modal state retention (#18305) (#20159)
* set property type unique on context

* set the value

* observe property type unique from content picker property editor

* remove unused

* observe data type unique

* wip picker memories

* append memory option to the picker data model

* split into methods

* initialize memory context

* rename arg

* make memory module

* export constants

* allow nested memories

* pass memory from input document to picker context

* Update property-editor-ui-content-picker.element.ts

* fix import

* prefix with interaction

* clean up

* fix import

* rename module

* Update vite.config.ts

* update module name

* observe after search is initialized

* use memory manager in all places

* make picker modal base element

* update types

* add memory for document picker property editor

* store tree item picker expansion state in interaction memory

* Update picker-modal-base.element.ts

* remove the memory if we have no expansion state

* delete memory if it doesn't include anything

* clear picker input memories if nothing comes from the modal

* Refactor interaction memory handling in picker input

Moved the passing of interaction memories from the document picker input context to the core picker input context.  Renamed the method for setting memories from the modal for clarity and consistency.

* only dispatch an event if the value changes

* remove unused

* observe to support close on escape

* add comments

* fix type error

* fix typings

* Replaces data type-based memory keys with config hash-based keys

* dont store picker search in interaction memory

* Rename interaction memory key in picker modal base

* Remove error throw for missing interaction memory

* Refactor interaction memory handling in content picker

Replaces the single 'memory' property with an 'interactionMemories' array and updates event handling to support multiple interaction memories. Adjusts property types, event listeners, and child component bindings to accommodate this change.

* Refactor content picker to use interaction memories

Replaces the previous memory handling with a new approach using interaction memories, including unique hash generation based on config. Updates event handling and property names to align with the new interaction memory model, improving state management and consistency.

* remove debugger

* rename const

* wip media picker memories

* remove args

* simplify memory model

* update internal value before dispatching event

* remove unused

* Update property-type-based-property.element.ts

* rename method

* simplify types

* implement location memory for media picker

* temp type cast

* set location memory when using the breadcrumb

* remove code duplication

* bubble memories from input media to input content

* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/content-picker/property-editor-ui-content-picker.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix import

* remove unused method

* Refactor content picker interaction memory management

Introduced UmbPropertyEditorUiInteractionMemoryManager to encapsulate interaction memory logic for property editors. Updated the content picker property editor to use this new manager, removing duplicated memory management code and improving maintainability.

* Refactor interaction memory management in pickers

Replaces custom interaction memory logic in document and media picker property editors with the shared UmbPropertyEditorUiInteractionMemoryManager. Updates unique memory key prefixes for consistency and simplifies related event handling. This improves maintainability and standardizes memory management across property editors.

* export context token

* add js docs

* remove timestamp

* add tests for interaction memory manager

* Added tests for the property editor ui interaction memory manager

* Rename memories to memoriesForPropertyEditor

Renamed the 'memories' property to 'memoriesForPropertyEditor' in the interaction memory manager and updated all references in related property editor components and tests for clarity and consistency.

* Separated out `import type`s + ordering

* remove interaction memory implementation in modal context

* remove interactionMemories from modal interface

* revert to using the umbOpenModal helper

* align property and event name

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-09-18 19:56:31 +02:00
Mads Rasmussen 8b6b2fcdfd fix missing const exports 2025-09-18 18:46:30 +02:00
014e95c2c4 Dynamic Root: Fix missing dynamicRootQueryStep types (closes #19612) (#20183)
* expose content-picker types in a module

* update path

* clean up module

* Update entry-point.ts

* Whitespace tweak

(spaces to tabs)

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-09-18 16:32:12 +00:00
611db11205 Content Variant: Preserve additional URL path in split view navigation (closes #17412) (#20177)
* Preserve additional URL path in split view navigation

Enhances the split view manager to retain any additional pathname segments when updating the browser history, ensuring that navigation state beyond the variant part is preserved.

* Update src/Umbraco.Web.UI.Client/src/packages/core/workspace/controllers/workspace-split-view-manager.controller.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* format

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-18 17:31:02 +01:00
Jacob OvergaardandGitHub aa2d4f1207 Variants: Implements validation hints to the variant selector (closes #19953) (#20179)
* feat: gets hints and assigns to variants to enable the view to show a badge if there is a hint

* feat: find the first hint on the non-active variant

* feat: protect against non-variants

* feat: ignore invariant variants

* feat: adds a render method for hints

* chore: removes comment

* only add a new hint if the weight is higher
2025-09-18 16:37:21 +01:00
3025dcdf31 Tags Property Editor: Remove tags with keyboard backspace/delete (#19892)
* Remove tags with backspace

* Unused varible

* Manage focusable tag and tabindex updates

* `import`s tidy-up

* Adds `tabindex` and focus outline for each tag

* Removed the tag wrapper container

No longer required.

* Adds support for "Delete" key

* Disables `autocomplete` for new tag input

This conflicts with the suggestions prompt.

* Reverted removal of the tag wrapper container

Required as a "skip tags" tabbing feature

* Uses `UmbChangeEvent`

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-09-18 11:56:11 +00:00
Niels LyngsøandGitHub 1660e69681 Workspace Actions: set attributes on the right element for label to work (#20178)
set attributes on the right element
2025-09-18 12:34:36 +01:00
Andreas ZerbstandGitHub f23050d5c6 V16 QA cherry picked acceptance tests with different configuration (#20106)
* Added appsettings

* Added test setup for different config

* Added appsettings for external login

* Added acceptance tests

* Updated pipelines

* Updated solution file

* V15 QA Added external login provider tests and split pipeline into templates (#20049)

* Added setup for external login

* Started on yaml

* Added test file

* Updated pipeline

* Use env vars

* Added env variables and commented out test we don't need to run

* Removed list from matrix

* Updated condition

* Updated package path

* Updated testFolder

* double slash

* Updated condition

* Updated condition again

* Added port

* Removed redundant values

* Set as env vars

* Added env vars beneath matrix

* Get env

* Updated naming

* Updated usage of values

* Added a check for client id, to see if value set

* Moved env out of pool

* Tried moving env

* Trying to fix the env being empty

* Removed env

* Updated name of variable

* Fixed A cyclical reference

* Updated typo

* More logging

* Reverted change

* Added env

* Added env to tests

* Cleaned up

* Added yaml template files

* Updated nighly pipepline to use templates

* Updated sln

* Split yaml into templates for e2e setup

* Updated pipeline

* Updated solution file

* Set value

* Added if statement

* Added variables

* Set default values

* Updated values

* Updated condition

* Run multiple tests

* Added env

* Updated from parameter to variable

* Fixed condition

* Fixed condition to use actual value

* Updated npx wait on command

* Updated pwsh

* Updated port again

* Updated port value

* Updated wait on

* Updated condition

* Restructured

* Updated var

* Updated run application steps

* Added echo

* Updated to boolean

* Updated conditions

* Updated test template usage

* Added databaseType

* Added another databaseType

* Split up templates

* Fixed indentation

* Updated condition

* updated path

* removed build from path

* Updated conditions for azureAd

* Fixed indentation

* Updated to single qoutes

* Cleaned up

* Removed unused file

* Clarified namin

* Moved

* Updated pipeline, not done

* Updated locator

* Updated pipelines

* Updated test helpers package

* Skipped build stage for default app settings tests

* Updated password var

* Updated locators

* Updated defaultconfig build setup

* Split E2E stage in two

* Added parameter for skipping integration tests

* Cleaned up

* Added ASPNETCORE_URLS

* V15 QA acceptance tests with appsettings (#19550)

* Start of appsetting

* Updated setup of playwright

* Adjusted the pipeline

* Updated appsetting

* Added install test

* Added comments

* Updated pipeline

* Updated development app settings

* Commented tests out

* comment

* Added if statement

* Updated pipeline

* Fixed condition

* Changed to production

* Added a log

* Updated copy item

* Added

* Updated app settings

* Updated pipeline

* Moved playwright login

* Updated pipeline

* Updated app setting

* Updated nightly

* Updated appsettings

* Updated get

* Updated wait on

* Updated appsettings

* Updated connection string

* Updates

* Skips code

* Updated variable

* Updated pipeline

* We want to always retain the trace, to see if the test runs as expected on the pipeline

* Added a temporary wait till port is open

* Fixed condition

* Added missing tcp for wait on

* Updated URL env

* Updated setup

* Fixed string

* Updated locator

* Split tests into SQLite and SQLServer

* Updated pipeline to run all tests

* Retain trace on failure

* Added testFolder var

* Added appsettings and program for delivery api tests

* Updated playwright config

* Split test runners into defaultconfig and different app settings

* Added delivery api tests

* Cleaned up tests

* Bumped version

* Updated pipeline

* Small fixes

* Added password

* Updated connection string

* Fixed

* Removed quotes

* Removed unnecessary connection string

* Added missing password

* Cleaned up

* Cleaned up

* Cleaned up

* Updated to use helpers

* Bumped version

* Updated helper usage

* Added password to variables and a condition

* Added check

* Indented value

* Fixed condition

* More updates

* Updated variable

* Removed settings

* Updated delivery api tests

* Bumped version

* Updated test

* Removed unnecessary variables

* Updates based on copilot comments

* Fixed merge conflict

* Fixed env creation step

* Bumped version

* Updated tests to use new helper

* Updated helper

* Updated to string

* Moved logic to conditions

* bumped version

* Use new name for helper

* Remove echo

* Added variable
2025-09-18 10:58:54 +02:00
fd0ccc529b Property Editors: Improve Missing Property Editor UI and allow save/publish (#20104)
* Initial implementation of non existing property editor

* Adjust `MissingPropertyEditor` to not require registering in PropertyEditorCollection

* Add `MissingPropertyEditor.name` back

* Remove unused dependencies from DataTypeService

* Removed reference to non existing property

* Add parameterless constructor back to MissingPropertyEditor

* Add validation error on document open to property with missing editor

* Update labels

* Removed public editor alias const

* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/missing/manifests.ts

* Add test that checks whether the new MissingPropertyEditor is returned when an editor is not found

* Also check if the editor UI alias is correct in the test

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Share property editor instances between properties

* Only store missing property editors in memory in `ContentMapDefinition.MapValueViewModels()`

* Add value converter for the missing property editor to always return a string (same as the Label did previously)

* Small improvements to code block

* Adjust property validation to accept missing property editors

* Return the current value when trying to update a property with a missing editor

Same logic as for when the property is readonly.

* Fix failing unit tests

* Small fix

* Add unit test

* Remove client validation

* UI adjustments

* Adjustments from code review

* Adjust test

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-18 08:55:58 +02:00
Lee KelleherandGitHub 061be01e89 Extension Insights: Fixes CSS alignment (fixes #20170) (#20174)
Extension Insights: Fixes CSS alignment

Fixes #20170.
2025-09-18 08:51:09 +02:00
Andy Butland e415ad22e9 Updated obsoletion messages on IPublishedContent Parent and Children properties. 2025-09-18 06:44:03 +02:00
Andy Butland 07641981a4 Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/Content/ContentCollectionControllerBase.cs
#	src/Umbraco.Core/Services/IMemberService.cs
#	src/Umbraco.Core/Services/MemberService.cs
2025-09-17 15:42:23 +02:00
8a48d17580 Add Accessibility for TipTap RTE input fields (#20157)
* Add Accessibility for RTE input fields

* add localization key for EN

* Adds `aria-required` attribute

---------

Co-authored-by: Oskar kruger <obk@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-09-17 13:36:16 +01:00
7483f20191 Misleading profile button label (#20161)
* Add Accessibility for RTE input fields

* fix indentation

* update method with singular fetch

* Update misleading profile button label and localizations

* Revert "update method with singular fetch"

This reverts commit 5360df95bb.

* Update methodname

* Revert XML changes and simplify localization keys

* Restores "openCloseBackofficeProfileOptions" localization key

---------

Co-authored-by: Oskar kruger <obk@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-09-17 13:35:51 +01:00
Andy Butland b593d9dadf Merge branch 'v17/dev' of https://github.com/umbraco/Umbraco-CMS into v17/dev 2025-09-17 12:48:12 +02:00
BerglindVandGitHub 311776a0a9 Release Notes: Improved readability for Accessibility tag in the Update release.yml (#20135)
* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml
2025-09-17 11:33:53 +02:00
Laura NetoandGitHub cc6ce1e80f Mark MemberService.GetMembersByPropertyValue() methods as obsolete (#20092) 2025-09-17 10:06:42 +02:00
Niels LyngsøandGitHub b8b72dd9d3 Content Type Designer: Fix to prevent dragging inherited properties (#20136)
do not drag inherited properties
2025-09-17 10:01:54 +02:00
Lee KelleherandGitHub 04cf97bd90 Member workspace: Fix for loading inside modal (#20163)
* Member workspace (in modal) fix

Fixes #20085.

* Updated with member workspace constants
2025-09-17 09:50:04 +02:00
de8545456d Improvement - Content type filters : Add Validation for allowed children and root (#19903)
* Validate content type filter restrictions when creating content at root.

* Validate content type filter restrictions when creating content as child.

* Update tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEditingServiceTests.Create.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-17 09:38:12 +02:00
dd01a56d2a Feature: single block property editor (#20098)
* First Go at the single block property editor based on blocklistpropertyeditor

* Add simalar tests to the blocklist editor

Also check whether either block of configured blocks can be picked and used from a data perspective

* WIP singleblock Valiation tests

* Finished first full pass off SingleBlock validation testing

* Typos, Future test function

* Restore accidently removed file

* Introduce propertyValueConverter

* Comment updates

* Add singleBlock renderer

* Textual improvements

Comment improvements, remove licensing in file

* Update DataEditorCount by 1 as we introduced a new one

* Align test naming

* Add ignored singleblock default renderer

* Enable SingleBlock Property Indexing

* Enable Partial value merging

* Fix indentation

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-09-17 07:20:09 +02:00
Kenn JacobsenandAndy Butland 546849d825 Make notification service able to handle segmented content (#20160) 2025-09-17 06:55:29 +02:00
Markus JohanssonandGitHub aba82dd522 #19736 adjust drag placeholder for document picker (#19737) 2025-09-16 20:11:35 +00:00
Jacob OvergaardandGitHub 4e300490b2 Generated Partial Views: Improves the generated code slightly for a better developer experience (#20151)
improves the partials to remove an extra semicolon, store a value, and replace an obsoleted key
2025-09-16 18:11:06 +02:00
Andy Butland 8a342be4f4 Merge branch 'v17/dev' of https://github.com/umbraco/Umbraco-CMS into v17/dev 2025-09-16 14:11:49 +02:00
8cc1d4bcae Avoid throwing an exception on getting references when migrating content with changed data types (16) (#20155)
* Avoid throwing an exception on getting references when migrating content with changed data types.

* Reintroduced generic catch to avoid functional breakage

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-09-16 11:58:08 +00:00
f6d0667e91 V16 - Renaming signs to flags (#20109)
* Renaming the providers, collection builder and model

* Renaming the items using signs

* Renaming in controllers

* Renaming mapping flags

* Renaming sign tests to flags

* Changing the test files names from signs to flags

* Updated a couple more references.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-16 11:40:48 +00:00
Laura Neto eea970a648 Fix merge issues in DataTypeService 2025-09-16 13:01:48 +02:00
Niels LyngsøandGitHub 5fd01e000c Property Value Preset builder caller args (#20111)
* update types for callArgs

* note for Engage

* implement callArgs type updates

* tests

* implement callArgs for Value Preset Builder

* updated fallback and console.log feedback

* change to warn

* remove unused import

* JS docs

* TODO

* lint fix
2025-09-16 12:07:54 +02:00
Kenn JacobsenandGitHub ef1aaf8bce Cherry-pick #20142 for V16 (#20147)
* Support querystring and anchor for local links in Delivery API output (#20142)

* Support querystring and anchor for local links in Delivery API output

* Add default implementation for backwards compat

* Add default implementation for backwards compat (also on the interface)

* Fix default implementation

* Add extra tests proving that querystring/postfix can be handled for local links in both legacy and current format.
2025-09-16 11:33:40 +02:00
Jacob OvergaardandGitHub 4ae3bb3835 AppSettings: Improves the templates so they reflect the latest recommended settings (#20148)
hides obsolete appsettings from the template and renames `TimeOutInMinutes` to `TimeOut` and updates its format
2025-09-16 11:30:43 +02:00
Andy Butland 20a2f90441 Merge branch 'main' into v17/dev 2025-09-16 10:33:09 +02:00
Lee KelleherandGitHub 9aa9d4499f Fixes regression with hidden tab labels in the Content Editor (#20140)
Fixes regression with hidden tabs in the Content Editor

Regression occurred in #19255, originally fixed in #19370.
2025-09-16 09:15:56 +02:00
Lee KelleherandGitHub 343a07de71 Tiptap RTE: Fixes undo when RTE is emptied (#20133)
* Tiptap RTE: prevent `undefined` value

If the `value` becomes `undefined`, then the block data can't be tracked (for undo/redo).
The scenario comes when a user "selects all" contents, cuts it, and pasted it back in.

Fixes #20076

* Tiptap RTE: fixes selection white text bug

* Tiptap RTE: amends heading styles (for first-child)
2025-09-16 09:14:20 +02:00
Mads RasmussenandGitHub 4207e0360c Reload section root on repeated header section click (#20141)
* Reload section root on repeated header section click

Adds logic to reload the root of a section if its header is clicked while already active. This improves navigation consistency by resetting the section view when the user clicks the current section again.

* Update backoffice-header-sections.element.ts
2025-09-15 17:56:22 +00:00
cbf5665f15 V16: Fix member validation endpoints (#20116)
* Call the validation of member data

* Fix return status

* Refactor to remove duplicate code

* Update src/Umbraco.Infrastructure/Services/MemberEditingService.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Removed `disableNotifications` from members validation

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-09-15 17:14:39 +00:00
Jacob OvergaardandGitHub 3d7ac5776c V17: Moves current-user related entities from 'user' to 'current-user' package (#20125)
* fix: moves current user config repository and related dependencies to the 'current-user' package

previously, it was not exported, so is not a breaking change

* chore: moves current-user-allow-mfa condition to the 'current-user' package to avoid circular dependencies (and because it naturally belongs there)

* feat: exports all current-user config-related items

* chore: move to 'current-user'

* chore: make sure to export all constants
2025-09-15 15:14:48 +01:00
Jacob OvergaardandGitHub 40fe4995e8 V16: keepUserLoggedIn has no effect (#20123)
* feat: exports all current-user config-related items

* fix: observes the current-user config for the 'keepUserLoggedIn' value and simply try to refresh the token when the worker makes an attempt to log out the user

* fix: moves current user config repository and related dependencies to the 'current-user' package

previously, it was not exported, so is not a breaking change

* chore: moves current-user-allow-mfa condition to the 'current-user' package to avoid circular dependencies (and because it naturally belongs there)

* fix: checks for `keepUserLoggedIn` directly

* Revert "chore: moves current-user-allow-mfa condition to the 'current-user' package to avoid circular dependencies (and because it naturally belongs there)"

This reverts commit 17bebfba41.

* Revert "fix: moves current user config repository and related dependencies to the 'current-user' package"

This reverts commit 0c11462898.

* Revert "feat: exports all current-user config-related items"

This reverts commit a6586aff1d.

* fix: avoids depending on 'resources'
2025-09-15 15:11:01 +01:00
3b6be8e7c4 Feature: Redirect to the last visited path when navigating between sections (#20084)
* redirect to the last visited path in a section

* Update src/Umbraco.Web.UI.Client/src/apps/backoffice/components/backoffice-header-sections.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update backoffice-header-sections.element.ts

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-15 14:08:15 +01:00
Andy Butland c3eabda10e Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Core/Services/DataTypeService.cs
2025-09-15 13:36:37 +02:00
88dd30b6c5 Repositories: Use NPoco extensions in DatabaseCacheRepository (#19955)
* fix sql syntax issues

* fix some Copilote comments

* fix another Copilot comment removing raw sql strings

* fix review comments

* Usings and comments.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-15 11:22:29 +00:00
d3e6508952 Repositories: Introduce and use NPoco and custom extension methods for SQL syntax in ContentTypeRepositoryBase (#19986)
* fix Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement
     .ContentTypeRepositoryBase.DeletePropertyType method.

* fix more sql syntax

* fix review comments

* Fixed issues raised in code review.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-15 10:25:11 +00:00
84c8c954c7 Adding validation for missing media items (#20101)
* Adding a check to see if the posted value's source path isn't null or empty.

* Moving validation logic to proper files

* Moved logic to a required validator

* Adding tests to ensure validation works

* Minor tidy up: XML header comments, re-use in tests, clarified test names.

* Adding unit tests for file upload validation

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-15 08:40:49 +00:00
d50f8e6718 Block editors: resolves clipboard UFM label (#20102)
* Block item copy rendered UFM label to clipboard

* Fixes clipboard entry's icon

* Clipboard entry: sets title

and fallback on the unique (instead of empty string)

* Clipboard entry: CSS for flat menu structure

* Clipboard entry: replace condition with `when`

+ imports tidy-up

* Imports tidy-up

* Fixed UFM Virtual Render's nested text retrieval

Previously, it'd placed nested text after the parent's text,
now it remains nested.

* Update src/Umbraco.Web.UI.Client/src/packages/ufm/controllers/ufm-virtual-render.controller.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-15 08:56:32 +02:00
5ddcf44256 Independently manage integrated authentication and trust certificate fields on installer from database settings (#20070)
* Independently manage integrated authentication and trust certificate fields on installer from database settings.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-12 21:16:57 +02:00
87350d7451 Add Vietnamese to UI culture (#20061)
* add vietnamsese to ui culture

* update vietnamese

* update vietnamese

* add vietnamese

* Update src/Umbraco.Web.UI.Client/src/assets/lang/vi.ts

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-10 13:06:23 +00:00
dependabot[bot]andJacob Overgaard 9bad0483d8 Bump vite from 7.1.3 to 7.1.5 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.1.3 to 7.1.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 14:32:07 +02:00
d6c181457c Non existing property editor (#19997)
* Initial implementation of non existing property editor

* Adjust `MissingPropertyEditor` to not require registering in PropertyEditorCollection

* Add `MissingPropertyEditor.name` back

* Remove unused dependencies from DataTypeService

* Removed reference to non existing property

* Add parameterless constructor back to MissingPropertyEditor

* Add validation error on document open to property with missing editor

* Update labels

* Removed public editor alias const

* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/missing/manifests.ts

* Add test that checks whether the new MissingPropertyEditor is returned when an editor is not found

* Also check if the editor UI alias is correct in the test

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Share property editor instances between properties

* Only store missing property editors in memory in `ContentMapDefinition.MapValueViewModels()`

* Add value converter for the missing property editor to always return a string (same as the Label did previously)

* Small improvements to code block

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-10 11:20:06 +02:00
Andy ButlandandGitHub c93d4d9318 Correct the population of the parent for sibling items when retrieved under a folder (#20083)
Correct the population of the parent for sibling items when retrieved under a folder.
2025-09-10 07:45:36 +02:00
Andy ButlandandGitHub 4ba01394b8 Updated contributing guidelines to welcome contributions on bugfixes that aren't specifically marked as "up for grabs" (#20086)
* Updated contributing guidelines to welcome contributions on bugfixes that aren't specifically marked as "up for grabs".

* Updated index page.
2025-09-09 16:51:53 +02:00
4294b5a078 Resolve composition properties on a block for the RTE. (#20105)
* dont rellay on only resolved based on properties, but also scan the CompositionPropertyTypes to resolve compistion inside the black

* Refactored to helper method.

---------

Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-09 16:23:49 +02:00
be8fee199f Move persistence of relations from repository into notification handlers (#20095)
* Move persistance of relations from repository into notification handlers.

* Applied suggestions from code review.

* Apply suggestions from code review

Co-authored-by: Ronald Barendse <ronald@barend.se>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixed build.

* Fixed failing integration tests.

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-09 16:03:20 +02:00
Andy ButlandandGitHub 00092b5061 Fixes divide by zero error on retrieving take 0 from the recycle bin root API endpoint (#20096)
Fixes divide by zero error on retrieving take 0 from the recycle bin root API endpoint.
2025-09-09 14:48:00 +02:00
Laura Neto 6dc9191ad3 Fix wrong migration order 2025-09-09 11:04:10 +02:00
Nicklas KramerandGitHub d51561b202 V16 - Introducing signs to variants (#20053)
* Adding signs to variants and adjusting HasPendingChangesSignProvider.cs

* HasPendingChangesSignProvider.cs now populates variants & refactoring to move logic to DocumentPresentationFactory.cs

* Working HasScheduleSignProvider.cs to provide variant signs

* Refactoring ISignProvider.cs to take an IEnumerable again

* Moving code from controllers to factories

* Refactoring HasPendingChangesSignProvider.cs to use the right Interface method

* Refactoring HasScheduleSignProvider.cs to be less bloated, and more readable (hopefully)

* Refactoring tests to look at variants and include a list

* Changing instantiation to be better

* Fixed minor logic issue in HasScheduleSignProvider.cs

* Refactoring to include just 1 database call.

* Adjusting tests to use the new methods.

* Reverted breaking changes
2025-09-09 10:31:10 +02:00
Laura Neto f4c0264e61 Merge branch 'main' into v17/dev 2025-09-09 10:17:47 +02:00
955f0c8d63 New document segments endpoint (#20088)
* Added `cultures` property to the Segment models

* Added new endpoint to return the segments of a specific document.

* Mark additional properties and methods as obsolete

* Small indentation fix

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-09 09:48:17 +02:00
fa39908899 Converting DateTime.MinValue to sqlDateTime's minimum value (#20019)
* Converting DateTime.MinValue to sqlDateTime's minimum value

* Changing code to be a bit less hacky

* Changing hard coded value to a variable based on SqlDateTime

* Removing unused code

* Moving date converter logic to DateTimePropertyEditor.cs

* Replacing tests with proper version

* Removing unused import

* Removing unused imports again

* Creating new logic, to ensure formatting is more precise.

* Rewriting tests to be more precise and include testing on odd format separators

* Used parsing to determine timeonly date picker data type configuration format.
Fixed casing on key for data type configuration format.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-09 09:47:49 +02:00
Nhu DinhandGitHub 0712fda069 V16 QA Added acceptance tests for regression issue #17742 (#19996)
* Added tests for create content with content picker with predefined allowed types

* Added tests for content with multi node tree picker

* Bumped version

* Make all tests for content with multi node tree picker run in the pipeline

* Reverted

* Reverted npm command
2025-09-09 09:12:39 +02:00
Lee KelleherandGitHub e30916dd96 Dropdown: Allow empty option (#20099)
Fixes #20029.

If a dropdown property-editor is not marked as mandatory
and is in single-mode, then an empty option is added to
the top of the dropdown, so that the value can be unset.

This doesn't apply to multiple-mode, as values can be deselected.
2025-09-09 08:53:34 +02:00
3cc5715069 Fix spell error from Segmment to Segment (#20010)
* Fix spell error from Segmment to Segment

* Change for fix the misspell interface in a non breaking way

---------

Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
2025-09-09 07:18:29 +02:00
Mads Rasmussen 60a03c75e4 Merge branch 'main' into v17/dev 2025-09-05 10:03:04 +02:00
472be3d40e Content Type Designer tabs sorting improvement (#20074)
* fix style and localization

* Update src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix class name as well

* minor fixes to sorting of tabs

* clean up

* add data-marks

* Updated package version to include test fixes for tab name

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2025-09-05 09:53:27 +02:00
Niels LyngsøandGitHub f07d691ff6 JS-fix: test the existence of collection as well (#20075)
test the existence of collection as well
2025-09-05 08:43:03 +02:00
45b87c278d Content Type Designer: fix style and localization (#20073)
* fix style and localization

* Update src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix class name as well

* add data-marks

* Updated package version to include test fixes for tab name

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2025-09-05 08:26:55 +02:00
f06da1c7fa Fixes exception when converting UDIs in a PropertyValueConverter (#20011)
* Changed to use TryParse

* Changed to be a null check instead

* Update to "is false" syntax and add unit tests.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-05 06:19:06 +00:00
Niels LyngsøandGitHub da05e280af Fix space between name and description on content-types (#20028)
set line-height to avoid having too much space
2025-09-04 20:05:48 +02:00
Lee KelleherandGitHub 1b5734d1c8 Tiptap RTE: Capabilities Tidy-up (#20078)
* Updates RTE mock data

* UFM: Adds fallback for "monospace" font-family

* Removes the Font Family/Sizes Menu extension

This feature is not ready yet.

* Tighten up Tiptap config buttons style

* Fixes bug with Collections context-token

Unrelated to Tiptap, but causes data-types to throw an error.
Bug introduced in PR #20033

* Deprecations for v17
2025-09-04 15:20:06 +02:00
Andy ButlandandGitHub 91ce518063 Verify that the request cache is available before using it in PublishedContentFactory (#20062)
* Verify that the request cache is available before using it in PublishedContentFactory.

* Initialized variables as null.
2025-09-04 10:13:48 +02:00
Jacob Overgaard 44371e0e7c Merge branch 'release/16.2' 2025-09-04 09:28:35 +02:00
aab3f6d10f Perform value detection at all property value levels (#20067)
* Perform value detection at all property value levels

* Added null cases for tests.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-09-04 08:38:11 +02:00
MoleandGitHub f050488b92 V17: Update to dotnet 10 (#20007)
* Update dotnet version

* Update packages

* Fix System.Linq.Async breaking change

* Fix #19867

* Update template.json

* Set LTS version to 17

* Update dockerfile
2025-09-04 08:08:35 +02:00
de227993de Create the document URLs lock database record introduced in 16 but required in a 15 migration (#20064)
* Create the document URLs lock database record introduced in 16 but required in a 15 migration.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Revert "Apply suggestions from code review"

This reverts commit 0a4ee48787.

* Revert "Create the document URLs lock database record introduced in 16 but required in a 15 migration."

This reverts commit 42ccaf985e.

* Moved lock record creation to premigration to ensure it's available when rebuilding URLs when migrating through 15 to latest.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: kjac <kja@umbraco.dk>
2025-09-03 18:05:59 +00:00
Andy ButlandandGitHub f118293454 Support identity insert with migrating media type labels and adding new nodes (#20069)
Support identity insert with migrating media type labels and adding new nodes.
2025-09-03 14:39:08 +00:00
Niels LyngsøandGitHub d988cb9375 Workspace View Manifest Overrides (#20033)
* POC of manifest overrides

* clean up

* Collection Manager for Content Workspaces, refactor of existing solution

* lint fix
2025-09-03 14:32:41 +00:00
Jacob OvergaardandGitHub 59a34f6d49 V16: Creating a new sub template should not show Discard Changes dialog (#20068)
fix: sets the masterTemplate at each opportunity to avoid Discard Changes dialog
2025-09-03 14:09:35 +00:00
06bbec433b Add authorizer for content blueprints and handle delete of blueprints in ServerEventSender (#20063)
* Add authorizer for content blueprints and handle delete of blueprints in ServerEventSender.

* Update src/Umbraco.Cms.Api.Management/ServerEvents/Authorizers/DocumentBlueprintEventAuthorizer.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
2025-09-03 13:31:54 +00:00
f5322b5bee Fix issue with newly created template under an existing one (#19669)
* Fix issue with newly created template under an existing one.

* feat: allows to set masterTemplate as preset

* fix: create new sub-templates with a preset already set for the master template (if applicable)

* fix: always resets master template, because you could be coming from an existing editor

* fix: always set the master template even if it is null

* fix: adds updateCurrent to also update the underlying _data model

also refactor function a bit

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-09-03 15:17:20 +02:00
Jacob Overgaard 4eae48e794 bump version to 16.2.0 2025-09-03 14:23:09 +02:00
355f5c373f Database creation/migration for UFM Label editor data-types (#20055)
* Database creation/migration for Label editor data-type

The server-side migration to compliment the client-side feature #19610

* Update src/Umbraco.Infrastructure/Migrations/Upgrade/V_16_3_0/MigrateMediaTypeLabelProperties.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updated integration test with new data-type items count

* Update src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Apply suggestion from @kjac

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Apply suggestion from @kjac

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Apply suggestion from @kjac

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Apply suggestion from @kjac

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Apply suggestion from @kjac

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Updated to use `switch` pattern matching

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-09-03 09:45:56 +00:00
Lee KelleherandGitHub 96070fb6ab Tiptap RTE: Migration to auto-enable new capabilities (#20057)
* Tiptap RTE: Migration to auto-enable new capabilities

The server-side migration to compliment the client-side feature #20042

* Updated db creation script

with latest RTE capabilities

* Corrected class name typo "Capabilities" 🤦

* Updated default RTE install with TextDirection and TextIndent capabilities
2025-09-03 11:13:29 +02:00
Andreas ZerbstandGitHub 1d6490b5a8 v16 QA Updated flaky tests (#20052)
Updated flaky tests
2025-09-03 09:03:38 +02:00
kjac 5a0a2bf77e Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.PublishedCache.HybridCache/Factories/PublishedContentFactory.cs
2025-09-02 10:22:39 +02:00
843344f06a Tiptap RTE: Unbundled "Rich Text Essentials" - Toggle basics on/off per data type (#20042)
* Tiptap RTE: Starter Kit separation

- Created extensions for each Tiptap capability/extension
- Deprecated native `StarterKit` Tiptap extension
- Re-organized all Tiptap extensions into their own feature folders
- Other minor amends/tweaks to improve accessibility

* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/view-source/manifests.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/toolbar-configuration/property-editor-ui-tiptap-toolbar-configuration.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/statusbar-configuration/property-editor-ui-tiptap-statusbar-configuration.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Minor lint

* Mark the "external" Tiptap exports as deprecated

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-01 17:15:35 +02:00
Jacob OvergaardandGitHub ae44f301cf Removes 'rollup' and 'glob' from NOTICES.txt (#20043)
* removes the mention of rollup in NOTICES.txt and makes it clear that the file only contains first-party mentions

* removes the mention of 'glob'
2025-09-01 13:10:37 +02:00
Jacob Overgaard ddf0819153 chore(eslint): fixes 2025-09-01 13:06:51 +02:00
Jacob OvergaardandGitHub 126d0f55bf V16: Moves icon dependencies to 'core' package.json (#20041)
* build(deps-dev): moves icon dependencies to 'core' package + upgrades them to latest

* chore: regenerates icons

* chore(eslint): fixes eslint warnings
2025-09-01 07:32:07 +00:00
28b90bcfea structure manager refactor implementation (#19970)
* todos

* navigation context

* replace raw manifests with view context

* Array State has method

* rename to hint and much more

* Notes for later

* correcting one word

* more notes

* update JS Docs

* update tests for getHasOne

* fix context api usage

* update code for v.16

* correct test

* export UMB_WORKSPACE_VIEW_CONTEXT

* minor corrections

* rename to _hintMap

* refactor part 1

* update version number in comment

* clear method for array states

* declare hint import map

* mega refactor

* final corrections for working POC

* clean up path logic

* implement scaffold

* propagation and inheritance from view to workspace

* separate types from classes

* refactor to view context

* rename editor navigation context to editor context

* propagate removals

* clean up notes

* Hints for Content Tabs

* use const path

* handle gone parent

* added comments on something to be looked at

* hints context types

* contentTypeMergedContainers

* lint fixes

* public contentTypeMergedContainers

* refactor property structure helper class

* a few notes for Presets

* set variant ID instead of parsing it to the constructor

* do not inject root to the path

* adjust structure manager logic

* UmbPropertyTypeContainerMergedModel type update

* correct mergedContainersOfParentIdAndType

* refactor to utilize new observable for better outcome and performance

* fix lint errors

* fix missing import

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/core/hint/context/hints.controller.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-validation-to-hints.manager.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-validation-to-hints.manager.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* clean up

* remove console.log

* declare new exports of core

* Update src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-tab.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* clean up

* fix const export

* remove root from hints path

* also check for invariant

* name more as legacy

* fix eslint

* fix container id setting

* fix resetting inherited property

* fix re-rendering problem

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-08-29 18:05:26 +00:00
7f720ddf7c Implement root property validation for member workspace (#19972)
* todos

* navigation context

* replace raw manifests with view context

* Array State has method

* rename to hint and much more

* Notes for later

* correcting one word

* more notes

* update JS Docs

* update tests for getHasOne

* fix context api usage

* update code for v.16

* correct test

* export UMB_WORKSPACE_VIEW_CONTEXT

* minor corrections

* rename to _hintMap

* refactor part 1

* update version number in comment

* clear method for array states

* declare hint import map

* mega refactor

* final corrections for working POC

* clean up path logic

* implement scaffold

* propagation and inheritance from view to workspace

* separate types from classes

* refactor to view context

* rename editor navigation context to editor context

* propagate removals

* clean up notes

* Hints for Content Tabs

* use const path

* handle gone parent

* added comments on something to be looked at

* hints context types

* contentTypeMergedContainers

* lint fixes

* public contentTypeMergedContainers

* refactor property structure helper class

* a few notes for Presets

* set variant ID instead of parsing it to the constructor

* do not inject root to the path

* adjust structure manager logic

* UmbPropertyTypeContainerMergedModel type update

* correct mergedContainersOfParentIdAndType

* fix lint errors

* fix missing import

* Update src/Umbraco.Web.UI.Client/src/packages/core/hint/context/hints.controller.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-validation-to-hints.manager.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-validation-to-hints.manager.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* clean up

* remove console.log

* fix validation context initialization

* add member workspace view consts

* setup validation badges for member workspace root fields

* declare new exports of core

* Update src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/value-validator/valueValidator.controller.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add comment

* fix example

* fix comment

* fix member workspace failed request

* remove console log

* enable server side validation

* fix circlular dependency

* fix lint errors

* export conts

* fix import

* clean up

* fix type

* fix password validation case

* chore(eslint): reorders imports and cleans unused variables

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-08-29 08:12:57 +00:00
Jacob Overgaard d32348d6b2 bump to rc3 2025-08-29 07:57:39 +02:00
e5f613401f Section Sidebar Menu Expansion (#19810)
* wip section menu expansion

* make section context local to each section

* split kind manifest from element file

* make generic entity expansion manager

* wip menu context

* add collapsed and expanded events

* Export new expansion entity event modules

* rename events

* dispatch events

* Set tree expansion changes in the menu context

* expand menu from workspace

* do not allow undefined

* make menu item feature folder

* Update menu-variant-tree-structure-workspace-context-base.ts

* menu: pass expansion as prop to prevent dependency on the section sidebar

* use correct event

* Add event listener support to extension slot element

Introduces an 'events' property to UmbExtensionSlotElement, allowing dynamic assignment and removal of event listeners on extension components. Event listeners are added when extensions are permitted and removed on disconnect, improving extensibility and event handling for extension slots.

* Add entity expansion event handling to sidebar menu

Introduces handlers for entity expansion and collapse events in the section sidebar menu. This change enables the menu to respond to expansion state changes by updating the context accordingly.

* Optimize expansion state updates in menu components

Introduces a local expansion state to both section sidebar and tree menu item components to prevent unnecessary updates and rerenders. This improves performance by ensuring state updates only occur when needed.

* only check if we have a local state already

* add bulk expand method

* use bulk expand method

* align naming

* mute updates

* lower threshold

* add expansion model with target

* add function to link entries

* fix self import

* export constants

* update js docs for entity expansion manager

* link entries

* fix import

* do not export from menu here

* fix import

* fix import

* align how we register manifests

* add specific managers for section sidebar menu

* use structure items

* dot not expand current item

* Refactor section sidebar menu to use programmatic extension slot

Replaces the template-based <umb-extension-slot> with a programmatically created UmbExtensionSlotElement for improved performance and UX.

* add section context extension

* register menu as section context instead of hardcoding

* rename folder

* align naming

* export extension slot elements

* fix typings

* destroy extension slot element when host is disconnected

* use entry model

* move and rename

* register global context to hold menu state across sections

* temp observe section specific expansions

* temp observe section specific expansions

* add method to collapse multiple items

* bind expansion to section

* make entity expansion manager generic

* add helper method

* remove temp test data

* include last item in target

* remove unused

* pass full entry to event

* add type for menu item expansion

* export types

* add menuItem alias

* Update types.ts

* support menu item expansion entry

* add const for menu item alias + use for breadcrumb and menu item

* add data type menu item alias const + apply to breadcrumb

* move to correct manifest

* add menu item alias to expand entries

* Update manifests.ts

* add menu structure kind types

* add kind to manifests

* add menu item context

* filter menu items

* handle menu item expansion

* clean up

* fix order

* add example dashboard and entity action

* import types

* align model type names

* align naming

* use ui component

* add guard for menu item entry

* use correct type

* Update section-sidebar-menu.element.ts

* Update entity-expansion.manager.ts

* export constants

* add menuItemAlias to manifest

* add menuItemAlias to manifest

* add menuItemAlias to manifest

* add menuItemAlias to manifest

* add menu item alias

* add menuItemAlias to manifest

* add menuItemAlias to manifest

* add menuItemAlias to manifest

* add alias

* add kind

* fix import path

* do not expand menu from modal

* collect all menu-item files in one folder

* fix lint errors

* Update content-detail-workspace-base.ts

* clean up

* rename to example

* add button to collapse everything within a section

* fix breadcrumb for non-variant structure

* reload entity

* destroy

* remove self

* Updated acceptance tests to check if a caret button is open before clicking

* Bumped version of test helpers

* use const

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-08-28 10:55:37 +00:00
Nicklas KramerandGitHub da8c036719 V17 - Removing obsoleted code from Umbraco.Core (#20009)
* Removing obsoleted code from ApiMediaQueryService.cs

* Removing obsoleted code from ApiRichTextMarkupParserTests.cs

* Removing obsoleted code from ContentCacheRefresher.cs

* Removing obsoleted code from ContentFinderByUrlAlias.cs and adjusting its tests to use the new logic

* Removing obsoleted code from ContentFinderByUrl.cs & its dependencies

* Removing obsoleted code from ApiRichTextMarkupParserTests.cs

* Removing obsoleted code from DocumentCache.cs & its dependencies

* Removing obsoleted code from MediaCache.cs & its dependencies

* Removing obsoleted code from PublishedCacheBase.cs & its dependencies

* Removing obsoleted code from RenderNoContentController.cs and its tests

* Removing obsoleted code from UmbracoRouteValueTransformer.cs

* Removing obsoleted constructors from DefaultUrlProvider.cs

* Removing accidental bookmark

* Introducing a helper method to get the root keys in ApiMediaQueryService.cs

* Removing obsoleted code from Cache classes

* Removing unused imports

* Refactoring to meet the CR

* Added attribute to controller

* Fixing missing using statement

* Removing obsoleted constructor from ExternalLoginService.cs and making usages fit

* Removing obsoleted method from IContentTypeFilter.cs

* Removing obsoleted methods from IContentEditingService.cs

* Removing obosoleted code from DocumentUrlService.cs

* Removed obsoleted code from DataTypeService.cs

* Removed obsoleted code from PublishStatusService.cs

* Removing obsoleted code from the IContentPublishingService.cs and its dependencies. Also implementing a TODO in the service implementation

* Removing obsoleted code from IRelationService.cs

* Removing obsoleted code from ContentPublishingService.cs

* Removing obsoleted code from ContentEditingService.cs

* Removing obsoleted code from Constants-DataTypes.cs

* Removing obsoleted code from IAction.cs and its implementations

* Removing obsoleted code from IContentService.cs

* Removing obsoleted code from DomainUtilities.cs

* Removing obsoleted code from IIndexedEntitySearchService.cs and dependencies

* Removing obsoleted code from UrlProvider.cs

* Removing obsoleted code from AliasUrlProvider.cs

* Removing obsoleted code from ApiContentRouteBuilder.cs

* Removing obsoleted code from ApiPublishedContentCache.cs

* Removing obsoleted class TemplateQueryResult.cs

* Removing obsoleted code from ApiContentBuilder.cs

* Removing obsoleted code from HealthCheck.cs

* Removing obsoleted code from ContentTypeEditingService.cs

* Removing obsoleted code from NewDefaultUrlProvider.cs

* Removing obsoleted code from PublishedElementPropertyBase.cs

* Removing obsoleted code from WebhookRequestService.cs

* Bumping to obsolete in V18, due to usage in class that will be removed in V18

* Removing obsoleted code from PropertyValidationService.cs

* Removing obsoleted code from AddUnroutableContentWarningsWhenPublishingNotificationHandler.cs

* Removing obsoleted code from IMemberService.cs

* Removing obsoleted code from DocumentCache.cs
2025-08-28 12:09:59 +02:00
Jacob Overgaard d60be0f16e Merge remote-tracking branch 'origin/release/16.2' 2025-08-28 10:17:01 +02:00
Jacob OvergaardandGitHub e142a9c0d1 fix: pins the UmbracoExtension @hey-api/* versions to that of the Backoffice client (#20016)
fix: pins the @hey-api/* versions to that of the Backoffice client

This is a quick fix to handle the NPM error that is currently there because the Backoffice NPM client has moved on to another version. There will be a more comprehensive fix for 16.3, however this PR aims to make the 16.2 UmbracoExtension usable without running custom commands.
2025-08-28 09:01:44 +01:00
Jacob Overgaard 7836770c68 build: enables workflow_dispatch 2025-08-28 07:24:47 +02:00
cbb1eaec28 Prevents the removal of all user groups from a user (#19995)
* Prevents the removal of all user groups from a user.

* Add additional user group when removing

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-08-27 11:38:28 +00:00
Lee KelleherandGitHub cef7bb9357 Chore: JSDocs for RTE CSS Props (#20008)
RTE base: added JSDocs for CSSProps
2025-08-27 13:12:26 +02:00
a2b2ecb221 Fix: rename and implement fallbackRenderMethod (#20005)
* rename and implement fallbackRender

* re introducing method as part of the name

* rename impls

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Andrej Davidovič <andrejd@cdata.com>
2025-08-27 13:11:58 +02:00
279409d6ee Fix: Workspace Editor slotted fallback content should be displayed when no routes (#20006)
* fix + notes

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 13:09:21 +02:00
f0c5ecf086 Add request caching around published content factory (#19990)
* Add request caching around published content factory.

* Fixed ordering of log message parameters.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Invert if to reduce nesting

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-08-27 11:01:44 +00:00
Nicklas KramerandGitHub 20c29f8091 V17 - Removed obsoleted code from Umbraco.Cms.Core.Cache & .Routing (#19959)
* Removing obsoleted code from ApiMediaQueryService.cs

* Removing obsoleted code from ApiRichTextMarkupParserTests.cs

* Removing obsoleted code from ContentCacheRefresher.cs

* Removing obsoleted code from ContentFinderByUrlAlias.cs and adjusting its tests to use the new logic

* Removing obsoleted code from ContentFinderByUrl.cs & its dependencies

* Removing obsoleted code from ApiRichTextMarkupParserTests.cs

* Removing obsoleted code from DocumentCache.cs & its dependencies

* Removing obsoleted code from MediaCache.cs & its dependencies

* Removing obsoleted code from PublishedCacheBase.cs & its dependencies

* Removing obsoleted code from RenderNoContentController.cs and its tests

* Removing obsoleted code from UmbracoRouteValueTransformer.cs

* Removing obsoleted constructors from DefaultUrlProvider.cs

* Removing accidental bookmark

* Introducing a helper method to get the root keys in ApiMediaQueryService.cs

* Removing obsoleted code from Cache classes

* Removing unused imports

* Refactoring to meet the CR

* Added attribute to controller

* Fixing missing using statement
2025-08-27 11:02:21 +02:00
019563b226 Fix: custom block view rendering (#19962)
* Fix: custom block view rendering

* chore: formatting

* chore: formatting

* chore: marks render method as class property to bind it properly to the class so it can run private methods and does not lose its context

see also #extensionSlotRenderMethod

---------

Co-authored-by: Andrej Davidovič <andrejd@cdata.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-08-27 09:46:27 +02:00
Nicklas KramerandGitHub b8ca11edd6 V17 - Content Finder unit tests cleanup (#19989)
* Removing ContentFinderByUrlAndTemplateTests.cs and dependencies

* Removing ContentFinderByAliasTests.cs

* Removing ContentFinderByAliasWithDomainsTests.cs

* Removing ContentFinderByIdentifierTestsBase.cs

* Removing ContentFinderByIdTests.cs

* Fixing ContentFinderByKeyTests.cs & ContentFinderByPageIdQueryTests.cs to work with new code

* Removing ContentFinderByUrlTests.cs & ContentFinderByUrlWithDomainsTests.cs

* Fixing ContentFinderByPageIdQueryTests.cs to actually test the result rather than force the result

* Removing comment and adding test scenario
2025-08-27 07:39:03 +00:00
Andreas ZerbstandGitHub e82da17f2c V16 QA added acceptance test for issue 10431 (#19999)
* Added test

* Bumped version
2025-08-27 08:28:16 +02:00
Andy ButlandandGitHub da7454e987 Ensure the directory exists before creating the SQLite database (#19980)
Ensure the directory exists before creating the SQLite database.
2025-08-26 19:54:19 +02:00
b23906a6b6 V16: Unwarranted redirect after auth (#19935)
* fix: uses isAuthorized to check if user is logged in before terminating the observer

* feat: adds new function to redirect to stored path

* fix: always redirect to stored path even on failure

the user may have landed up on the page by mistake

* Revert "fix: always redirect to stored path even on failure"

This reverts commit 0c0cc0253c.

* fix: sends back the result

* fix: waits for the initial authorization request to come back before listening to the authorization signal (and then only listen once for it)

also check if the request was null, which means we can safely redirect the user

* docs: clarify what happens

* chore: converts the promise code to async/await pattern

* fix: tokenResponse should validate its internal object state

* feat: allows function to force a window redirect

* fix: checks if the user happens to already be authorized, because then we do not need a new code check

* Update src/Umbraco.Web.UI.Client/src/packages/core/utils/path/stored-path.function.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-26 15:48:46 +01:00
ae8411ed7b Tiptap RTE: Toolbar configuration sorter (#19901)
* Fix issue dragging tiptap toolbar buttons

* Moved the `.items` CSS rules to the group element

* Refactored the toolbar-group element

- Renamed "toolbar-item-click" event to "remove", to show intent
- Reordered the method names alphabetically
- Renamed `value` to `items`, to show intent
- Removed `toolbarValue`, as not required
- Added `data-mark` for menu/styleMenu buttons

* Renamed/relocated "umb-tiptap-toolbar-group-configuration" element

* Updated tag name

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-08-26 13:32:34 +00:00
Jacob OvergaardandGitHub 1bd9583cf1 V16: Bump @hey-api/openapi-ts to 0.81.1 (#19982)
* build(deps): bump @hey-api/openapi-ts to 0.81.1 and pin the version to ensure compatibility between backoffice and extensions

* chore: regenerate api types and replace where necessary

* feat: pin version of @hey-api/openapi-ts and regenerate umbraco-extension files

* chore: removes unused 'client' field

* build(deps-dev): bump @hey-api/openapi-ts to 0.81.1 for the login app
2025-08-26 12:40:06 +01:00
2a6bb64c78 V17 - Properties and validators, removing obsoleted code (#19961)
* Removing obsoleted code from ApiMediaQueryService.cs

* Removing obsoleted code from ApiRichTextMarkupParserTests.cs

* Removing obsoleted code from ContentCacheRefresher.cs

* Removing obsoleted code from ContentFinderByUrlAlias.cs and adjusting its tests to use the new logic

* Removing obsoleted code from ContentFinderByUrl.cs & its dependencies

* Removing obsoleted code from ApiRichTextMarkupParserTests.cs

* Removing obsoleted code from DocumentCache.cs & its dependencies

* Removing obsoleted code from MediaCache.cs & its dependencies

* Removing obsoleted code from PublishedCacheBase.cs & its dependencies

* Removing obsoleted code from RenderNoContentController.cs and its tests

* Removing obsoleted code from UmbracoRouteValueTransformer.cs

* Removing obsoleted constructors from DefaultUrlProvider.cs

* Removing the RadioValueEditor.cs & RadioValueValidator.cs obsoleted classes.

* Removing obsolete constructor from MultipleValueValidator.cs

* Removing obsolete constructor from EmailValidator.cs

* Removing obsoleted code from DataValueReferenceFactoryCollection.cs

* Removing obsoleted code from ApiContentBuilderBase.cs

* Fixing constructor missing attribute

* Making use of the TryGet result

* Fixing use of obsoleted constructor

* Removing silly bookmark comment

* Fixing deleted code and restructuring to use new cache

* Making use of TryGetRootKeys bool, to return null if false.

* Extending code to use new constructor

* Updated PublishedContentQuery.cs to return empty array

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-08-26 11:31:27 +00:00
Jacob OvergaardandGitHub a0cea4bcb4 build(deps-dev): bump vite from v6 to v7 (#19974)
* build(deps-dev): bump vite from 7.1.2 to 7.1.3

* build(deps-dev): bump vite from v6 to v7
2025-08-26 12:29:22 +01:00
Nicklas KramerandGitHub 156bcdc98a V17 - Removing obsoleted code from Umbraco.Web (#19983)
* Removing obsoleted code from AspNetCoreCookieManager.cs & Dependencies

* Removing obosoleted code from AspNetCoreBackOfficeInfo.cs

* Removing obosoleted code from PublishedContentExtensions.cs

* Removing obosoleted code from UmbracoMvcConfigureOptions.cs

* Removing obosoleted code from UmbracoVirtualPageRoute.cs

* Removing obsoleted constructor from BasicAuthenticationMiddleware.cs

* Removing obsoleted constructors from UmbLoginController.cs

* Removing unused constructor
2025-08-26 10:54:03 +00:00
Jacob OvergaardandGitHub 6a4c7794b8 V16: Replacing media files does not update the preview (#19912)
* fix: adds documentation to the UmbImagingRepository and makes the internal store optional, and deprecates an old method

* fix: uses new method to request thumbnails

* fix: ensures the internal data store has at least been attempted to be consumed before proceeding

* feat: adds methods to clear cached resized images

* feat: awaits the store before attempting to clear cache

* fix: attempts to clear the imaging cache when a media item entity is updated or deleted

* fix: awaits the store

* fix: set unique as property

* fix: ensures that the imaging component reloads its thumbnail if it has already been loaded once

* chore: removes duplicate check for isLoading

* chore: cleans imports

* feat: marks method as internal so that we may change it later on

* disable eslint check
2025-08-26 11:23:12 +02:00
Nhu DinhandGitHub bd967b3f75 V16 QA Fixed the E2E failing tests (#19993)
Bumped version
2025-08-26 15:27:58 +07:00
Nhu DinhandGitHub fb5b997090 V16 QA Added acceptance tests for removing user groups from a user (#19994)
* Added tests for removing user group from a user

* Added skip tag and related issue to the failing tests

* Bumped version
2025-08-26 15:26:16 +07:00
Jacob Overgaard 577a43eafe Merge remote-tracking branch 'origin/release/16.2' 2025-08-26 10:15:01 +02:00
Jacob OvergaardandGitHub d895032e22 build(deps): bump @umbraco-ui/uui to 1.15.0 (#19981) 2025-08-26 10:11:07 +02:00
Niels LyngsøandGitHub d063f344bc Block workspace view validation badges (#19987)
block workspace view validation badges
2025-08-25 13:26:53 +02:00
2537411fc6 Fix issue console error when navigating to document type template tab (#19913)
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-08-25 10:59:02 +00:00
9f887846bc Allow open split view using the keyboard (#19927)
* Allow open split view using the keyboard

* Add localize method to the label

* Add a method to localize terms with a language parameter

* adjust localization wording

* support segments in label

* localize texts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-08-25 09:16:32 +00:00
Nicklas KramerandGitHub 07abec239d V17 - Removed obsoleted code from Cms.Api (#19963)
* Removing obsoleted constructor from SubTypesSelector.cs

* V17 - Removed obsoleted code from Cms.Api.Delivery (#19964)

* Removing obsoleted constructors from AncestorsSelector.cs

* Removing obsoleted constructors from ChildrenSelector.cs

* Removing obsoleted code from DescendantsSelector.cs

* Removing obsoleted code from RequestCultureService.cs

* Removing obsoleted code from QueryOptionBase.cs

* Removing obsoleted code from BackOfficeApplicationManager.cs & Dependencies

* Removing obsoleted code from ByKeyDocumentController.cs

* Removing obsoleted code from ContentCollectionControllerBase.cs & dependencies

* Removing obsoleted code from DocumentPresentationFactory.cs

* Removing obsoleted code from HealthCheckGroupPresentationFactory.cs & dependencies & IBackOfficeApplicationManager.cs

* Removing obsoleted code from DocumentPermissionMapper.cs

* Removing obsoleted code from DocumentResponseModel.cs

* Removing obsoleted code from ExecuteTemplateQueryController.cs

* Removing obsoleted code from MediaCollectionControllerBase.cs & Dependencies

* Removing the class ReferencesDataTypeController.cs

* Removing obsoleted code from RelationTypePresentationFactory.cs

* Removing obsoleted code from SearchDocumentTypeItemController.cs

* Removing obsoleted code from  UserPresentationFactory.cs & Dependencies

* Removing obsoleted code from ValidateCreateDocumentController.cs & Dependencies

* Removing unused imports and redundant attribute

* Removing unused constructor attribute
2025-08-25 07:37:18 +00:00
Jacob Overgaard 5a22e50120 Revert "build(deps): bump @umbraco-ui/uui to 1.15.0"
This reverts commit 9cb5a12143.
2025-08-25 08:57:29 +02:00
Jacob Overgaard 9cb5a12143 build(deps): bump @umbraco-ui/uui to 1.15.0 2025-08-25 08:55:56 +02:00
Nicklas KramerandGitHub 50ae48b0a2 V17 - Removed obsoleted code from Umbraco.Infrastructure (#19977)
* Removing obsoleted code from MigrationPlanExecutor.cs & Interface

* Removing obsoleted code from EmailAddressPropertyEditor.cs

* Removing obsoleted class CacheRebuilder.cs

* Removing obsoleted code from TextBuilder.cs

* Removing obsoleted class ICacheRebuilder.cs

* Removing obsoleted code from SerilogLogger.cs

* Removing the use of Infrastructure IBackgroundTaskQueue.cs and replacing usage with the Core replacement

* Removing obsoleted code from the FileUploadPropertyEditor.cs

* Removing obsoleted code from BlockValuePropertyValueEditorBase.cs

* Removing obsoleted constructors and methods from MultiNodeTreePickerPropertyEditor.cs and TextHeaderWriter.cs

* Removing obsoleted code from CacheInstructionService.cs

* Bumping obsoleted code from MigrationBase.cs to V18

* Removing obsoleted code from EmailSender.cs

* Removing obsoleted code from BlockEditorVarianceHandler.cs

* Removing obsoleted code from IBackOfficeApplicationManager.cs

* Removing obsoleted code from RedirectTracker.cs & RichTextEditorPastedImages.cs
2025-08-22 14:38:27 +02:00
Andy Butland 0b2a247614 Merge branch 'v17/dev' of https://github.com/umbraco/Umbraco-CMS into v17/dev 2025-08-22 13:58:51 +02:00
Andy Butland f2b5061414 Merge branch 'main' into v17/dev 2025-08-22 13:58:39 +02:00
CopilotGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>AndyButlandAndy Butland
1085eebb84 Fix language server events to emit 'Updated' instead of 'Created' for updates (#19941)
* Initial plan

* Fix language server events to emit 'Updated' instead of 'Created' for updates

Co-authored-by: AndyButland <1993459+AndyButland@users.noreply.github.com>

* Removed the added test and instead added the assertion of the added behaviour to an existing test.

* Applied the same test and fix to the dictionary item service.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: AndyButland <1993459+AndyButland@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-08-22 13:55:03 +02:00
Mads RasmussenandGitHub fee6722ecc Add timestamps to cache entries and server events (#19976) 2025-08-22 13:49:46 +02:00
7f2d515763 Workspace view navigation context (#19255)
* todos

* navigation context

* replace raw manifests with view context

* Array State has method

* rename to hint and much more

* Notes for later

* correcting one word

* more notes

* update JS Docs

* update tests for getHasOne

* fix context api usage

* update code for v.16

* correct test

* export UMB_WORKSPACE_VIEW_CONTEXT

* minor corrections

* rename to _hintMap

* refactor part 1

* update version number in comment

* clear method for array states

* declare hint import map

* mega refactor

* final corrections for working POC

* clean up path logic

* implement scaffold

* propagation and inheritance from view to workspace

* separate types from classes

* refactor to view context

* rename editor navigation context to editor context

* propagate removals

* clean up notes

* Hints for Content Tabs

* use const path

* handle gone parent

* added comments on something to be looked at

* hints context types

* contentTypeMergedContainers

* lint fixes

* public contentTypeMergedContainers

* refactor property structure helper class

* a few notes for Presets

* set variant ID instead of parsing it to the constructor

* do not inject root to the path

* adjust structure manager logic

* UmbPropertyTypeContainerMergedModel type update

* correct mergedContainersOfParentIdAndType

* fix lint errors

* fix missing import

* Update src/Umbraco.Web.UI.Client/src/packages/core/hint/context/hints.controller.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-validation-to-hints.manager.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-validation-to-hints.manager.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-22 13:46:01 +02:00
d623476902 Use UTC for system dates in Umbraco (#19822)
* Persist and expose Umbraco system dates as UTC (#19705)

* Updated persistence DTOs defining default dates to use UTC.

* Remove ForceToUtc = false from all persistence DTO attributes (default when not specified is true).

* Removed use of SpecifyKind setting dates to local.

* Removed unnecessary Utc suffixes on properties.

* Persist current date time with UtcNow.

* Removed further necessary Utc suffixes and fixed failing unit tests.

* Added migration for SQL server to update database date default constraints.

* Added comment justifying not providing a migration for SQLite default date constraints.

* Ensure UTC for datetimes created from persistence DTOs.

* Ensure UTC when creating dates for published content rendering in Razor and outputting in delivery API.

* Fixed migration SQL syntax.

* Introduced AuditItemFactory for creating entries for the backoffice document history, so we can control the UTC setting on the retrieved persisted dates.

* Ensured UTC dates are retrieved for document versions.

* Ensured UTC is returned for backoffice display of last edited and published for variant content.

* Fixed SQLite syntax for default current datetime.

* Apply suggestions from code review

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>

* Further updates from code review.

---------

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>

* Migrate system dates from local server time to UTC (#19798)

* Add settings for the migration.

* Add migration and implement for SQL server.

* Implement for SQLite.

* Fixes from testing with SQL Server.

* Fixes from testing with SQLite.

* Code tidy.

* Cleaned up usings.

* Removed audit log date from conversion.

* Removed webhook log date from conversion.

* Updated update date initialization on saving dictionary items.

* Updated filter on log queries.

* Use timezone ID instead of system name to work cross-culture.

---------

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
2025-08-22 11:59:23 +02:00
Andy Butland b427a8cbdd Merge branch 'main' into v17/dev 2025-08-22 09:58:14 +02:00
Andy Butland 486f1baecb Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS 2025-08-22 09:29:43 +02:00
Andy Butland 28cb2c12e4 Fixed map definitions. 2025-08-22 09:29:30 +02:00
Niels LyngsøandGitHub 2bfeb74a46 fix validation context initialization (#19973) 2025-08-22 08:36:57 +02:00
032236318f Feature: Inflight Request Cache for Document Types and Data Types (#19956)
* extend controller base

* extend controller base

* add package for management api

* add signalr as external package

* connect to server event hub

* do no act on undefined

* add event subject

* correct alias

* export token

* add helper methods

* cache server responses

* fix import

* use helpers

* add detail request manager

* implement for document type

* implement for data type

* add method for update

* add support for create method

* align code

* Update detail-request.manager.ts

* move explicit naming

* move into folder

* collect server code in folder

* add implementation for data type request manager

* implement for document type

* only cache when we have connection to the server events

* poc inflight request cache

* clean up

* update

* add management api inflight request cache

* Update document-type-detail.server.request-manager.ts

* Update src/Umbraco.Web.UI.Client/src/packages/management-api/detail/detail-data.request-manager.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-22 08:36:13 +02:00
dependabot[bot]andJacob Overgaard 7425d10bbe Bump vite-plugin-static-copy in /src/Umbraco.Web.UI.Client
Bumps [vite-plugin-static-copy](https://github.com/sapphi-red/vite-plugin-static-copy) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/sapphi-red/vite-plugin-static-copy/releases)
- [Changelog](https://github.com/sapphi-red/vite-plugin-static-copy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sapphi-red/vite-plugin-static-copy/compare/vite-plugin-static-copy@3.1.1...vite-plugin-static-copy@3.1.2)

---
updated-dependencies:
- dependency-name: vite-plugin-static-copy
  dependency-version: 3.1.2
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-22 08:26:38 +02:00
fd5de7212e Feature: add client runtime cache for all item endpoints (#19960)
* extend controller base

* extend controller base

* add package for management api

* add signalr as external package

* connect to server event hub

* do no act on undefined

* add event subject

* correct alias

* export token

* add helper methods

* cache server responses

* fix import

* use helpers

* add detail request manager

* implement for document type

* implement for data type

* add method for update

* add support for create method

* align code

* Update detail-request.manager.ts

* move explicit naming

* move into folder

* collect server code in folder

* add implementation for data type request manager

* implement for document type

* only cache when we have connection to the server events

* update

* fix imports

* introduce item cache

* call trough get items controller

* remove log

* add unit tests for item cache

* Create cache.test.ts

* use sync method to lookup data type item

* use correct alias

* remove unused code

* data type item cache

* add client document type item cache

* add client cache for dictionary items

* add media item client cache

* add client cache for media type item

* add client cache for member and member type items

* add member group item cache

* split detail cache invalidation from request manager

* introduce item cache invalidation manager

* remove arg

* add data type item cache manager

* add memeber group item cache invalidation manager

* remove unused

* invalidate documents when document types changes

* align naming

* add method to get unique

* add dictionary item cache manager

* use server model instead of mapping

* call method

* update args

* update document type item cache invalidation

* add cache invalidation for member items

* update

* update

* update

* add item caching for languages

* add template item cache

* cache stylesheet items

* add caching for script items

* cache partial view items

* cache user items

* cache user group items

* add document blueprint item cache

* Removed readonly Signs property to re-align client models.

* Regenerate client types.

* Applied changes from code review.

* cache static file items

* add webhook item cache

* update mocks with signs data

* update mocks

* fix lint error

* fix eslint errors

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-08-22 08:26:04 +02:00
Nicklas KramerandGitHub bd8ad5f6f9 V17 - Removed obsoleted code from Umbraco.Examine (#19966)
Removing obsoleted code from BackOfficeExamineSearcher.cs and dependencies
2025-08-22 07:58:17 +02:00
Nicklas KramerandGitHub 596389d961 V17 - Removed obsoleted code from Umbraco.Extension (#19937)
* Removing obsoleted class GlobalSettingsExtensions.cs

* Removing obsoleted methods and usage from ObjectExtensions.cs

* Removing a ton of obsoleted methods from PublishedContentExtensions.cs

* Removing obsoleted constructors

* Removing obsoleted tag on private method that's still in use.
2025-08-22 07:32:18 +02:00
Mads RasmussenandGitHub 6f51a7946b Generate new Server API Models (#19958)
* update mocks with signs data

* update mocks

* fix lint error
2025-08-21 09:23:08 +00:00
Jacob Overgaard e60acfe437 bump version to 16.2.0-rc2 2025-08-21 10:35:37 +02:00
Andy ButlandandGitHub 0b1d8dd188 Fix to management API models reverting addition of read-only property (#19951)
* Removed readonly Signs property to re-align client models.

* Regenerate client types.

* Applied changes from code review.
2025-08-21 09:32:39 +02:00
806fde4c25 Navigating the App Language Selector with the keyboard (#19887)
* dropdown keyboard accessibility issue

* Eslint update

* Improve accessibility of the app language dropdown.

* Bring back combobox list element

* Add keyboard support for arrowup and arrowdown

* use change event for value change

* Change button element for a div as trigger

* Unused import

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-08-20 16:21:43 +02:00
Andy ButlandandGitHub 1a65f27ac1 Handle content blueprint server events (#19949)
Handle content blueprint server events.
2025-08-20 13:26:37 +00:00
Andy ButlandandGitHub 43f0ff0957 Adds id to the webhook item response model (#19947)
Adds id to the webhook item response model.
2025-08-20 15:15:40 +02:00
Andy Butland cd00dfaa34 Merge branch 'main' into v17/dev 2025-08-20 11:57:01 +01:00
cebfb21eec Introduced sign providers for trees and implemented one for documents with schedule pending (#19806)
* Create sign provider collection and call registered providers on rendering a page of tree item view models.
Re-work tree controller constructors to provide registered providers as a collection.

* Stub implementation of sign provider for documents with a scheduled publish pending.

* Complete implementation of tree sign for pending scheduled publish.

* Added integration test for new method on IContentService.

* Added unit test for HasScheduleSignProvider.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Tidied usings and clarified method header comments.

* Adding a fixed prefix to all future signs, and removing the provider property

* Adding a sign for protected tree documents.

* Adding IsProtectedSignProviderTest.cs & correcting HasScheduleSignProviderTests.cs to no longer assert the provider

* Fixing minor things in accordance with CR

* Adding collection items compatibility

* Introduced IHasSigns interface to provide more re-use across trees and collections.
Fixed updates to base content controllers (no need to introduce a new type variable).
Removed passing entities for populating tree signs (we aren't using it, so simplifies things).

* Refactoring a bit to make existing code less duplicated and fixing some constructor obsoletion

* Introducing a has pending changes sign.

* Applying changes based on CR

* Introducing tests for HasPendingChangesSignProvider.cs and stopped the use of contentService

* Introducing tests for HasPendingChangesSignProvider.cs and slight logic change

* Introduced HasCollectionSignProvider.cs and tests.

* Introducing collection signs to Media Tree & Media Collection items

* Introducing Plain Items and tests. Refactoring tests as well

* Introduced alternative CanProvideSigns() implementation on IsProtectedSignProvider.cs

* Slight refactoring to reduce bloating.

* Adding [ActivatorUtilitiesConstructor] since it threw an error otherwise

* Minor cleanup.

* Updated OpenApi.json.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: NillasKA <kramernicklas@gmail.com>
2025-08-20 10:32:23 +01:00
467e55c5aa Refactoring DatabaseCacheRepository to de-duplicate code and remove warnings (#19942)
* Refactoring to de-duplicate code and remove warnings.

* Update src/Umbraco.PublishedCache.HybridCache/Persistence/DatabaseCacheRepository.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-20 10:48:50 +02:00
CopilotGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>iOvergaardCopilot
5068b93f44 Add comprehensive GitHub Copilot instructions for Umbraco CMS development (#19946)
* Initial plan

* Add comprehensive GitHub Copilot instructions for Umbraco CMS development

Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>

* Remove hardcoded versions from copilot instructions

Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>

* added instructions on how to test and lint the frontend

* Update .github/copilot-instructions.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update instructions on how to disable the frontend build

* Update .github/copilot-instructions.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-20 10:44:24 +02:00
CopilotJacob Overgaardcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
c436c4288b Fix TipTap word count extension state sharing between multiple editors (#19943)
* Initial plan

* Fix TipTap word count extension state sharing by using configure()

Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>
2025-08-20 09:42:21 +02:00
CopilotGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>iOvergaard
9f5827f0ca Fix TipTap word count extension state sharing between multiple editors (#19943)
* Initial plan

* Fix TipTap word count extension state sharing by using configure()

Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: iOvergaard <752371+iOvergaard@users.noreply.github.com>
2025-08-20 09:42:01 +02:00
4852e49041 Update dotnet new umbraco-extension template with newer @hey-api/openapi-ts (#19825)
* Updated hey-api as the client-fetch is bundled as part of @hey-api/openapi-ts in newer versions

* Regenerated a new package-lock.json file

* Fix typescript issue

* Update templates/UmbracoExtension/Client/package.json

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Updated client dependencies

* Vite, TypeScript, hey-api
* Chalk & Cross-Env for the generate-client script

* Explicitly remove package-lock.json as it will be out of sync due to UMBRACO_VERSION_FROM_TEMPLATE

* Regenerated Hey API client that now ships client rather than dependancy

* Vite and Hey-API were already out of date (updated to the very latest)

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-08-20 08:04:17 +02:00
Nhu DinhandGitHub 1c157b2910 V16 QA Fixed failing E2E test (#19931)
Bumped version
2025-08-19 14:49:14 +07:00
56c49b0aeb Feature: Client Cache for Document Item Models (#19923)
* extend controller base

* extend controller base

* add package for management api

* add signalr as external package

* connect to server event hub

* do no act on undefined

* add event subject

* correct alias

* export token

* add helper methods

* cache server responses

* fix import

* use helpers

* add detail request manager

* implement for document type

* implement for data type

* add method for update

* add support for create method

* align code

* Update detail-request.manager.ts

* move explicit naming

* move into folder

* collect server code in folder

* add implementation for data type request manager

* implement for document type

* only cache when we have connection to the server events

* update

* fix imports

* introduce item cache

* call trough get items controller

* remove log

* add unit tests for item cache

* Create cache.test.ts

* use sync method to lookup data type item

* use correct alias

* remove unused code

* split detail cache invalidation from request manager

* introduce item cache invalidation manager

* remove unused

* invalidate documents when document types changes

* align naming

* add method to get unique

* use server model instead of mapping

* call method

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-08-19 08:42:48 +02:00
Andy Butland 6d5271fb80 Merge branch 'main' into v17/dev 2025-08-18 13:46:04 +01:00
Andy ButlandandGitHub a5f9bba481 Ensure appropriate create and update dates are set on updated dictionary items to allow distinguishing between created and update for server events. (#19925) 2025-08-18 11:42:36 +02:00
Mads RasmussenandGitHub a39bc0e269 Feature: Client Cache for Document Type and Data Type Detail Models (#19904)
* extend controller base

* extend controller base

* add package for management api

* add signalr as external package

* connect to server event hub

* do no act on undefined

* add event subject

* correct alias

* export token

* add helper methods

* cache server responses

* fix import

* use helpers

* add detail request manager

* implement for document type

* implement for data type

* add method for update

* add support for create method

* align code

* Update detail-request.manager.ts

* move explicit naming

* move into folder

* collect server code in folder

* add implementation for data type request manager

* implement for document type

* only cache when we have connection to the server events

* update

* fix imports

* Create cache.test.ts

* use sync method to lookup data type item

* use correct alias
2025-08-18 09:57:52 +02:00
Andy Butland f8ec2dadfe Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-08-18 07:16:06 +01:00
Jacob Overgaard 7c3f4f99de build(deps-dev): bump typescript from 5.8.3 to 5.9.2 2025-08-15 10:19:37 +02:00
Jacob Overgaard df507a5354 test: rearrange attributes 2025-08-15 10:19:37 +02:00
Jacob Overgaard 79f6a179c1 chore(eslint): ignores .storybook files 2025-08-15 10:19:37 +02:00
Jacob Overgaard 22339309a5 build(deps-dev): lock storybook to 9.0.14 and typescript to 5.8.3 to ensure compatibility with old version of MSW (v1) 2025-08-15 10:19:37 +02:00
e2d7bb660c Fix and enable some unit tests which are not running locally or on pipeline builds (#19910)
* fix some test which are not running

* resolve code review comments

* Moved cleaned up tests to unit tests (as they are unit tests, not integration tests).
Removed tests marked as no longer necessary.
Update tests name to better reflect test case.

* Made explict test faster so it could run on the pipeline.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-08-15 07:23:39 +00:00
74c9510b56 Chore: upgrade typescript to 5.9 + other minors (#19914)
* update typescript

* update other minors

* revert storybook version

* package lock update

* revert storybook update

* chore: generate new icons

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-08-15 08:34:53 +02:00
Andy Butland b77a63a929 Bumped LTS version in template to 13.10.0. 2025-08-14 09:51:01 +01:00
Andy ButlandandZeegaan 229f1e0ce0 Fixed behaviour on database cache rebuild to update only for requested content types (#19905)
Fixed behaviour on database cache rebuild to update only for requested content types.

(cherry picked from commit b8b61cd326)
2025-08-14 09:44:13 +02:00
Andy ButlandandGitHub b8b61cd326 Fixed behaviour on database cache rebuild to update only for requested content types (#19905)
Fixed behaviour on database cache rebuild to update only for requested content types.
2025-08-14 09:13:35 +02:00
Jacob Overgaard 4f84885133 set version to 16.3.0-rc 2025-08-14 07:32:45 +02:00
56569af0f9 Handle segmentation when segment alias includes underscore character(s) (#19782)
* move variant fragment split logic into splitview manager

* further centralise split logic into umbVariantId

* show segment selector if any exist

* invariant null

* chore: run eslint:fix

* chore(eslint): generate a UBM_ constant

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-08-13 16:28:43 +00:00
Jacob Overgaard fc3d8c8781 chore(eslint): adds eslint fixes 2025-08-13 18:05:26 +02:00
Jacob Overgaard 44af43e091 chore: run eslint:fix 2025-08-13 17:54:10 +02:00
Jacob Overgaard 94b3e767c7 set version back to 16.2 after merge 2025-08-13 17:23:52 +02:00
Jacob Overgaard db4a85fcb8 bump version to 16.3.0-rc 2025-08-13 16:53:51 +02:00
Mads RasmussenandGitHub 13bb25a8b8 Close dropdown when "Reload"-Entity Action has executed (#19808)
Bind 'action-executed' event handler to class instance

Updated the event listener for 'action-executed' to bind the handler to the class instance, ensuring correct 'this' context when the event is triggered.
2025-08-13 13:02:52 +00:00
Andy ButlandandGitHub 58cc7691a3 Adds configuration for document and media hybrid cache seed batch size (#19894)
Adds configuration for document and media hybrid cache seed batch size.
2025-08-13 10:12:16 +02:00
Jacob OvergaardandGitHub 937f4b8122 V16: Media Picker property editor does not handle dropped files appropriately (#19900)
* fix: make it clear that the clearUploads button is used to "Clear file(s)" and not necessarily remove them (from the dropzone)

* fix: adds extra null-check to avoid browser error on failed uploads

* fix: adds check that no media files are added twice (or more) to the media picker

* fix: adds try/catch around confirm modal to avoid browser error in case user cancels

* fix: change from deprecated 'complete' event to 'change' event and filter out non-successful files

* chore: sort imports

* feat: renders the 'add' button even if the limits have been exceeded

* feat: shows all values as cards even if the media item does not exist so the user has a chance to update the value

* feat: shows all values as cards even if the media item does not exist so the user has a chance to update the value

* feat: adds localization to the media picker context

* feat: uses the media picker context to control the picker

this also fixes an issue where already selected items were not preselected when opening the picker again

* feat: adds a bit of margin between the dropzone and media picker itself
2025-08-13 09:14:23 +02:00
cee441da49 Fix #19676 (#19886)
* observation as promise util

* all success observer

* next step todos

* await everything loaded

* contentTypeLoaded observable

* tidying up

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove comment

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-13 08:16:59 +02:00
aa269e317b Fix #19675 (#19891)
* clean up old stuff in validation form control mixin

* ensure validation trigger when value is changed

* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/content-picker/property-editor-ui-content-picker.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-13 08:16:17 +02:00
Andy ButlandandGitHub 2266529895 Added configuration option UseStrictDomainMatching, which allows control over whether content is routed without a matching domain (#19815)
* Added configuration option UseStrictDomainMatching, which allows control over whether content is routed without a matching domain.

* Fixed typo in comment.

* Addressed comments from code review.
2025-08-12 14:28:46 +01:00
Andy ButlandandGitHub 4efe8f59b8 Optimize document and media seeding by looking up from database in batches (#19890)
* Optimize document and media seeding by looking up from database in batches.

* Ensure null values aren't stored in the cache when checking existance.

* Fixed failing integration tests.

* Resolved issue with not writing to the L1 cache on an L2 hit.

* Tidied up and populated XML header comments.

* Address issue raised in code review.
2025-08-12 11:58:41 +02:00
417576b275 Content picker search with start node configured not taking user start nodes into account (#19871)
* Content picker search with start node configured not taking user start nodes into account (#19800)

* Fix users being able to see nodes they don't have access to when using the picker search

* Readability and naming improvements

* Additional fixes

* Adjust tests

* Additional fixes

* Small improvement

* Replaced the root ids with constants

* Update src/Umbraco.Web.BackOffice/Trees/MemberTreeController.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
# Conflicts:
#	src/Umbraco.Examine.Lucene/BackOfficeExamineSearcher.cs
#	src/Umbraco.Web.BackOffice/Trees/ContentTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/MediaTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/MemberTreeController.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/BackOfficeExamineSearcherTests.cs

* Add new constructor without unused and obsolete parameters

* Use non obsolete constructor in tests

* Add `dataTypeId` as parameter in document and media search endpoints to get `ignoreUserStartNodes` value

* Update backend API generated typed client

* Updated picker search to pass in data type unique

* Move data type retrieval to UmbPickerContext

* Adjust the controller constructors to make it non breaking

* Adjust controller methods to make non-breaking.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-08-11 15:15:24 +02:00
Laura Neto e57f66537c Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
2025-08-11 11:32:52 +02:00
Laura NetoandGitHub 2289493384 Moving properties between groups sometimes clears their values (#19881)
* Fix moving properties between groups sometimes clearing their values

* Small adjustment

* Fix failing integration test

The mapping method was only setting the property group when it was not null, but for orphaned properties we want to specifically set it to null.

* Adjust 'Can_Move_Properties_To_Another_Container' integration test to check more scenarios and that values are kept

* Adjust to add isElement variable in test (as previously)
2025-08-11 07:33:18 +02:00
2def046ea3 Eslint naming conventions (#19880)
* build(eslint): replace local rules with naming conventions

* revert relative js extension imports

* remove unused local rule

* build(eslint): uses recommended setup for import plugin

* chore(eslint): conver const to function to follow naming conventions

* chore: removes old file

* build(eslint): allows Ufm as prefix

* build(eslint): allows 'name' and 'extensions' as exports (umbraco-package.ts)

* build(eslint): typescript rules should ignore storybook

* chore(eslint): ignores eslint for vite definitions

* build(eslint): allows UPPER_CASE for properties

* build(eslint): ignores umbraco-package.ts files (unconventional exports)

* chore(storybook): fixes property editor stylesheet picker

* build(eslint): allows Manifest as prefix on interfaces

* build(eslint): allows underscore on protected members

* build(eslint): allows Meta as prefix on interfaces

* build(eslint): allows PascalCase for public members

* build(eslint): disables enforcement of booleans with verbs for now as it is too harsh

* chore(eslint): add private modifiers as required

* deprecates invalid constant name to replace with Umb prefix

* renames MediaValueType to comply with naming conventions

* chore(eslint): disable naming conventions for local router-slot package

* chore(eslint): follow naming conventions

* chore(eslint): disable naming conventions for property editor interfaces

* chore(eslint): follow naming conventions

* chore(storybook): fix story

* chore(eslint): follow naming conventions

* build(eslint): allows `_host` as public variable

* chore(eslint): follow naming conventions

* build(eslint): allows double leading underscore on public members

* build(eslint): matches #private and public modifiers

* build(eslint): ignores language files

* chore(eslint): ignores umbraco package file

* chore(eslint): follow naming conventions

* storybook lang

* chore(eslint): follow naming conventions

* chore(eslint): follow naming conventions

* chore(eslint): make _manager a little more open

* chore(eslint): some properties should be protected

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-image-cropper/image-cropper.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-image-cropper/image-cropper.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-image-cropper/image-cropper.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* proxy type for UrlParametersRecord

* _items deprecated property

* bring back ConditionTypes type

* bring back _items for trash bulk action

* ignorer deprecated proxies

* keep settingsDataContentTypeKey for satefy

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-08-08 08:52:14 +00:00
Lee KelleherandGitHub b3d5744d34 Tiptap RTE: Reduce loading layout shift (#19860)
* Tiptap RTE: Set row/group min-height to prevent layout shift

* Added `box-sizing: border-box`

* Adds loaded state to the editor

so that the border only appears once it's ready.

* Refactored toolbar to reduce the number of re-renders

* Refactored statusbar to reduce the number of re-renders
2025-08-08 08:41:44 +02:00
Lee KelleherandGitHub 5f1ecbae94 Tiptap RTE: Codesweep for 16.2 (#19879)
* RTE mock data updates

* TODO comment typo correction

* Corrected typo in class name

This could technically be a breaking-change, but since the class name
conflicted with the exported `UmbTiptapToolbarFontFamilyExtensionApi`,
then no one could use it anyway. ¯\_(ツ)_/¯

* Tiptap extension code tidy-up

Also, makes use of `this.name` instead of hardcoded strings.
2025-08-08 08:40:35 +02:00
Lee KelleherandGitHub ba8e1ae5dd Tiptap RTE: Fixes embedded media spacing (#19878)
* Tiptap RTE: Makes embedded-media truly inline

by using a `<span>` instead of a `<div>`.

* Cosmetically aligns the selection styles

* Adds `UmbEmbeddedMediaOptions` to strongly-type the `inline` option
2025-08-08 06:52:41 +02:00
Nhu DinhandGitHub e7da631ec2 V16 Added acceptance tests for issue #17753 (#19876)
* Added tests for updating a variant block list with invalid text

* Added tests for updating a variant block grid with invalid text

* Bumped version of test helper

* Make the tests for updating content with invalid text in a block run in the pipeline

* Cleaned up

* Updated test text

* Reverted npm command
2025-08-08 02:47:28 +00:00
d23c2acd63 Fixes the Checkbox, Dropdown and Select list when the models change the UI updates. (#19487)
* Fix CheckboxList UI not updating when values are set programmatically

* WIP

* Added unit tests for the new functionality in the checkbox list element.

As requested by Copilot, here are some unit tests to ensure this addition passes all of the possible edge cases mentioned.

* Small change based on CoPilot feedback

Removed a check that was redundant and removed a unit test that was also not needed for the current PR and fixed one of the other tests.

* Fixing code quality issues highlighted in the unit tests

* Fix CheckboxList UI not updating when values are set programmatically

* WIP

* Standardizes property editor UI state management

Introduces a utility for managing the state of property editor UI elements
when their values are set programmatically.

This ensures that UI components like dropdowns, checkbox lists, and selects
correctly reflect the selected values, especially when these values are
updated via code rather than direct user interaction.

The changes include:
- A mixin to simplify state updates
- A helper function to ensure values are handled as arrays
- Consistent state updating logic across components.

* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/select/property-editor-ui-select.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Removed the hard coded label

* Fixed the short-circuit issue raised by co-pilot

* Fixing more co-pilot suggestions

Also cleaned up the test files based on the JSDocs suggestions.

* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/dropdown/property-editor-ui-dropdown.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Refactors checkbox and dropdown tests

Refactors checkbox-list and dropdown property editor UI tests to share common test utilities, reducing code duplication and improving maintainability.
Uses Sets for faster selection lookup in `updateItemsState` function.

* Fixing CodeScene suggestion based on "String Heavy Function Arguments"

* Fix for an issue that was stopping the Bellissima build.

* Improves property editor UI state updates

Ensures UI updates in checkbox list, dropdown and select property editors only occur when necessary.
Avoids unnecessary re-renders by comparing the updated state with the current state, and only triggering an update if there are actual changes.
This improves performance and prevents potential issues caused by excessive re-rendering.

* Changes based on feedback from @nielslyngsoe

* removing unnecessary call to requestUpdate

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-08-07 08:40:59 -04:00
Andy ButlandandGitHub a0aff9d10c Remove property value permissions when related content and/or property types are removed (#19778)
* Removed two unnecessary delete clauses when removing content types (they are looking for user group Ids, but we are deleting a content type).

* Renamed table name constant with obsoletion to better reflect name and contents of table.

* Added granular permission for property value records to delete clauses when deleting a document type.

* Delete property value permissions for removed property types.

* Added integration tests to verify behaviour.
2025-08-07 14:22:19 +02:00
8a94383262 Tiptap RTE: Refactor Table menus to use menu extension-type (#19789)
* Added `action` kind for `menuItem` extension-type

* Adds `<umb-tiptap-menu>` component

* Adds support for `menu` extensions to the `<umb-cascading-menu-popover>` component

* Adds support for `menu` extensions to the `tiptapToolbarExtension` extension-type

* Adds support for `menu` extensions to the `<umb-tiptap-toolbar-menu>` component

* Adds manifests for table column/row menus

Deprecates the `umb-tiptap-table-column-menu` and `umb-tiptap-table-row-menu` components.

* Adds table column menu actions

* Adds table row menu actions

* Adds table cell menu actions

* Adds table (general) menu actions

* Replaces table toolbar menu with the new `menu` extensions

* Adds `UMB_TIPTAP_RTE_CONTEXT`

so that the menu actions can access the Editor instance.

* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/actions/table-properties.action.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* `UmbTiptapMenuElement` doesn't use the `editor` property

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-07 14:01:10 +02:00
63ed1eec41 Adds support for the "folders only" flag on retrieving siblings of a node. (#19861)
* Adds support for the "folders only" flag on retrieving siblings of a node.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updated test code.

* Removed double secondary ordering by node Id and ensured we include this clause for all sort orders.

* Ensure that ordering by node Id is always added only once and last, and only if it's not already been included in the order by clause.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-07 12:35:04 +02:00
DevAndersenandGitHub ab0af2a291 Changed methods in ServiceCollectionExtensions to return IServiceCollection instead of void (#19785) 2025-08-07 12:16:36 +02:00
eb986d9de9 Fixed layout and formatting of saved search delete dialog on the log viewer (#19855)
* Fixed layout and formatting of saved search delete dialog.

* Import sorting

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-08-07 09:50:23 +00:00
Engiber LozadaandGitHub e675894dd5 Umbraco logo label update (#19875)
* Umbraco logo label update

* Adding translation for english and spanish

* Use localize method to render text for logo
2025-08-07 08:53:41 +00:00
Nhu DinhandGitHub 3f34c8f433 V16 Added acceptance tests for regression issues (#19874)
* Updated the block editor validation message

* Updated tests for schedule publishing after unselecting all languages

* Added tests for sibdlingsOfType extension

* Updated tests due to test helper changes

* Bumped version of test helper

* Added release tag for regression issue

* Make tests for siblingsOfType run in the pipeline

* Reverted npm command
2025-08-07 08:42:55 +00:00
Andy ButlandandGitHub 44aa5dcf1c Provides an abstraction for creating the JavaScriptEncoder used in SystemTextConfigurationEditorJsonSerializer (#19849)
* Provides an abstraction for creating the JavaScriptEncoder used in SystemTextConfigurationEditorJsonSerializer.

* Generalised JSON serialization encoder factory to work for all System.Tex.Json serializers.
Added the serializer's name as a parameter to allow for different encodings per serializer if required.

* Fixed tests by removing use of obsolete constructors.

* Removed name parameter and used a generic type instead.
2025-08-07 09:08:09 +02:00
HenrikandGitHub 3a4e0b0654 Use GeneratedRegex, FrozenSet, new Lock object & static (#19872) 2025-08-07 08:41:53 +02:00
Andy ButlandandGitHub e5d1c67c36 Fix logic with check for duplicate container name at level (#19803)
Fix logic with check for duplicate container name at level.
2025-08-06 16:14:02 +02:00
Lee KelleherandGitHub 046a3d9aad Tiptap RTE: Undo deleted blocks (#19851)
* RTE: Restore deleted blocks

Maintains a state of unused (deleted) blocks,
that could be restored later, e.g. with Tiptap RTE's undo action.

Fixes #19637

* Updated with @copilot suggestions

* Fixes restored block state on variant documents
2025-08-06 15:51:21 +02:00
Jacob OvergaardandGitHub ad0854be4d build(deps): bump @umbraco-ui/uui from 1.14.2 to 1.15.0-rc.0 (#19870) 2025-08-06 14:37:15 +01:00
Mads Rasmussen 81dd568e03 fix compile error 2025-08-06 13:32:30 +02:00
Andreas ZerbstandGitHub aad253fb11 V16 QA add slack webhook for e2e tests (#19866)
* Added stage to notify slackbot

* Update nightly-E2E-test-pipelines.yml for Azure Pipelines

* Fixed indentation

* Update nightly-E2E-test-pipelines.yml for Azure Pipelines

* Updated stage name

* Added issues to condition

* Fixed SucceededWithIssues condition

* Added dependencies to condition

* Text formatting cleanup

* Clarified webhook variable name

* Updated url

* Added another url

* Added URL encoding

* Added missing $

* Added comments
2025-08-06 10:43:35 +00:00
Jacob Overgaard e3da1792cd Revert "build(deps-dev): bump storybook from 9.0.14 to 9.1.1"
This reverts commit 6c40a6f1e1.
2025-08-06 12:07:29 +02:00
36b5f63b4f Ensure block values aren't null before attempting to process them on removal (#19645)
Ensure block values aren't null before attempting to process them on removal.

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-08-06 09:10:33 +00:00
Jacob Overgaard 6c40a6f1e1 build(deps-dev): bump storybook from 9.0.14 to 9.1.1 2025-08-06 10:41:43 +02:00
Lee KelleherandGitHub c0847920f4 Tiptap RTE: Upgraded to latest v2.x (#19869)
Upgraded Tiptap to latest v2.x
2025-08-06 08:35:06 +00:00
Nhu DinhandGitHub 89a8bd3721 V16 QA Implement new release tag for E2E tests (#19697)
* Removed this as these tests are covered in other files

* Added release tags

* Make all tests with @smoke and @release tags run in the pipeline

* Updated npx command

* Updated npx command

* Updated npx command

* Fixed failed tests related to document type folder

* Cleaned up

* Used grep in yaml file instead of package.json file

* Updated yml file

* Updated testCommand

* Fixed command

* Added releaseTest command

* Added another job to run regression test in the release build

* Fixed comments

* Updated name of test job

* Make all release tests run in the pipeline

* Updated warning message

* Reverted npm command
2025-08-06 15:22:55 +07:00
Jacob OvergaardandGitHub 9414201c2e V16: Tree Stores should be optional to use (#19858)
* feat: makes tree stores optional and deprecates dependent methods

* allow `Example` as class prefix

* docs: updates example to remove the treeStore

* deprecates the usage of treeStore contexts

* chore: adds deprecation warnings to all existing tree stores
2025-08-06 08:40:42 +02:00
39b395c05d Hide property has sensitive data with normal user (#19857)
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-08-06 07:07:32 +02:00
20e47d5edd Code Editor (PE): Fixes language syntax highlighting (#19864)
Fixed issue with syntax highlighting in code editor (#19414)

(cherry picked from commit 3f3c9f8823)

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-08-06 06:41:00 +02:00
71057b5f0b Build: Separate eslint logic for **/*.ts files (#19852)
* build: move typescript specific eslint rules to the `**/*ts.` pattern to avoid errors for .js files

* allow `Example` as class prefix

* allow `example-` as custom element prefix

* Removed `eslint-disable-next-line` comments

from the Example classes.

* Code formatting/tidy-up of Example classes

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-08-05 11:42:39 +00:00
Andy ButlandandGitHub 0c22d512e2 Adds abstraction around boot time checks for database availability (#19848)
* Adds abstraction around boot time checks for database availability.

* Addressed issues raised in code review.
2025-08-05 13:33:18 +02:00
Andreas ZerbstandGitHub 240e155d91 16 QA added relation type tests (#19490)
* Updated relation type tests

* Created tests

* Bumped version

* Fixed tests

* Fixed tests

* Fixes based on comments

* Added waits to figure out why tests fail on pipeline

* Added a reload to check if test passes on pipeline

* Added reloads

* Removed reload page

* Reverted smokeTest command
2025-08-05 11:29:23 +00:00
5fc12ec36e Support persistence of unrestricted selections from the check box list (#19856)
* Use unrestricted text field when creating data types based on the CheckboxList property editor.
Initialize default checkbox list data type with the unrestricted text field for storage on new installs.
Migrate existing data type and property data.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Correctly use constant.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-05 13:19:25 +02:00
Niels LyngsøandGitHub 50eeb76c5a clean up double exports (#19859) 2025-08-05 09:45:34 +00:00
fcba10aecf Retrieves item counts before and after the target for sibling endpoints and returns in API response (#19844)
* Added user start node restrictions to sibling endpoints.

* Further integration tests.

* Tidy up.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Revert previous update.

* Retrieves item counts before and after the target for sibling endpoints and returns in API response.

* Applied previous update correctly.

* Removed blank line.

* Fix build and test asserts following merge.

* Update OpenApi.json.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-08-05 11:14:59 +02:00
20254f0bbc Added user start node restrictions to sibling endpoints (#19839)
* Added user start node restrictions to sibling endpoints.

* Further integration tests.

* Tidy up.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Revert previous update.

* Applied previous update correctly.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-05 09:53:39 +02:00
f5ff2bbf59 Fix issue create media folder throw error (#19854)
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-08-05 07:35:46 +02:00
Jacob Overgaard c31861945c update package lockfile 2025-08-04 16:04:42 +02:00
Andy ButlandandGitHub af8742651c Umbraco Engage UmbracoUrlAlias Fix - Fixes #19654 (#19827) (#19850)
* Fixes #19654

Adds the propertyAlias to the VariationContext so that products implementing the GetSegment method are aware which propertyAlias it's being called for

* Re-implement original variation context for backwards compatibility

* Fixes hidden overload method

Ensures the `GetSegment` method overload is not hidden when a null `propertyAlias` is passed.

* Resolve backward compatibility issues.

* Improved comments.

---------


# Conflicts:
#	src/Umbraco.PublishedCache.NuCache/Property.cs
2025-08-04 13:56:37 +02:00
4bf2fbf1ba Bugfix/19601 can not add ef core migrations (#19846)
* fix EFCore add migration issue

* update test

* Resolved breaking changes and code review comments.

* Removed extra line break.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-08-04 10:56:25 +00:00
7c9c7337b9 Add pagination and total to examine dashboard (#19847)
* Add pagination and total to examine dashboard

* fix name and localization

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-08-04 10:44:56 +00:00
Andy Butland 73d2f207d0 Merge branch 'main' into v17/dev 2025-08-04 12:41:50 +02:00
a630febf67 Docs: Storybook clean up round 1 (#19673)
* delete internal stories

* more clean up

* more cleanup

* move to generic components

* clean up

* move body layout

* move story

* Move icon stories

* remove prefilled color

* Update icon.element.ts

* rename story

* Replace UUIFormControlMixin with UmbFormControlMixin

Refactors all relevant input and form control components to use the new UmbFormControlMixin from '@umbraco-cms/backoffice/validation' instead of the deprecated UUIFormControlMixin. This change improves consistency and aligns with updated validation handling in the codebase.

* Revert "Merge branch 'v16/bugfix/use-umb-form-control-mixin' into v16/docs/storybook-clean-up"

This reverts commit 7fa70b87c7, reversing
changes made to 8fe7391790.

* simplify name

* Add discard changes modal stories

* add error viewer modal

* fix stories

* rename

* fix date story

* add story for input with alias

* add story for popover layout

* add story for dropdown

* add args

* register core manifests

* register entity action bundle + list

* add stack example

* clean up

* Create data-type-input.stories.ts

* change overview story to docs

* rename to docs

* rename to docs

* Update icon.stories.ts

* Update preview.js

* remove overview story

* rename default story

* load more manifests

* import all manifests

* Update preview.js

* Update preview.js

* provide all stores + global contexts

* Update data-type-input.stories.ts

* add user input and ref stories

* add storybook auth context

* set the initial storybook language

* use isoCode param

* fix input-language component

* delete broken stories

* fix icon picker story

* fix mock member ids

* Fix query parameter name in item handler

Changed the query parameter from 'paths' to 'path' in the item handler to correctly retrieve item paths from the request. This ensures the handler processes requests as expected.

* Update user item handler to use user mock DB

Replaces the document mock database with the user mock database in the user item handler to ensure correct data source is used for user-related requests.

* Add config to checkbox list story

Introduces a sample configuration to the checkbox list Storybook story, providing predefined options for demonstration and testing purposes.

* Add config to select property editor story

Introduces a sample UmbPropertyEditorConfigCollection to the select property editor Storybook story, providing predefined options for demonstration and testing purposes.

* Add config to radio button list Storybook story

Introduces a sample UmbPropertyEditorConfigCollection to the radio button list

* Refactor slider story to use config collection

Replaces inline config array with UmbPropertyEditorConfigCollection for the slider property editor story.

* Delete property-editor-ui-label.stories.ts

* Group releated UIs

* Remove multi-url picker Storybook file

* add input stylesheet story

* add back localization stories

* Delete property-editor-config.stories.ts

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-08-04 09:27:50 +02:00
dependabot[bot]andJacob Overgaard 170becdd5b Bump linkifyjs from 4.3.1 to 4.3.2 in /src/Umbraco.Web.UI.Login
Bumps [linkifyjs](https://github.com/nfrasser/linkifyjs/tree/HEAD/packages/linkifyjs) from 4.3.1 to 4.3.2.
- [Release notes](https://github.com/nfrasser/linkifyjs/releases)
- [Changelog](https://github.com/nfrasser/linkifyjs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nfrasser/linkifyjs/commits/v4.3.2/packages/linkifyjs)

---
updated-dependencies:
- dependency-name: linkifyjs
  dependency-version: 4.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-04 09:25:58 +02:00
hifi-philandGitHub 39a5362de8 Add testing to workspace counter examples (#19838)
* update workspace example

* Update readme for workspace counter example

* update workspace counter examples readme

* Update examples workspace counter to include some testing

* Update glob pattern for text examples for windows
2025-08-02 12:36:23 +02:00
de64c53777 Omit datetime from JSON conversion that converts from strings (#19807)
* Remove date object conversion as valueEditors don't seem to need it

* Update fault summary reference

* Added justification comment.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-08-01 13:27:05 +02:00
d9e7e9e8a8 Make logging more friendly for docker (#19818)
* Cleanup obsoleted methods

* Add a way to disable UmbracoFile default sink

* Abstract LogViewService so only UmbracoFile sink related things are in the default interface implementation.

* Abstract LogViewRepository so only UmbracoFile sink related things are in the default interface implementation.

* Move GetGlobalLogLevelEventMinLevel to base

* Removed unused internal class and obsoleted its base

* Added missing XML header comments and resolved warnings in service and repository classes.

* Made private method static.

* Addressed issues raised in code review.

* Expose repository from the service base class.

* Restored further obsoleted code we can't remove yet.

* Removed log viewer tests on removed class. We have integration tests for the new service.

* Obsoleted ILogViewer interface.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-08-01 11:29:58 +02:00
Lee KelleherandGitHub a1d1c5492a Tiptap RTE: Custom CSS Variables for min/max height/width (#19841)
* Adds CSS variables to `umb-input-tiptap`

to set the min/max height/width of the RTE.

* Moves "dimensions" config to the base RTE element

so can be reused with other RTE-based property-editors.

* Sets the CSS variables in the Tiptap property-editor element

* Code tidyup for RTE base element imports

* Corrects localization text of RTE dimensions description

As it's a fixed height/width as opposed to a maximum height/width.

* The CSS variable fallback value 'unset' should not be quoted.

CSS keywords like 'unset' should be unquoted, while string values should be quoted.
2025-08-01 07:16:02 +02:00
Lee KelleherandGitHub 7199ed0310 Media Table Collection View: Adds support for Label Templates (#19842)
Media Table Collection View: add label template support

Fixes #19835.
2025-08-01 06:49:33 +02:00
615fcddcf7 V16 QA Updated acceptance tests with skip() and fixme() tag (#19397)
* Updated nightly E2E pipeline

* Fixed failing E2E tests

* Skipped content tests wirh list view content due to an issue

* Updated tests due to UI changes

* Updated fixme and skip tests - part 1

* Removed this file because the tests are already covered elsewhere

* Updated fixme() tests

* Updated skip() tests

* Bumped version

* Bumped version

* Bumped version

* Removed notification verification

* Removed the step to verify the notification for save action

* Fixed the failing tests

* Updated name of permission

* Bumped version

* Fixed failing tests

* Bumped testHelpers

* Removed tests related to tiptap toolbar as they are covered in another class

* Cleaned up

* Added more waits

* Cleaned up

* Added step to ensure redirect URL is created when renaming content.

* Restructured the tests

* Removed unnecessary steps

* Fixed isItemVisibleInRecycleBin

* Fixed isItemVisibleInRecycleBin

* Bumped version

* Added more wait for the deletion to complete

* Added waits for the deletion to complete

* Added more waits

* Removed unnecessary waits

* Added more waits to improve test stability

* Added skip for the flaky test

* Added test for removing a stylesheet in a block grid editor

* Updated test due to api helper changes

* Bumped version

* Fixed failing smoke test

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2025-08-01 03:30:03 +00:00
8d6096636d Add drag and drop to blockgrid area (#19383)
* Add drag and drop to blockgrid area

* Adds `UmbChangeEvent` trigger

* Removes `updated` method

Puts `sorter.setModel` in the `value` setter,
so that the sorter is set on initial value.

* Imports sort order

Removed `UmbTextStyles`, as not used here

* Changed the cursor type to "move"

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-07-31 16:17:13 +00:00
4483f47668 V16: Fix issue not display hidden tab name (#19370)
Fix issue not display hidden tab name

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-07-31 14:29:41 +00:00
Andrej DavidovicandGitHub ce7ce10d64 Update RichTextPropertyEditor.cs (#19826)
Fix for https://github.com/umbraco/Umbraco-CMS/issues/19824 issue
2025-07-31 14:11:06 +00:00
965408df57 Tiptap RTE: Block selection (#19811)
* Removed `cursor: not-allowed` style

* Sets the `umb-rte-block` `user-select` to `all`

* Adds an "invisible" selection background to `umb-ref-rte-block`

* Sets the `umb-ufm-render` text-content to be visible

* Adds `aria-hidden` attribute

* Bumped version of test helper

* Fixed the failing tests due to UI changes

* Adds `pointer-events: none` to selection-background

---------

Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
2025-07-31 09:39:30 +00:00
Andy Butland 4a37f06677 Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS 2025-07-31 06:59:22 +02:00
Andy Butland 300f507efc Update LTS version on template. 2025-07-31 06:59:11 +02:00
Nhu DinhandGitHub 345afd243e V16 QA Added acceptance tests for the block with RTE in a Content (#19795)
* Updated tests for content with RTE in a block grid

* Updated tests forcontent with RTE in a block list

* Make all RTE tests run in the pipeline

* Cleaned up

* Reverted npm command
2025-07-31 04:58:51 +00:00
c3e93f143c Fix nullability of return types that can be non-null (#15927)
* Fix nullability of Children extension

* Fix nullability of methods throughout the CMS

* Fix return types of some methods that cannot return null

* Revert nullable changes to result of ConvertSourceToIntermediate for property editors (whilst some property editors we know won't return null, it seems more consistent to adhere to the base class and interface nullability definition).

* Updated new webhook events to align with new nullability definitions.

* Reverted content editing service updates to align with base classes.

* Applied collection nullability updates on content repository to interface.

* Reverted value converter updates to match interface.

* Applied further collection updates to interface.

* Aligned media service interface with implementation for nullability.

* Update from code review.

---------

Co-authored-by: Ivo van der Bruggen <ivo@dutchbreeze.com>
Co-authored-by: Ivo van der Bruggen <ivo@vdbruggensoftware.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-07-30 14:19:20 +02:00
Andy Butland c6bc4ef49a Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package.json
2025-07-30 11:30:10 +02:00
hifi-philandGitHub 133796f2dd V16/docs work extensions example (#19809)
* update workspace example

* Update readme for workspace counter example

* update workspace counter examples readme
2025-07-30 07:44:23 +02:00
34989307db Change hardcoded text to be translatedeable (#19745)
* Change hardcoded text to be translatedeable

* Added the `count` value to the localization

---------

Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-07-29 17:01:22 +00:00
Lee KelleherandGitHub fb9a9b38a8 Tiptap RTE: Include Tiptap's default styles (#19805)
* Disables Tiptap's `injectCSS` option

This option would inject the default CSS styles into
the `window.document`, which are never applied to
the component's shadow DOM.

* Add Tiptap's default styles to "rte-content.css"

The `caret-color` rule (line 93) resolves issue #19791.
2025-07-29 07:58:41 +02:00
Andy Butland 66b2e3b421 Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS 2025-07-29 07:23:25 +02:00
Andy Butland bc3e3d789d Merge branch 'release/16.1.1'
# Conflicts:
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-07-29 07:23:14 +02:00
75c7d00b53 Fix issue unsaved changes always displayed when trying to move away from blueprint (#19804)
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-07-29 07:21:17 +02:00
7e82c258ee Merge commit from fork
Co-authored-by: kjac <kja@umbraco.dk>
2025-07-29 05:10:52 +02:00
a2cc6a0a87 Fix issue with use of EF Core scopes within notification handlers (take 2 - handling scopes with a base parent) (#19797)
* Add integration tests that shows the problem

* Fix the problem and add explenation

* Improved comments slightly to help when we come back here!
Moved tests alongside existing ones related to scopes.
Removed long running attribute from tests (they are quite fast).

* Fixed casing in comment.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-07-25 13:07:20 +02:00
Laura NetoandGitHub c1ac80653b Use audit service instead of repository directly in services (#19357)
* Introduce new AuditEntryService

- Moved logic related to the IAuditEntryRepository from the AuditService to the new service
- Introduced new Async methods
  - Using ids (for easier transition from the previous Write method)
  - Using keys
- Moved and updated integration tests related to the audit entries to a new test class `AuditEntryServiceTests`
- Added unit tests class `AuditEntryServiceTests` and added a few unit tests
- Added migration to add columns for `performingUserKey` and `affectedUserKey` and convert existing user ids
- Adjusted usages of the old AuditService.Write method to use the new one (mostly notification handlers)

* Audit service rework

- Added new async and paged methods
- Marked (now) redundant methods as obsolete
- Updated all of the usages to use the non-obsolete methods
- Added unit tests class `AuditServiceTests` and some unit tests
- Updated existing integration test

* Use the audit service instead of the repository directly in services

* Apply suggestions from code review

* Small improvement

* Update src/Umbraco.Core/Services/AuditService.cs

* Some minor adjustments following the merge

* Delete unnecessary file

* Small cleanup on the tests

* Remove changing user id to 0 (on audit) if user id is admin in media bulk save

* Remove reference to unused IUserIdKeyResolver in TemplateService

* Remove references to unused IShortStringHelper and GlobalSettings in FileService
2025-07-24 14:52:17 +02:00
a50ad893a8 Use new submit and poll solution for examine index rebuild (#19707)
* Started implementing new LongRunningOperationService and adjusting tasks to use this service

This service will manage operations that require status to be synced between servers (load balanced setup).

* Missing migration to add new lock. Other simplifications.

* Add job to cleanup the LongRunningOperations entries

* Add new DatabaseCacheRebuilder.RebuildAsync method

This is both async and returns an attempt, which will fail if a rebuild operation is already running.

* Missing LongRunningOperation database table creation on clean install

* Store expire date in the long running operation. Better handling of non-background operations.

Storing an expiration date allows setting different expiration times depending on the type of operation, and whether it is running in the background or not.

* Added integration tests for LongRunningOperationRepository

* Added unit tests for LongRunningOperationService

* Add type as a parameter to more repository calls. Distinguish between expiration and deletion in `LongRunningOperationRepository.CleanOperations`.

* Fix failing unit test

* Fixed `PerformPublishBranchAsync` result not being deserialized correctly

* Remove unnecessary DatabaseCacheRebuildResult value

* Add status to `LongRunningOperationService.GetResult` attempt to inform on why a result could not be retrieved

* General improvements

* Missing rename

* Improve the handling of long running operations that are not in background and stale operations

* Fix failing unit tests

* Fixed small mismatch between interface and implementation

* Use the new submit and poll functionality for the Examine index rebuild

* Use a fire and forget task instead of the background queue

* Apply suggestions from code review

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Make sure exceptions are caught when running in the background

* Alignment with other repositories (async + pagination)

* Fix build after merge

* Missing obsoletion messages

* Additional fixes

* Add Async suffix to service methods

* Missing adjustment

* Moved hardcoded settings to IOptions

* Fix issue in SQL Server where 0 is not accepted as requested number of rows

* Fix issue in SQL Server where query provided to count cannot contain orderby

* Additional SQL Server fixes

* Update method names

* Adjustments from code review

* Ignoring result of index rebuild in `IndexingNotificationHandler.Language.cs` (same behavior as before)

* Missed some obsoletion messages

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-07-24 14:30:14 +02:00
Andy Butland 0b42085353 Bumped version to 16.1.1. 2025-07-24 09:25:52 +02:00
Andy Butland 5c57d03d6d Merge branch 'release/16.1'
# Conflicts:
#	version.json
2025-07-24 09:22:37 +02:00
Lee KelleherandGitHub 12141d2d61 Tiptap RTE: Clear Formatting, resets nodes to "paragraph" (#19781)
Fixes #19752
2025-07-24 07:07:29 +02:00
Andy Butland a5612107a6 Bumped version to 16.1.0. 2025-07-24 06:48:27 +02:00
Laura NetoandGitHub c20b30d625 Fix null reference exception when removing all blocks from shared RTE in culture variant content (#19771)
Fix null reference exception when removing all blocks from culture variant content
2025-07-23 20:10:02 +02:00
Andy Butland a6c311977c Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
2025-07-23 17:03:30 +02:00
be8e0f319d Fix navigationUrlService and underlying models not being thread safe (#19689)
* Fix navigationUrlService and underlying models not being thread safe

* Added migration to plan.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-07-23 11:52:08 +00:00
0507d1a0c8 Fix missing tag suggestions when no culture available. (#19694)
Allow undefined culture when obtaining tag matches

Co-authored-by: Ben White <b.white@rocburn.com>
2025-07-23 12:25:00 +02:00
73c995c8ec #19775 fixed get user data by applying OrderBy after counting (#19776)
* #19775 fixed get user data by applying OrderBy after counting

* Apply suggestions from code review

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-07-23 11:33:49 +02:00
Andy ButlandandGitHub 5e68bf7c21 Log the migration plan name when can't migrate from state (#19772)
Log the migration plan name when can't migrate from state.
2025-07-22 17:00:44 +00:00
6a5b1a76cc V16 QA Added acceptance tests for the 'create document' user permission (#19770)
* Remove skip

* Added tests for creating and updating content

* Removed skip because the issue is fixed

* Updated assertion steps for the update document user permission

* Bumped version

* Added release tag

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-07-22 15:57:32 +02:00
Laura Neto 04ac8d3ea9 Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
2025-07-22 15:39:26 +02:00
b722c0d72d Abstract submit and poll operations (#19688)
* Started implementing new LongRunningOperationService and adjusting tasks to use this service

This service will manage operations that require status to be synced between servers (load balanced setup).

* Missing migration to add new lock. Other simplifications.

* Add job to cleanup the LongRunningOperations entries

* Add new DatabaseCacheRebuilder.RebuildAsync method

This is both async and returns an attempt, which will fail if a rebuild operation is already running.

* Missing LongRunningOperation database table creation on clean install

* Store expire date in the long running operation. Better handling of non-background operations.

Storing an expiration date allows setting different expiration times depending on the type of operation, and whether it is running in the background or not.

* Added integration tests for LongRunningOperationRepository

* Added unit tests for LongRunningOperationService

* Add type as a parameter to more repository calls. Distinguish between expiration and deletion in `LongRunningOperationRepository.CleanOperations`.

* Fix failing unit test

* Fixed `PerformPublishBranchAsync` result not being deserialized correctly

* Remove unnecessary DatabaseCacheRebuildResult value

* Add status to `LongRunningOperationService.GetResult` attempt to inform on why a result could not be retrieved

* General improvements

* Missing rename

* Improve the handling of long running operations that are not in background and stale operations

* Fix failing unit tests

* Fixed small mismatch between interface and implementation

* Use a fire and forget task instead of the background queue

* Apply suggestions from code review

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Make sure exceptions are caught when running in the background

* Alignment with other repositories (async + pagination)

* Additional fixes

* Add Async suffix to service methods

* Missing adjustment

* Moved hardcoded settings to IOptions

* Fix issue in SQL Server where 0 is not accepted as requested number of rows

* Fix issue in SQL Server where query provided to count cannot contain orderby

* Additional SQL Server fixes

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-07-22 15:26:04 +02:00
ca1476f7c7 Fires the updated event when content types are updated (#19768)
* Fires the updated event when content types are updated.

* Housekeeping: separating/sorting import types

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-07-22 12:22:11 +00:00
d7a32a31a1 Reloads the template tree when creating a document type with a template (#19769)
* Reloads the template tree when creating a document type with a template.

* Housekeeping: separating/sorting import types

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-07-22 10:46:04 +00:00
Laura NetoandGitHub 3fcc09169a Update the existing date/time property editor to provide a kind of unspecified (#19727)
* Update the existing date/time property editor to provide a Kind of Unspecified

* Added unit tests
2025-07-22 11:55:52 +02:00
Lee KelleherandGitHub df9b387175 Repository Details Manager: Prevent making requests for empty arrays (#19731)
* fix: Prevent Repository Details Manager making requests for empty arrays

Fixes #19604

* Reworked to pass the `uniques` through to the `#requestNewDetails()` method

The unique values are included as a closure,
persisting after the `#init` promise is resolved.
Rather than call `getUniques()` to get an async'd value.

* Updated with Copilot suggestions

https://github.com/umbraco/Umbraco-CMS/pull/19731#discussion_r2221512463
2025-07-22 08:16:38 +00:00
Andy Butlandandkjac 8cc6508b22 Retrieve only user external logins when invalidate following removal of backoffice external user login (#19766)
* Retrieve only user external logins when invalidate following removal of backoffice external user login.

* Improved variable name.
2025-07-22 10:06:41 +02:00
a0406b1406 Add defensive coding to the member application initializer (16) (#19764)
* Add defensive coding to the member application initializer (#19760)

* Moved _isInitialized to after the initialization

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-07-21 11:19:42 +00:00
93d61d0316 Return 404 on delivery API requests for segments that are invalid or not created (#19718)
* Return 404 on delivery API requests for segments that are invalid or not created.

* Handled case with no segmented properties.

* Let the property decide if it has a value or not

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-07-21 13:05:40 +02:00
Kenn JacobsenandGitHub 55cc415c30 Make the OpenAPI security scheme name for the Management API valid (#19762) 2025-07-21 12:51:44 +02:00
Lee KelleherandGitHub 1ec9641c9d Updated OpenApi and TypeScript API (Siblings endpoints) (#19759)
Latest OpenApi TypeScript API code generation
2025-07-21 08:40:29 +00:00
5c05fd2877 Template with Block List field with Inline Editing Mode causes Collection List View to shrink (#19754)
Fix issue template is shrunk when enable inline editing mode in collection list view in block list field

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-07-21 10:17:02 +02:00
6fe39b071f Add a backing field for EditorUIAlias and track changes when its set. (#19733)
* Add a backing field for EditorUIAlias and track changes when its set.

* Add previously failing unit test to verify fix.

* Aligned backing field casing with property name.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-07-21 07:52:58 +00:00
Andy Butland 7458143bb8 Restored indentation following merge of Danish translations in #19740. 2025-07-21 09:27:54 +02:00
2a83e405a7 add missing translation for DA (#19740)
Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
2025-07-21 09:26:30 +02:00
HenrikandGitHub 7f88013689 Make internal & private classes sealed where possible, to avoid code for virtual dispatch (#19719) 2025-07-21 08:32:54 +02:00
Laura NetoandGitHub 0bcc26a811 Allow saving blueprints with validation errors (#19748)
Ignore validation result when saving blueprint
2025-07-21 07:55:12 +02:00
Nhu DinhandGitHub 6d240b6a07 V16 QA Added acceptance tests for creating a document using blueprint (#19708)
* Added tests for creating content using document blueprint

* Updated tests due to api helper for document blueprint changes

* Bumped version

* Make all Blueprint tests runs in the pipeline

* Reverted npm command
2025-07-21 10:33:30 +07:00
Nhu DinhandGitHub d31b88b94a V16 Added acceptance tests for the regression issue #19529 (#19713)
* Added tests for regression issue that cannot create a variant document blueprint

* Make tests run in the pipeline

* Reverted npm command
2025-07-21 03:23:44 +00:00
Nhu DinhandGitHub 0442ddc739 V16 Added acceptance tests for the regression issue #16985 (#19712)
* Updated tests for adding a thumbnail to a block grid

* Added tests for adding a block thumbnail

* Make tests run in the pipeline

* Reverted npm command
2025-07-21 03:21:21 +00:00
3b04d54ea3 Add flag to exclude trashed media (#19746)
Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
2025-07-18 14:59:06 +02:00
Kenn JacobsenandGitHub 71df46cc06 Include /.well-known/jwks in the paths covered by OpenIddict (#19749) 2025-07-18 13:48:22 +02:00
5660c6c369 Forward merge #19720 to V16 (#19735)
* Add support for programmatic creation of property types providing the data type key (#19720)

* Add support for programmatic creation of property types providing the data type key.

* Add integration tests

---------

Co-authored-by: kjac <kja@umbraco.dk>

* Don't use Lazy

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-07-18 10:47:34 +02:00
698d566b76 Populate name for content and media on URL picker if title is left empty (#19677)
* Populate name for content and media on URL picker if title is left empty.

* Display URL for manually entered URLs.

* Updates from code review.

* Reverted `elementName` constant

* Sorted imports

* Small code tidy-ups

* Added logic to render the `url` as the `name` fallback

In this case, the `detail` is left empty, giving prominence to the `url` value.

* Refactored the get name/url methods

for code consistency.

* Updated `#requestRemoveItem()` to use the item's resolved name

with a fallback to "item".

Also localized the "Remove" button label

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-07-15 13:31:33 +01:00
5d968afb7e Fix failing integration tests in SQL Server (#19725)
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-07-15 09:01:04 +02:00
Laura Neto 2ce647738f Merge branch 'main' into v17/dev
# Conflicts:
#	version.json
2025-07-14 15:41:34 +02:00
Jacob OvergaardandGitHub 63ff9e9e32 V16: Build Backoffice externals with Vite (#19716)
* chore: revamps openid package to organise files in a 'src' folder

* feat: adds all externals as npm workspaces with a vite build

* feat: copies the correct uui assets

* feat: copies the backoffice static assets

* feat: creates the correct module for openid

* feat: copies the correct monaco-editor assets

* feat: moves monaco-editor into its package

* feat: moves dependencies to relevant external modules

* feat: gets rid of rollup

* build: uses tiny-glob instead of glob (one less dependency)

* feat: copies all css assets to dist-cms/css first, minifies them, then copies everything over to StaticAssets

* build: removes old static assets from vite static build
2025-07-14 11:47:00 +01:00
Jacob OvergaardandGitHub d95b6b7530 V16: Property editor file upload does not validate file types (#19714)
* fix: forwards the file extensions to the inner dropzone

* fix: ensures non-mimetype extensions start with a dot (.)

* chore: adds more details on how to set file extensions

* feat: adds a bit of styling to code snippets in UFM

* fix: return if no file in stream

* fix: prevents potential race condition if src changes

* chore: minor code improvement
2025-07-14 09:04:58 +01:00
Andy Butland 4deb756e64 Adds variation by the header name Accept-Language to the delivery API output cache policy (#19709)
* Adds variation by the header name Accept-Language to the develivery API output cache policy

* Removed obsolete constructor (not necessary as the class is internal).

* Introduce contants for header names.
2025-07-11 16:08:18 +02:00
543b644ed1 Fix issue forceHideContentEditorInOverlay not available in RTE (#19698)
* Fix issue forceHideContentEditorInOverlay not available in RTE

* remove href link when enable hide content editor setting:

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-07-11 07:54:03 +02:00
e6c169e566 Adds background worker to check timeout state (#19702)
* feat: converts tokenResponse into an object state

* feat: adds worker that checks token lifetime

* feat: initialises token worker to check up on tokens

* revert

* chore: defines typings for shared workers

* chore: uses correct assets url for core package

* feat: sets correct values for token check expiration

* feat: adds labels to confirm modal

* feat: separates logic for session monitoring to own controller

* feat: adds a timeout modal to correctly inform the user

* feat: opens the timeout modal (and closes it again) if a timeout occurs

* feat: log out when user clicks log out button

* feat: adds localization

* feat: sets sensible defaults for the web worker to check

* feat: adds more languages

* chore: adds more comments

* chore: removes nodejs types

* Update src/Umbraco.Web.UI.Client/src/packages/core/auth/workers/token-check.worker.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: removes nodejs types

* chore: resolves cyclic imports

* chore: removes circular dependencies from the 'modal' package

* chore: redefine SharedWorkerGlobalScope because of Github Actions CI

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-10 13:56:03 +00:00
Lee KelleherandGitHub 3c6f222c8b Fixes Block Catalogue Modal Filter (#19700)
* Mock data updates

The `icon` is not part the block-type data.

* Adds `description` to the mock doctype model

* Refactors block catalogue modal

to make the filter/search work with a block-type's name & description.

This removes the need to use the `<umb-block-type-card>` component,
all element-type data is requested upfront.

* Reverted dev/debug change

* Abstracted out the element-type items observation to its own method

* Updated CSS rule

thanks to a Copilot suggestion.
2025-07-10 09:33:56 +00:00
Andy Butland 50282ea2e9 Bumped version to 16.2.0-rc. 2025-07-10 11:08:54 +02:00
Andy Butland a91aefc185 Added comments for no-op partial view cache invalidator. 2025-07-10 07:33:07 +02:00
Lee KelleherandGitHub 1fe29d921b UFM: JavaScript-like Expressions (#19685)
* Adds `markedExtension` extension-type

* Relocates the Component and Filter extension-type interface code files

to under "extensions"

* Moves `UfmPlugin` type to its own referencable file

* Adds UFM support for JS expressions

making use of "@heximal/expressions" library.

* Modified regex pattern to match nested braces

* try/catch for invalid JS expressions

* Capitalizing the JS in `UmbUfmJsMarkedExtensionApi` class name

for consistency and improved readability.

* Abstracted out `ufmjs()` to its own Marked extension file

making it simpler to add unit-tests.

* Fixed up types in UFM context

added JSDocs for public methods

* Adds a generic Least Recently Used (LRU) cache implementation
2025-07-09 11:34:12 +02:00
Nhu DinhandGitHub 91e19c4faf V16 QA Reverted npx command (#19699)
* Reverted npx command

* Fixed npx command
2025-07-09 09:07:05 +00:00
Nhu DinhandGitHub 60580ff8bd V16 QA Added acceptance tests for granular document permission (#19546)
* Added tests for granular document permission

* Updated tests for Webhook

* Bumped version

* Make all tests for granular permission run in the pipeline

* Added issue link for the failing tests

* Remove .skip

* Removed unnecessary tests

* Updated assertion step for create and delete document for a specific document

* Updated tests for read permission

* Fixed comments
2025-07-09 13:30:47 +07:00
Nhu DinhandGitHub 17bc6dde28 V16 QA Removed unused API acceptance tests (#19679)
Removed unused API acceptance tests
2025-07-09 03:41:01 +00:00
Andy Butland 4e6f3f6d1d Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS 2025-07-08 15:53:52 +02:00
Andy Butland 9bd3076abf Register no-op implementation of IMemberPartialViewCacheInvalidator in headless setups (#19666)
* Register no-op implementation of IMemberPartialViewCacheInvalidator in headless setups.

* Tidied usings.
# Conflicts:
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs
2025-07-08 15:53:37 +02:00
Andy Butland 4a438ad6e9 Disabled package validation. 2025-07-08 14:37:45 +02:00
05010fc707 UFM: Code tidy-up (#19687)
* Reverted `elementName` constant

* UFM base element: simplify context check

* Adds console warning if UFM filter does not exist

* Removed unnecessary casting/typing

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Moved console warnings outside of loop

* Added "ufm-" prefix to eslint local rules

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-08 14:21:47 +02:00
Andy ButlandandGitHub 118b26a8b9 Clear member cache by older user name when member user name is updated (16) (#19690)
* Pass notification state to cache refreshers.
Pass previous user name into member saved notification state and use when refreshing cache to clear the member by keys based on this.

* Fixed issue raised in code review.

* Fixed casing for state key.

* Added removed parameter to unit tests.

* Fix breaking change.
2025-07-08 11:28:11 +02:00
Lee KelleherandGitHub e00dcef4d6 UFM: Make Block Settings data available (#19686)
* Adds support to UFM for Block settings data

Fixes #17619

* Code/markup tidy-up

makes use of Lit's `when` directive
to simplify the conditional.
2025-07-08 10:12:58 +02:00
Lee KelleherandGitHub 1f84fe4701 UFM: Adds markedExtension extension-type (#19684)
* Adds `markedExtension` extension-type

* Relocates the Component and Filter extension-type interface code files

to under "extensions"

* Moves `UfmPlugin` type to its own referencable file
2025-07-08 10:10:22 +02:00
Andy Butland 0b1bd16b9d Merge branch 'main' into v17/dev 2025-07-08 09:26:54 +02:00
9baf04026e V16: Siblings endpoints (#19657)
* PoC implementation

* Move to controller base

* Implement solution that seems worse, but works better

* Don't require parent key in repository method

* Fix typos

* Add siblings for data type, media type and media

* Add endpoint for template

* Add DocumentType and DocumentBlueprint controllers

* Fix naming

* Fix case if siblings are under root

* Take item ordering into account

not all entities are ordered by sort order

* Add default implementation

* Fix parentkey

* Add tests

* Format optimizations for split view

* Add test covered requirement to description

* Cover positive case and make test case output more readable

* reduce allocations

* Clarify test

---------

Co-authored-by: Migaroez <geusens@gmail.com>
2025-07-07 12:53:42 +00:00
Andy ButlandandGitHub b5195ed8eb Fixes issues with creation of documents from blueprints that have populated file upload properties (#19655)
* Fixes issue where content created from blueprint would not persist file upload property values.

* Ensure a copy of a file upload is created when scaffolding content from a blueprint, like we do when copying content.

* Clarified comment.

* Removed unneeded usings.

* Fixed spelling.

* Handle create of blueprint from content to create a new uploaded file.
Handle delete of blueprint to delete uploaded files.
2025-07-07 14:15:17 +02:00
Andy ButlandandGitHub 4c87cc5fd9 Adds support for custom granular permissions when aggregating across user groups (#19660)
* Added abstraction for aggregation of granular permissions to support custom permissions.

* Refactor to move responsibility for aggregating granular permissions to the respective mappers.

* Added XML header comments for permission mappers.

* Tidied up/removed warnings in UserPresentationFactory interface and implementation.

* Optimized retrieval of documents in DocumentPermissionMapper.

* Fixed method header comment.

* Use entity service rather than content service to retrieve key and path.
2025-07-07 12:59:55 +02:00
Andy ButlandandGitHub 8b4849be05 Fix issue with preview in delivery API for MNTP property editor (#19668)
* Passes the preview flag to the cache retrieval when resolving the delivery API object for the MNTP property editor.

* Added unit test verifying fix and adjusted mocks for tests to acoomodate.

* Provided preview flag for Razor rendering.
2025-07-07 11:33:59 +02:00
PeterandGitHub 7b929a7c53 Title returns "Server Error" in non-debug mode (#19665)
* Add isDebug check for Title

* Error title has been added
2025-07-07 10:04:10 +02:00
Mads RasmussenandGitHub af52e68b6e Clean up workspace conditions folder structure (#19634)
* Refactor section conditions into subfolders

Split section condition logic into 'section-alias' and 'section-user-permission' subfolders, each with their own constants, manifests, and types. Updated imports and manifest aggregation to use the new structure for improved modularity and maintainability.

* use const

* fix build

* Refactor section alias condition to use constant

Replaces hardcoded 'Umb.Condition.SectionAlias' strings with the UMB_SECTION_ALIAS_CONDITION_ALIAS constant across all manifests and related files. This improves maintainability and consistency by centralizing the section alias condition reference.

* clean up workspace conditions
2025-07-07 07:34:01 +01:00
Mads RasmussenandGitHub 05aef6a91f Hide Document/Media Collection Workspace View until the item is created (#19644)
* only show collection items workspace view when document is created

* do not pass null for collection

* only show media collection view when media is created
2025-07-07 07:31:27 +01:00
Mads RasmussenandGitHub 8489d1a63e Docs: Tree example (#19624)
* add basic collection example

* add card view example

* update example readme

* Add workspace view example with collection

* wip tree example

* clean up

* Update README.md

* Update README.md
2025-07-07 07:13:16 +01:00
PeterandGitHub e0a00bfd04 Amend accessibility modifiers on file upload property editor components to support extension (#19643)
* Logic of getting media path moved to separate method.

* TemporaryFileUploadValidator marked as public

* Typo fix.
2025-07-04 14:22:50 +02:00
Jacob Overgaard 914bc409f6 Merge branch 'release/16.1' 2025-07-03 14:16:29 +02:00
Jacob OvergaardandGitHub aa90253d71 build(deps): bump @umbraco-ui from 1.14.1 to 1.14.2 (#19656) 2025-07-03 11:27:37 +02:00
Jacob OvergaardandGitHub c9bef96c32 V16.1: Never reject a token response (#19651)
* fix: never reject a token response

If a token response is rejected, then the pipeline will also fail because it does not understand that error. Let the API interceptors do their job instead and simply return the old, now-invalid token which will prompt the API interceptors to store the request states and retry them afterwards.

* chore: removes unused timeoutsignal

* chore: captures the stale token before potentially clearing it
2025-07-02 16:10:30 +01:00
Jacob Overgaard 9cb8dc73e5 Merge branch 'release/16.1' 2025-07-02 10:21:20 +02:00
Jacob OvergaardandGitHub d10ba420f4 V16.1: 400 errors are being wrongfully ignored (#19648)
fix: allows 400 errors to have a default notification unless silenced manually by `disableNotifications`
2025-07-02 08:16:03 +00:00
Jacob OvergaardandGitHub be3a1759de GitHub: Only deploy to Azure on direct pull requests (#19647)
* build(github): check that the "close" job only runs when the appropriate label is applied

it follows that the "build" job would only have built an environment when the label was applied

* build(github): check that the action is run directly on the repository and not from a fork

this alleviates the problem that the deploymentToken for Azure only exists within the repository
2025-07-02 09:47:53 +02:00
Laura NetoandGitHub dcd8b42522 Move cache instructions pruning to background job (#19598)
* Remove pruning logic from `CacheInstructionService.ProcessInstructions()`

* Add and register `CacheInstructionsPruningJob` background job

* Add unit tests

* Remove breaking change in ICacheInstructionService

* Adjust some obsoletion messages to mention v17

* Added missing scope

* Update tests

* Fix obsoletion messages version

* Update ProcessInstructions methods summary
2025-07-01 11:17:59 +02:00
3b4639de08 Collection rendering performance improvements Part 1: Improve Entity actions render performance (#19605)
* Add null checks for editPath and name in render method

The render method now checks for the presence of both editPath and _name before rendering the button, preventing potential errors when these values are missing.

* Refactor dropdown open state handling

Replaces the public 'open' property with a private field and getter/setter to better control dropdown state. Moves popover open/close logic into the setter, removes the 'updated' lifecycle method, and conditionally renders dropdown content based on the open state.

* add opened and closed events

* dispatch opened and closed events

* Render dropdown content only when open

Introduces an _isOpen state to control rendering of the dropdown content in UmbEntityActionsBundleElement. Dropdown content is now only rendered when the dropdown is open, improving performance and preventing unnecessary DOM updates.

* Update dropdown.element.ts

* create a cache elements

* Optimize entity actions observation with IntersectionObserver

Adds an IntersectionObserver to only observe entity actions when the element is in the viewport, improving performance. Refactors element creation to use constructors, updates event handling, and ensures cleanup in disconnectedCallback.

* only observe once

* Update entity-actions-bundle.element.ts

* Update dropdown.element.ts

* Update entity-actions-bundle.element.ts

* split dropdown component

* pass compact prop

* fix label

* Update entity-actions-dropdown.element.ts

* Update entity-actions-dropdown.element.ts

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-07-01 08:37:57 +00:00
Jacob OvergaardandGitHub d5159ae4f7 V16: Upgrade Storybook from V8 to V9 (#19640)
* build(deps-dev): bump storybook from v8 to v9

* chore: run storybook v9 migrations

* chore: updates import paths for storybook-webcomponents-vite (migration)

* chore: migrates eslint for storybook config

* fix: updates old link to composed storybook so we reference the latest production uui

* chore: formats eslint config file

* chore: changes import path to build mdx stories

* chore: updates language list to reflect v16
2025-07-01 09:50:27 +02:00
Niels LyngsøandGitHub 629635e0dd observable for detecting if split view is active (#19394)
* observable for detecting if split view is active

* declare splitView manager on content detail workspace

* remove declaration as it was a double
2025-07-01 09:30:55 +02:00
Laura NetoandGitHub 447cb881bd Audit service rework (#19346)
* Introduce new AuditEntryService

- Moved logic related to the IAuditEntryRepository from the AuditService to the new service
- Introduced new Async methods
  - Using ids (for easier transition from the previous Write method)
  - Using keys
- Moved and updated integration tests related to the audit entries to a new test class `AuditEntryServiceTests`
- Added unit tests class `AuditEntryServiceTests` and added a few unit tests
- Added migration to add columns for `performingUserKey` and `affectedUserKey` and convert existing user ids
- Adjusted usages of the old AuditService.Write method to use the new one (mostly notification handlers)

* Audit service rework

- Added new async and paged methods
- Marked (now) redundant methods as obsolete
- Updated all of the usages to use the non-obsolete methods
- Added unit tests class `AuditServiceTests` and some unit tests
- Updated existing integration test

* Apply suggestions from code review

* Small improvement

* Update src/Umbraco.Core/Services/AuditService.cs

* Some minor adjustments following the merge

* Delete unnecessary file

* Small cleanup on the tests
2025-07-01 09:12:37 +02:00
Andy Butland 876d229b7e Merge branch 'v15/dev'
# Conflicts:
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Configuration/ContentSettingsExtensionsTests.cs
2025-07-01 08:28:48 +02:00
ad5a18f1ee Fix pagination in Content Delivery API Index Helper (#19606)
* Refactor descendant enumeration in DeliveryApiContentIndexHelper

Improved loop condition to allow for processing of more than 10.000 descendants for indexing.

* Add failing test for original issue.

* Renamed variable for clarity.

---------

Co-authored-by: Brynjar Þorsteinsson <brynjar@vettvangur.is>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-07-01 08:23:58 +02:00
Andy ButlandandGitHub cdc62d3020 Aligned jsdoc and inferred function type on UmbCurrentUserContext (#19642)
Aligned jsdoc and inferred function type on UmbCurrentUserContext.
2025-06-30 18:52:25 +02:00
Andy ButlandandGitHub 3e99c2f69d Removes full-width from toggle property editor (#19641)
* Removes full-width from toggle property editor.

* Fixed linting error.
2025-06-30 14:35:34 +00:00
Jacob Overgaard b3d86d5395 build(deps): bump @umbraco-ui/uui from 1.14.0 to 1.14.1 2025-06-30 15:30:32 +02:00
Mads RasmussenandGitHub 50327be6e7 React on late read only guard rules (#19621)
* Observe read-only guard rules in variant selector

Added observation of read-only guard rules in the workspace split view variant selector to ensure read-only cultures are updated when rules change.

* Improve save action to react to read-only rule changes

* remove unused
2025-06-30 15:22:44 +02:00
e135599c96 Fix readonly UI for create document user permission (#19554)
* Update document-workspace.context.ts

* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add check for undefined

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-30 15:19:46 +02:00
LiliandNiels Lyngsø d6a66bc4d8 V15 Bugfix: Horizontal scrollbar in Media section #19479 (#19541)
fix to stop the scroll bar appearing in the media section.
2025-06-30 14:55:52 +02:00
LiliandGitHub 32a4fbebd5 V15 Bugfix: Horizontal scrollbar in Media section #19479 (#19541)
fix to stop the scroll bar appearing in the media section.
2025-06-30 14:52:35 +02:00
Mads RasmussenandGitHub 283e6b2ff0 Entity type + Entity Unique conditions (#19614)
* Add entity-type and entity-unique condition support

Introduces new condition types for entity-type and entity-unique, including their constants, types, condition implementations, and manifests. Updates exports in core entity modules to include these new features, enabling more granular extension conditions based on entity type and uniqueness.

* register conditions

* add support for oneOf

* fix self imports

* Update manifests.ts

* remove unused
2025-06-30 14:51:21 +02:00
Andy ButlandandGitHub cfbbfa004c Further fix to configuration classes using ISet, resolving regression with custom 404 pages (#19573)
Further fix to configuration classes using ISet, resolving regression with custom 404 pages.
2025-06-30 14:37:04 +02:00
b81d45901b ability to hide block actions (#19626)
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-06-30 12:35:18 +00:00
df39026d0d set height to match workspace top bar (#19384)
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-06-30 12:32:45 +00:00
HenrikandGitHub 880d84b030 Reduce lookups needed in ConcurrentDictionaries in ContentNavigationServiceBase (#19603)
Reduce lookups needed in ConcurrentDictionaries and sort using List.Sort, make key removal O(1) by using hashsets and avoid duplicates, remove unneeded .ToList() and other minor tweaks
2025-06-30 14:24:04 +02:00
Lee KelleherandGitHub f9c2b9594f Label property-editor, adds UFM template support (#19610)
* Adds `labelTemplate` config to Label editor

* Code tidyup for Label editor element

* Adds "format-bytes" UFM filter

* Renamed "format-bytes" to "bytes"

* Label element tidy-up + copilot amends

* Added `formatBytes` options

* Simplified condition, thanks CodeScene

* Reverted element export
2025-06-30 12:18:02 +00:00
HenrikandGitHub 1f28f1043a Avoid async await Task.FromResult, plus some other minor tweaks (#19597) 2025-06-30 14:15:22 +02:00
Andy Butland e78eee50ed Minor refactor following merge of PR #19617. 2025-06-30 14:08:50 +02:00
Davor ZlotrgandGitHub ba2072c979 fix: json serialization and deserialization for NuCacheSerializerType (#19617)
fix: json serialization and deserialization
2025-06-30 14:07:00 +02:00
Mads RasmussenandGitHub 49b95c1225 Introduce Section Alias condition const (#19633)
* Refactor section conditions into subfolders

Split section condition logic into 'section-alias' and 'section-user-permission' subfolders, each with their own constants, manifests, and types. Updated imports and manifest aggregation to use the new structure for improved modularity and maintainability.

* use const

* fix build

* Refactor section alias condition to use constant

Replaces hardcoded 'Umb.Condition.SectionAlias' strings with the UMB_SECTION_ALIAS_CONDITION_ALIAS constant across all manifests and related files. This improves maintainability and consistency by centralizing the section alias condition reference.
2025-06-30 13:24:00 +02:00
14063a0b89 Add support for file upload property editor within the block list and grid (#18976)
* Fix for https://github.com/umbraco/Umbraco-CMS/issues/18872

* Parsing added for current value

* Build fix.

* Cyclomatic complexity fix

* Resolved breaking change.

* Pass content key.

* Simplified collections.

* Added unit tests to verify behaviour.

* Allow file upload on block list.

* Added unit test verifying added property.

* Added unit test verifying removed property.

* Restored null return for null value fixing failing integration tests.

* Logic has been updated according edge cases

* Logic to copy files from block list items has been added.

* Logic to delete files from block list items on content deletion has been added

* Test fix.

* Refactoring.

* WIP: Resolved breaking changes, minor refactoring.

* Consistently return null over empty, resolving failure in integration test.

* Removed unnecessary code nesting.

* Handle distinct paths.

* Handles clean up of files added via file upload in rich text blocks on delete of the content.

* Update src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyEditor.cs

Co-authored-by: Sven Geusens <geusens@gmail.com>

* Fixed build of integration tests project.

* Handled delete of file uploads when deleting a block from an RTE using a file upload property.

* Refactored ensure of property type property populated on rich text values to a common helper extension method.

* Fixed integration tests build.

* Handle create of new file from file upload block in an RTE when the document is copied.

* Fixed failing integration tests.

* Refactored notification handlers relating to file uploads into separate classes.

* Handle nested rich text editor block with file upload when copying content.

* Handle nested rich text editor block with file upload when deleting content.

* Minor refactor.

* Integration test compatibility supressions.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Sven Geusens <geusens@gmail.com>
2025-06-30 13:21:10 +02:00
2cb114ffaf Fix check for pending package migration to use the package not the plan name (#19509)
* Fix check for pending package migration to use the package not plan name.

* Cover all package name/identifier permutations and fix the API output for multiple plans

* Adjusted log message to not refer to unattended migrations as migrations may be being run attended.

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-06-30 10:20:11 +00:00
Jacob OvergaardandGitHub fb2aad0b1d V16: Adds a state for "forbidden" for entities that return 403 (Access denied) (#19557)
* feat: adds new localization keys for forbidden routes

* feat: ignore all 400, 401, 403, and 404 errors as they are handled by the UI

* feat: adds new elements to show forbidden routes and entities

* feat: adds generic forbidden state to base entities

* feat: injects a forbidden route component to documents

* feat: adds 'forbidden' state to media workspace

* chore: aligns document and media workspaces

* test(mock): adds user configuration endpoint

* test(mock): adds calculate-start-nodes endpoint to users

* test(mock): adds missing endpoint for 'client-credentials'

* feat: clean up old observers on entity errors

* feat: aligns UI for better DX if there is no user

* fix: returns early if there is no user, instead of trying to append properties to the object

* feat: adds 'forbidden' state to members

* feat: adds support for forbidden document blueprints

* feat: allows parent to be undefined as well as null

* feat: forbidden route for members as a state

* chore: simplify language workspace

* test: adds forbidden mock data

* test: adds missing endpoints and a check for forbidden ids
2025-06-30 10:00:11 +01:00
Jacob OvergaardGitHubCopilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
861afde3a0 Fix for code scanning alert no. 1719: Client-side cross-site scripting (#19607)
* Fix for code scanning alert no. 1719: Client-side cross-site scripting

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* feat: uses built-in sanitizeHtml in backoffice

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-06-30 09:04:50 +01:00
Andy ButlandandGitHub 29b6c2d49e Assert dates in content editing integration tests to millisecond only (#19513)
* Assert dates in content editing integration tests to millisecond only.

* Add date time extension unit tests and refactor to switch statement.

* Removed whitespace.
2025-06-30 07:59:22 +02:00
Andy ButlandandGitHub c223d93a53 Adds XML header docs indicating usage of options on NuCacheSerializerType (#19555)
Adds XML header docs indicating usage of options on NuCacheSerializerType.
2025-06-30 07:53:09 +02:00
Niels LyngsøandGitHub c432f5a66c load more button component and styling (#19622)
* localization

* tree-load-more-button component

* implement

* ability to hide block actions

* Revert "ability to hide block actions"

This reverts commit bf8222f49b.
2025-06-29 18:39:07 +02:00
9cb0557120 Tiptap RTE: A11Y label improvements (#19531)
* a11y: Adds labels to Tiptap RTE toolbar buttons/menus

* a11y: Adds labels to Tiptap toolbar designer actions

* a11y: Adds labels to Tiptap statusbar designer actions

* a11y: Adds label to Overlay Size dropdown

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-06-27 12:10:12 +00:00
f7aab5e901 Table checkbox/icon alignment (#19615)
* Table checkboxes slotted whitespace

Fixes #19563

* Table markup tidy-up

Resolved the `style` attribute error

* localize texts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-06-27 11:58:00 +00:00
Mads RasmussenandGitHub 75ee1e65d1 Show success/failed state for workspace buttons with additional options (#19535)
* also show success/failed state when button have additional options

* rename method

* clear timeout
2025-06-27 13:38:21 +02:00
b7be95b239 Add folder workspace icon (#19366)
* add slot for icon

* expose icon data

* render icon

* load type for scaffold

* rename

* render icon for media

* add observable for content type icon

* request data in data source

* wire up document scaffolding

* remove unused

* export server data source

* render icon for member

* rename data source to align with other detail sources

* rename data source

* remove unused styling

* remove console log

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove console log

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove console log

* render workspace icon for document type folders

* make folder workspace editor

* use element

* remove const

* use folder-workspace-editor for templating folders

* introduce name write guard manager

* prevent name change of file system folders

* Update script-folder-workspace-editor.element.ts

* make guard optional

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-27 13:38:01 +02:00
Laura NetoandGitHub 376a2c8ff6 V16.1: Fix broken content creation when using blueprints (#19518)
Fixes broken content creation based on blueprints

Fixes preset not overriding values in the various createScaffold methods.
2025-06-27 13:36:14 +02:00
Lee KelleherandGitHub 3e891972d0 Tiptap RTE: Adds token for statusbar context (#19530)
Tiptap: adds token for Statusbar context
2025-06-27 13:35:36 +02:00
Lee KelleherandGitHub cdf7b3dbef Tiptap RTE: Toolbar menu active highlighting (#19532)
* Adds optional parameter to Tiptap toolbar item's `isActive`

* Adds `isActive` support to toolbar menus and cascading menus

* Adds `isActive` support to the font menus

* Adds `isActive` support to the table menu

+ UI/CSS tweak

* Adds `isActive` support to the style menu API

+ refactored the commands

* Improves cascading menu popover closing

it previously didn't close the menu when an action was clicked.
2025-06-27 13:33:17 +02:00
Mads RasmussenandGitHub ede906e152 DocumentUrlDataResolver: Use UMB_VARIANT_CONTEXT instead of UMB_PROPERTY_DATASET_CONTEXT (#19537)
* change to variant context

* remove unused
2025-06-27 13:32:22 +02:00
5cafa599fa Remove trash success notifications (#19534)
* remove trash notifications

* Updated tests so we no longer use the notification for moving to recycle bin

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2025-06-27 13:31:08 +02:00
e3c52afbbb v16 QA Remove smoke tag from flaky test (#19611)
* Remove from smoke tag

* Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithImageCropper.spec.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-26 13:10:58 +02:00
Kenn JacobsenandGitHub c61fc7419c Cherry picked #19540 to V16 (and fixed changed signatures) (#19592) 2025-06-26 09:16:49 +02:00
67106f0813 Add missing media exports (#19585)
* Add missing media exports

Fixes #19560 and #19561

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/index.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-24 12:17:40 +00:00
55506bac3a Simplify creating content from a blueprint programmatically (#19528)
* Rename `IContentService.CreateContentFromBlueprint` to `CreateBlueprintFromContent`

In reality, this method is used by the core to create a blueprint from content, and not the other way around, which doesn't need new ids. This was causing confusion, so the old name has been marked as deprecated in favor of the new name. If developers want to create content from blueprints they should use `IContentBlueprintEditingService.GetScaffoldedAsync()` instead, which is what is used by the management api.

* Added integration tests to verify that new block ids are generated when creating content from a blueprint

* Return copy of the blueprint in `ContentBlueprintEditingService.GetScaffoldedAsync` instead of the blueprint itself

* Update CreateContentFromBlueprint xml docs to mention both replacement methods

* Fix tests for rich text blocks

* Small re-organization

* Adjusted tests that were still referencing `ContentService.CreateContentFromBlueprint`

* Add default implementation to new CreateBlueprintFromContent method

* Update tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentBlueprintEditingServiceTests.GetScaffold.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-06-24 13:43:34 +02:00
Jacob OvergaardandGitHub b41eecf58c V16: Document shows blank page when clicking an active link (#19553)
* fix: if no workspace views are found at all, show a not found page

* fix: rather than redirecting to the first available tab, which may not always be available on secondary routing, let the router display the first tab on an empty url

this mirrors how workspace views are displayed in umb-workspace-editor
2025-06-24 09:45:31 +01:00
Lee KelleherandGitHub 0a7a92287b Variant workspace breadcrumb item parentheses (#19599)
* Refactored breadcrumb variant name

The parentheses will be added to unnamed variant ancestor items.

* Adds `last-item` attribute

(for semantics)

* Imports tidy-up

* Refactored `#getHref` to early exit for `.isFolder`

Saves on the string allocation.
2025-06-24 10:10:02 +02:00
6237ddca89 Improves the layout on the create blueprint dialog (#19556)
* Improves the layout on the create blueprint dialog.

* localize texts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-06-24 08:08:09 +00:00
Mads RasmussenandGitHub ef453ad62e Docs: Collection example (#19593)
* add basic collection example

* add card view example

* update example readme

* Add workspace view example with collection
2025-06-24 08:31:26 +01:00
Nhu DinhandGitHub e6791246e4 V16 QA Added acceptance tests for Webhook (#19545)
* Added tests for webhook

* Added tests for webhook trigger

* Bumped version

* Make all Webhook tests run in the pipeline

* Fixed comment

* Reverted npm command
2025-06-17 08:55:30 +00:00
Andy ButlandandGitHub 50272f7401 Removed duplicate/obsolete code fixing issue with document move permission checks (#19552)
Removed duplicate/obsolete code fixing issue with document move permission checks.
2025-06-13 14:41:08 +02:00
Nhu DinhandGitHub 9964e0b8ec V16 QA Added acceptance tests for granular property value permission (#19458)
* Updated due to test helper changes

* Updated user group tests due to api helper changes

* Updated tests for user group default configuration due to UI changes

* Added tests for document property value permission

* Added tests for document property value permission in content with block

* Bumped version

* Make specific tests run in the pipeline

* Added skip tag and issue link for the failing tests

* Added tests for granular property value permission

* Fixed comment

* Bumped version

* Bumped version

* Fixed comments

* Bumped version and reverted npm command

* Make all tests for user group permission run in the pipeline

* Updated smokeTest command

* Fixed comments

* Reverted npm command
2025-06-13 11:13:28 +07:00
Andy ButlandandGitHub 9d11c76ea1 Added start-up logging of document URL caching (#19538)
Added startup logging of document URL caching.
2025-06-12 22:20:44 +02:00
Andy Butland da9c6e24ce Removed unnecessary compatibility suppressions file from integration tests. 2025-06-12 13:50:29 +02:00
Jacob OvergaardandGitHub cd72dbe4ea V16: Retry requests after timeout (#19495)
* feat: fix a small-ish nitpick where extensions would reload after login

this could potentially try to re-register all private extensions after each auth signal, which is being prevented anyway because of duplicate aliases, but still nice to remove and not have to listen to

* feat: align login UI extension load with backoffice, i.e. wait for external load before registering core extensions

* build(deps): bump @hey-api to newest and re-generate client

* chore: adds extra error logging

* feat: adds retry logic to the api interceptor

* feat: warn about incomplete actions

* fix: the body was already plain text, but we need to ensure the headers say so as well

* feat: warns the user when actions could not be completed

* build(deps): update @hey-api/client-fetch

* chore: generate new api

* feat: simplify error handling to just UmbApiError and UmbCancelError

* feat: moves error notifications from interceptors into tryExecute, so you more easily can opt out of it and everything is gathered in one place

* feat: recreate responses with correct 'status' and 'statusText'

* build: stop dotnet processes after debug session

* feat: extrapolate common logic into helper method to create responses

* feat: returns a UmbProblemDetails like object on interceptors to be handled by tryExecute

* chore: deprecates duplicate, outdated UmbProblemDetails interface and type guard

* feat: uses the 'title' of the problem details object to convey the main message

* chore: 401 and 403 uses their own interceptors

* feat: show no notification if 401

* feat: uses the real request method and url (instead of the template placeholders) to tell the user what did not succeed

* feat: retry requests with no timeout/race

* feat: throttle and delay signals and disallow them from being updated from the outside

* chore: adds more logging to timeouts

* chore: optimise imports

* test: ignores any test files left in node_modules folder

* feat: uses auditTime to wait a bit before showing the timeout screen

* feat: adds 404 handling to error interceptor

* chore: cleans up after response modification

* feat: preserve only a few headers

this mimicks the v15 behavior

* feat: lets the UI handle 404 errors instead of notifying directly

* test: uses create action menu option instead to find the correct locator, and skips a seemingly unnecessary timeout
2025-06-12 12:24:11 +01:00
e89e18f5ba V16: Item and Detail Base Repository should use correct typings for return types (#19447)
* fix: add a catcher to most `asPromise` for stores to prevent cascading errors

* fix: remove conditional instances - they should be able to be undefined

* fix: check for missing store and extract UmbProblemDetails

* fix: only append data if no error

* fix: adds error handling to missing stores and to extract the ProblemDetails object

* revert commit

* fix: ignore errors completely instead of unsetting stores

* revert commit

* chore: cleanup imports

* fix: do not unset store

* stop observation in a proper way

* stop observation of for document-user-permissions

* check for manager twice

* save action

* save action optional

* fix: ensure the right types are used for base stores

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-06-12 11:59:11 +01:00
Andy Butland cfcb708d26 Merge branch 'release/16.0' and enable package validation 2025-06-12 08:18:13 +02:00
Laura NetoandGitHub 9a96ebf812 Replace keys in Rich Text Editor blocks on clone operations (#19526)
* Regenerate keys in RTE blocks on clone operations

This was already present for BlockList and BlockGrid, but not Blocks in RTE.

* Small adjustment from code review
2025-06-12 07:03:49 +02:00
Jacob OvergaardandGitHub 9812630bb4 Prepare 16.0 release (#19523)
* Bump version to 16.0.0, update starter kit reference and enable package validation.

* Update version number in package.json.

* Re-disabled package validation (can't enable this yet).
2025-06-11 14:01:52 +02:00
Jacob OvergaardandGitHub 47bc2c2647 build(deps): bump @umbraco-ui/uui to 1.14.0 (#19524) 2025-06-11 13:57:41 +02:00
Andy Butland 1cf95be97d Re-disabled package validation (can't enable this yet). 2025-06-11 12:07:10 +02:00
Andy Butland 8396249a38 Update version number in package.json. 2025-06-11 11:56:33 +02:00
Andy Butland e231feb522 Bump version to 16.0.0, update starter kit reference and enable package validation. 2025-06-11 11:53:05 +02:00
Lee KelleherandGitHub 919b65ea19 Tiptap RTE: Style Menu action toggles (#19520)
* Tiptap style menu toggles (for classes and IDs)

Fixes #19244

* Tiptap style menu toggles (for font/color)

Fixes #19508

* Tiptap "Clear Formatting" remove classes and styles

* Tiptap font sizes, removes trailing semicolon

as the API handles the delimiter

* Tiptap global attrs: adds set/unset styles commands
2025-06-11 09:21:21 +02:00
Andy Butland 0c33a23c50 Bump version to 16.0.0-rc6. 2025-06-10 11:47:16 +02:00
Andy Butland cc2f1df78e Merge branch 'release/15.4.3' into v15/dev
# Conflicts:
#	version.json
2025-06-10 11:43:50 +02:00
Andy ButlandandCopilot 9b2fd1253b Optimize initialization of document URLs on start-up (#19498)
* Optimize initialization of document URLs on startup.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-10 10:31:26 +02:00
Andy ButlandandGitHub fe7f0558c1 Update template to reference latest LTS version (#19517)
Update template to reference latest LTS version.
2025-06-10 10:31:10 +02:00
Andy Butlandandmole ab600cb798 Optimize initialization of document URLs on start-up (#19498)
* Optimize initialization of document URLs on startup.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 8d2ff6f92a)
2025-06-10 10:29:17 +02:00
Andy Butland 024697f3bf Bumped version to 15.4.3 2025-06-10 10:28:55 +02:00
8d2ff6f92a Optimize initialization of document URLs on start-up (#19498)
* Optimize initialization of document URLs on startup.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-10 10:28:45 +02:00
Lee KelleherandGitHub 69224cb53c Tiptap RTE: Toolbar/statusbar config initial value state (#19514)
Tiptap configuration waits until initialized to set value

Fixes #19009
2025-06-10 08:54:33 +01:00
Andy ButlandandGitHub 3468177c0c Fix issues with removal of user logins on change to external login provider configuration (16) (#19512)
* Ensure to delete related tokens when removing logins for removed external login providers.
Ensure to avoid removing logins for members.

* Removed unnecessary <= check.
2025-06-10 08:22:02 +02:00
Andy Butland ceb745a7bd Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Core/Services/AuditService.cs
#	src/Umbraco.Core/Services/IAuditService.cs
2025-06-09 06:49:12 +02:00
Andy Butland 89b2120c46 Obsoleted an unused constant ListViewMembers. 2025-06-06 13:49:52 +02:00
Laura NetoandGitHub 7fc2bc84de Audit entries rework (#19345)
* Introduce new AuditEntryService

- Moved logic related to the IAuditEntryRepository from the AuditService to the new service
- Introduced new Async methods
  - Using ids (for easier transition from the previous Write method)
  - Using keys
- Moved and updated integration tests related to the audit entries to a new test class `AuditEntryServiceTests`
- Added unit tests class `AuditEntryServiceTests` and added a few unit tests
- Added migration to add columns for `performingUserKey` and `affectedUserKey` and convert existing user ids
- Adjusted usages of the old AuditService.Write method to use the new one (mostly notification handlers)

* Apply suggestions from code review

* Small improvement

* Some adjustments following code review. Removed UnknownUserKey and used null instead.

* Small adjustments

* Better handle audits performed during the migration state

* Update TODO comment
2025-06-06 13:12:35 +02:00
Andy ButlandandGitHub 6c769d6024 Adds attribute to ensure management API requests are never cached in the browser or via a CDN (#19496)
Adds attribute to ensure management API requests are never cached in the browser or via a CDN.
2025-06-06 10:41:13 +00:00
Andy Butland 67ab06715f Merge branch 'release/16.0' 2025-06-06 10:49:21 +02:00
Mads RasmussenandGitHub 82a063b1e2 Fix: V16 Variant breadcrumb wrong after creating a nested document (#19492)
fixes the breadcrumb after created a new nested document
2025-06-05 17:05:13 +01:00
Lee KelleherandGitHub 3ca09e7341 V16 Variant breadcrumbs: the parent entity-type and unique were being mixed up (#19491)
Variant breadcrumbs: the parent entity-type and unique were being mixed up
2025-06-05 16:17:38 +02:00
Jacob Overgaard b3ac82baf8 Merge branch 'release/16.0' 2025-06-05 15:44:23 +02:00
Niels LyngsøandGitHub 7f51e1ad1b Manifest Viewer to support number and boolean (#19478)
support number and boolean
2025-06-05 13:39:16 +00:00
Andreas ZerbstandGitHub c7dcbfec60 V16 QA Publish Console Error Logs (#19417)
* Updated configuration

* Updated pipeline

* Updated nightly pipeline

* Bumped version

* updated if statement
2025-06-05 11:43:00 +00:00
Andreas ZerbstandGitHub 3f57da5579 V16 QA updated notification acceptance tests (#19469)
* Updated block grid tests

* Updated notifications in tests

* Updated tests

* Added testIdAttribute

* Bumped version of testHelpers

* Added waits after creation

* Updated more tests related to notifications

* Bumped version

* Cleaned up

* updated tests

* Bumped version

* Updated tests

* bumped version
2025-06-05 09:13:16 +00:00
Jacob Overgaard 8e71305605 fix: promotes @hey-api/client-fetch from devDependencies to dependencies 2025-06-05 09:53:46 +02:00
Karl-Johan SjögrenandGitHub ce2756f399 Fixed JSDoc comment for ManifestBase.weight (#19488) 2025-06-05 09:45:14 +02:00
Jacob Overgaard 6cfba9b406 Merge branch 'release/16.0' 2025-06-04 10:01:45 +02:00
Mads RasmussenandGitHub 02f963d65c Fixes the UmbSubmittableTreeEntityWorkspaceContext token discriminator (#19475)
use correct property name in discriminator
2025-06-04 08:30:40 +01:00
8a22f243f8 V16: Localization extensions load unordered (#19474)
* chore: export useful rxjs functions

* fix: use switchMap to ensure correct loading of localization extensions

also added filter() and distinctUntilChanged() to ensure the logic is not run more often than what is needed

* test: adds tests for async localization extensions and weights

* chore: apply simpler sorting syntax

* chore: adds catchError to ensure the whole stream is not stopped because of an error

* chore: lowest weight should win

* chore: move catchError so it catches everything

* chore: returns an observable to not break the stream

* chore: reverse weight as the previous was correct

* chore: adds a true comparer function that is more efficient

* Import order sorting

* Export order sorting

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-06-03 16:40:28 +00:00
Lee KelleherandGitHub f70d1c07c1 V16-RC Tiptap style fixes (#19473)
* Fixes search filter text alignment

* Let `styleMenu` kind display as a menu

* Collapse excessive whitespace in RTE

* Ensures the RTE Capabilities are in 3 columns

* Dimensions UI fixes
2025-06-03 17:14:08 +02:00
dependabot[bot]andJacob Overgaard 29b98ba862 Bump tar-fs from 3.0.8 to 3.0.9 in /src/Umbraco.Web.UI.Client
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 3.0.8 to 3.0.9.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v3.0.8...v3.0.9)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 3.0.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-03 13:41:10 +02:00
971ca17b5f Add unit test verifying dockerfile aligns with current target framework (#19445)
* Add unit test verifying dockerfile aligns with current target framework.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-03 12:53:37 +02:00
Niels LyngsøandGitHub 9ab17e6299 hotfix: close modals when url changes drastically (#19466)
* close modals when router disconnectes

* correct comment

* reorder code
2025-06-03 09:14:09 +02:00
Andy Butland d8b76575ca Merge branch 'v15/dev' of https://github.com/umbraco/Umbraco-CMS into v15/dev 2025-06-03 07:04:56 +02:00
Andy Butland 5b00312158 Merge branch 'release/15.4.2' into v15/dev
# Conflicts:
#	version.json
2025-06-03 07:04:43 +02:00
Andy ButlandandGitHub d920e93d1e Merge commit from fork 2025-06-03 05:21:11 +02:00
Andy ButlandandGitHub 50f60249ba Merge commit from fork 2025-06-03 05:21:11 +02:00
Lee KelleherandGitHub a8080d0cf4 V16 Ensures backwards compatibility of deprecated UMB_CONTENT_PROPERTY_CONTEXT (#19465)
* Ensures backwards compatibility of `UMB_CONTENT_PROPERTY_CONTEXT`

* Updates usage of deprecated `UMB_CONTENT_PROPERTY_CONTEXT` to `UMB_PROPERTY_TYPE_BASED_PROPERTY_CONTEXT`
2025-06-02 17:14:54 +00:00
Jacob OvergaardandGitHub e19eb66226 V16-RC: Login screen cannot load public manifests (#19453)
* chore: disable notifications for global manifest loads

* fix: registers required contexts to load public manifests

* fix: specifically for localizations, load with the same cultures and weights as the backoffice itself does

* fix: set weight to +100 to make sure custom localization extensions are loaded first

* fix: remove 'welcome' fallback to avoid a flash of unlocalized content (FO"U"C)

* fix: starting <li> tag
2025-06-02 16:07:18 +00:00
Niels LyngsøandGitHub c3f62f1506 set manifest on property editor uis (#19461) 2025-06-02 13:53:09 +00:00
Sven GeusensandGitHub d2a0cba933 V16 cherry pick of member partial cache invalidator see #19314 (#19459)
* v16 cherry pick of member partial cache invalidator see #19314

# Resolved merge conflic in src/Umbraco.Core/Cache/Refreshers/Implement/MemberCacheRefresher.cs

* Take nullmember cacheitems into account
2025-06-02 14:52:38 +02:00
Niels LyngsøandGitHub 66da4a7775 Fit: filter input styling (#19460)
do not change display for the uui-input but set a width
2025-06-02 11:49:00 +00:00
11c6ea903e Removed encoding of request to retrieve files and folders by path, to avoid double encoding via the typed client (#19457)
* Removed encoding of request to retrieve files and folders by path, to avoid double encoding via the typed client.

* fix: adjusts log viewer to encode only once and remove empty properties

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-06-02 10:42:32 +00:00
Nhu DinhandGitHub 5a56541aa5 V16 Added acceptance tests for document property value permission (#19385)
* Updated due to test helper changes

* Updated user group tests due to api helper changes

* Updated tests for user group default configuration due to UI changes

* Added tests for document property value permission

* Added tests for document property value permission in content with block

* Bumped version

* Make specific tests run in the pipeline

* Added skip tag and issue link for the failing tests

* Fixed comment

* Bumped version

* Fixed comments

* Bumped version and reverted npm command
2025-06-02 16:21:09 +07:00
Markus Johanssonandleekelleher ebe93fbbac Tiptap cannot set the top position of the toolbar (#19087)
* Fixes #19086 by making top position a variable

* #19086 Added JSDoc for cssprops

(cherry picked from commit 12049e9c03)
2025-06-02 08:08:06 +01:00
Dirk SeefeldandMatthew-Wise 321087c96e update data type descriptions for color picker according to PR 19430 2025-05-30 15:38:45 +01:00
Jacob Overgaard 93873c378e Merge branch 'release/16.0' 2025-05-30 15:44:22 +02:00
Richard OckerbyandJacob Overgaard d86064e1e5 Update references to Umbraco User model (Extension Template) (#19349)
Update references to Umbraco User model

In the template dashboard, update the type reference for the umbraco user
2025-05-30 14:35:33 +02:00
Jacob OvergaardandGitHub 08400b67e6 build(deps): bump @umbraco-ui/uui from 1.14.0-rc.3 to 1.14.0-rc.4 (#19452)
* build(deps): bump @umbraco-ui/uui from 1.14.0-rc.3 to 1.14.0-rc.4

* build(deps-dev): bump internal backoffice asset from rc3 to rc4
2025-05-30 12:33:10 +00:00
Richard OckerbyandGitHub ba6a0fcfe0 Update references to Umbraco User model (Extension Template) (#19349)
Update references to Umbraco User model

In the template dashboard, update the type reference for the umbraco user
2025-05-30 14:31:17 +02:00
Laura NetoandAndy Butland 8daf7d22a7 Use the proper umb-input-date events in the log viewer date range element (#19451)
Fixes #19382 by using proper umb-input-date events

The log viewer date range input was changed from using `input` to `umb-input-date`, but the event handlers weren't updated accordingly.
2025-05-30 13:53:22 +02:00
Laura NetoandGitHub b403518986 Use the proper umb-input-date events in the log viewer date range element (#19451)
Fixes #19382 by using proper umb-input-date events

The log viewer date range input was changed from using `input` to `umb-input-date`, but the event handlers weren't updated accordingly.
2025-05-30 10:44:52 +00:00
Dirk SeefeldandMatthew-Wise f0e37e04fa fix issue 19341 2025-05-30 11:18:45 +01:00
Andy ButlandandCopilot fd3808ae38 Ensure tag operations are case insensitive on insert across database types (#19439)
* Ensure tag operations are case insensitve on insert across database types.

* Ensure tags provided in a single property are case insensitively distinct when saving the tags and relationships.

* Update src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TagRepository.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Handle case sensitivity on insert with tag groups too.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-30 10:00:25 +02:00
Laura NetoandGitHub c4be7842a7 Sort available composition folders (#19373)
* Sort available composition folders

* Optimizations
2025-05-29 09:08:55 +02:00
Andy Butland 1726180b06 Merge branch 'release/16.0'
# Conflicts:
#	version.json
2025-05-29 07:59:05 +02:00
Andy Butland 3b84fe3557 Merge remote-tracking branch 'origin/v15/dev' into v16/task/merge-from-15
# Conflicts:
#	src/Umbraco.Core/PublishedCache/IPublishedCache.cs
2025-05-29 07:57:00 +02:00
Andy Butland 8dc9ec477d Bumped version to 16.0.0-rc5. 2025-05-29 07:51:18 +02:00
Jacob Overgaard d76293bacc Merge remote-tracking branch 'origin/release/16.0' 2025-05-28 17:07:59 +02:00
595e4ede69 V16 RC: Documents show "Not found" when switching between variant and invariant views, and other edge cases (#19425)
* fix: add a catcher to most `asPromise` for stores to prevent cascading errors

* fix: remove conditional instances - they should be able to be undefined

* fix: check for missing store and extract UmbProblemDetails

* fix: only append data if no error

* fix: adds error handling to missing stores and to extract the ProblemDetails object

* revert commit

* fix: ignore errors completely instead of unsetting stores

* revert commit

* chore: cleanup imports

* fix: do not unset store

* stop observation in a proper way

* stop observation of for document-user-permissions

* check for manager twice

* save action

* save action optional

* simplify init for detail repostiory

* fix routes

* adjusting more not found routes

* fix structure manager clean up

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-28 17:06:37 +02:00
179caacf58 Throw if attempting to use the default unique media path scheme with version 7 GUIDs (#19419)
* Thow if attempting to use the default unique media path scheme with version 7 GUIDs.

* Expanded unittests, fixed null params, chose a better exception

* Use parameters in test.

---------

Co-authored-by: Migaroez <geusens@gmail.com>
2025-05-28 12:49:36 +00:00
Jacob OvergaardandGitHub 434189ee47 V16: Upgrade Login dependencies to Umbraco 16 (#19433)
* build: updates login page to match Umbraco 16

* build(deps): bump heyapi to latest

* chore: simplify logic
2025-05-28 13:09:09 +01:00
b4d5c8fd51 input with alias and input range style corrections (#19441)
* fix alias input

* number range style fix + placeholder inconsistency fix

* build(deps): bump @umbraco-ui/uui to 1.14.0-rc.3

* fix property declaration

* Update src/Umbraco.Web.UI.Client/src/packages/core/components/input-number-range/input-number-range.element.ts

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-05-28 09:58:57 +00:00
Laura NetoandGitHub 933fa544d7 Translations for pt (pt-PT) (#19435)
* Added translations for `pt-PT` based on the existing `en` file

* Removed translations from `pt-BR` that are the same in `pt` or not translated. Other small adjustments.

* Replace all `ligação` with `link`, as it is more commonly used

* Small typo fixes in pt-BR
2025-05-28 11:40:00 +02:00
b019f0f849 Do not set icon color if the item is selected (#19404)
* Do not set icon color if the item is selected

* Added helper method for icon version to render.

* Fixed naming of protected helper method.

* Move further logic into helper method.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-05-28 08:53:44 +00:00
Niels LyngsøandGitHub 7346a14d86 update next icon (#19424) 2025-05-27 14:54:07 +02:00
Niels LyngsøandGitHub da436f839f Block List, append missing animation keyframes (#19428)
append animation keyframes
2025-05-27 12:46:52 +02:00
Rowan BottemaandAndy Butland ecfaee3b04 Lock appropriate tree for media operations (#19422)
The MediaService currently locks the ContentTree for GetPagedOfType(s) operations, but it's querying the MediaTree. This ensures we lock the correct tree.
2025-05-27 06:59:21 +02:00
Niels Lyngsø 80183964bb Merge branch 'release/16.0' 2025-05-26 21:18:51 +02:00
Jacob Overgaard 5161a2d3b0 build(deps): bump @umbraco-ui/uui from 1.14.0-rc.1 to 1.14.0-rc.2 2025-05-26 17:14:14 +02:00
Jacob OvergaardandGitHub 25e7f1927c V16-RC: Not all types are exported from 'documents' (#19421)
fix: exports new types from documents/documents/url
2025-05-26 12:47:09 +00:00
5c7a25fdc7 Closing redirecting modals fix (#19420)
* correct for fewer rejected promises

* move set new is new

* enable router slot to back out of a redirect

* hacky fix for redirect controller

* Update src/Umbraco.Web.UI.Client/src/packages/core/workspace/controllers/workspace-is-new-redirect.controller.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/core/workspace/controllers/workspace-is-new-redirect.controller.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-26 14:39:39 +02:00
Jacob OvergaardandGitHub 290334baaa V16: Sub-dependencies from workspaces are missing in the main package.json file (#19416)
* fix: renames `./src` to `./dist-cms` in distributed package.json

* build: adds missing package.json to segment package

* build: adds missing package and vite.config for 'settings'

* build: adds missing package.json for 'translation'

* build: hoist all sub-dependencies to main package.json file

* build: sync lock file with workspaces

* build: join the paths (for os agnosticity)
2025-05-26 14:00:59 +02:00
Kenn JacobsenandGitHub 407e7a24da Fix rare concurrency issue in back-office auth middleware (#19418) 2025-05-26 12:25:04 +02:00
Jacob Overgaard 50172ce16a build(deps): bump @umbraco-ui/uui from 1.13.0 to 1.14.0-rc.1 2025-05-26 11:22:07 +02:00
Andy Butland aaad36aa69 Revert "Fixed issue with syntax highlighting in code editor (#19414)"
This reverts commit 3f3c9f8823.
2025-05-26 10:28:18 +02:00
Andy Butland 445652d7f4 Merge branch 'release/16.0'
# Conflicts:
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithMultiURLPicker.spec.ts
#	version.json
2025-05-26 10:26:15 +02:00
3f3c9f8823 Fixed issue with syntax highlighting in code editor (#19414)
* Fixed issue with syntax highlighting in code editor.

* Update src/Umbraco.Web.UI.Client/src/packages/code-editor/property-editor/property-editor-ui-code-editor.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Refactor introducing helper method.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-05-26 08:01:21 +00:00
95c6173b5c Ensure controller is still present (#19408)
* check controller is still present

* Update src/Umbraco.Web.UI.Client/src/libs/controller-api/controller-host.mixin.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-26 07:34:24 +00:00
f03a7d332b Introduce delay and expand path matching on Backoffice router for lazy-loaded routes (#19409)
* implement use of pathMatch: 'full' for empty redirects

* awaitStability feature for route redirects

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-05-26 09:25:17 +02:00
86bbdfe7d3 <umb-content-workspace-property> DX (#19399)
* introduce umb-content-workspace-property to improve dx

* make property responsible for observing the view guard

* Update src/Umbraco.Web.UI.Client/src/packages/content/content/global-components/content-workspace-property.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* context consumer update tests

* no need to import when exporting

* only observe aliases

* merge the two component for less complexity

* added property settings

* ensure this works with extension begin removed

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-26 09:11:39 +02:00
Niels LyngsøandGitHub 8d490783b5 Fix observe property string name (#19411) 2025-05-26 08:42:31 +02:00
Niels LyngsøandGitHub c2c4dc961c fix context api test (#19412)
context consumer update tests
2025-05-26 08:41:49 +02:00
Andy Butland 7f2a78f2fe Cleaned up constructors, regions and variables in NewDefaultUrlProvider (#19403)
Cleaned up constructors, regions and variables in NewDefaultUrlProvider.
2025-05-26 07:27:35 +02:00
Andy ButlandandGitHub 13e368ca28 Cleaned up constructors, regions and variables in NewDefaultUrlProvider (#19403)
Cleaned up constructors, regions and variables in NewDefaultUrlProvider.
2025-05-26 07:11:53 +02:00
Niels LyngsøandGitHub 366c1f9960 hotfix: correct dark theme color for variant selector (#19406)
use colors not palettes
2025-05-26 06:41:24 +02:00
Andy ButlandandGitHub ab25074711 References correct starter kit version for Umbraco 16 (#19392) 2025-05-23 16:17:31 +02:00
Andy Butland e6967a41cd Removes unnecessary newlines from rich text as JSON delivery API output (#19391)
* Removes unnecessary newlines from rich text as JSON delivery API output.

* Fix case from PR feedback.
# Conflicts:
#	src/Umbraco.Infrastructure/DeliveryApi/ApiRichTextElementParser.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/DeliveryApi/RichTextParserTests.cs
2025-05-23 12:28:18 +02:00
MoleandGitHub feba51a49d Use correct service name in obsoletion method (#19398)
Use correct service in obsoletion method
2025-05-23 09:46:16 +00:00
Andy Butland b87ae6ce46 Fix issue with requests to delivery API by path where URL segment contains special characters (#19390) 2025-05-23 11:14:33 +02:00
Niels LyngsøandGitHub 0442b9e317 additional context name for 'content property context' (#19375)
rename to UmbPropertyTypeBasedPropertyContext
2025-05-22 21:12:19 +02:00
Andreas ZerbstandGitHub 3db0ec7efc V16 Updated nightly E2E pipeline to run correct test scripts (#19378)
* Set default to true, so we run the SQlite tests aswell

* Updated test commands to run correct tests

* Disabled Sqlite tests

* Skip flaky test
2025-05-22 11:24:46 +02:00
0f53ba8a18 fix: check for NullRepresentationInCache in AppCacheExtensions (#19350)
* fix: add appcache null check

* Moved constant into standard location.
Removed now unnecessary comment.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-05-22 08:45:30 +02:00
Niels LyngsøandGitHub 62cedeec13 V16/hotfix/ensure self destroy before clean up (#19367)
* move destroy to top

* clean up example

* use the unprovide method when disconnecting
2025-05-21 09:32:34 +00:00
Niels Lyngsø 45593c6311 Merge branch 'release/16.0'
# Conflicts:
#	version.json
2025-05-21 11:17:47 +02:00
Nikolaj Geisle 2b714d3022 bump version 2025-05-21 09:55:46 +02:00
Laura NetoandGitHub 225fed5f72 Handle user id 0 (Unknown/System) when building content version response (#19361)
Handle user id 0 (Unknown/System) when building content version response model

`IUserIdKeyResolver.GetAsync` throws an exception when a user is not found.
As user 0 does not really exist, the exception was being thrown.
We now handle this scenario to return an empty reference.
2025-05-20 17:01:03 +02:00
Andy Butland 419625a919 Optimize the member save as part of the member login process, by-passing locking and audit steps and handling only the expected update properties (#19308) 2025-05-20 15:58:27 +01:00
Mads RasmussenandGitHub ed8e9416db Fix filter when selecting elements for block types (#19369)
* fix filter

* remove console log
2025-05-20 14:29:29 +02:00
Niels LyngsøandGitHub f4515d7c2e V16/hotfix/set manifests when using create extension api (#19358)
* also set manifest when using createExtensionApi()

* set manifest when using createExtensionManifest
2025-05-20 12:17:38 +00:00
Andy Butland 853c1acf7e Bumped version to 15.4.2 2025-05-20 13:10:02 +01:00
Andreas ZerbstandGitHub b1e447d0c5 Merge pull request #19371 from umbraco/v16/merge-16-release-to-main
Merged from release/16.0 to main branch
2025-05-20 13:15:49 +02:00
Andreas Zerbst df11e438f4 Merge remote-tracking branch 'origin/release/16.0' into v16/merge-16-release-to-main
# Conflicts:
#	build/nightly-E2E-test-pipelines.yml
#	src/Umbraco.Web.UI.Client/eslint.config.js
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockGrid/VariantBlockGrid.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockList/VariantBlockList.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentInfoTab.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithCheckboxList.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithDropdown.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithMediaPicker.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithRadiobox.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithTextarea.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithTextstring.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RedirectManagement.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/ContentWithTiptap.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/VariantTipTapBlocks.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Dictionary/Dictionary.spec.ts
#	version.json
2025-05-20 12:25:14 +02:00
Andreas ZerbstandGitHub e5d3927cb6 Merge pull request #19368 from umbraco/v16/merge-15-to-16-release
Merged v15 dev to release 16
2025-05-20 11:20:54 +02:00
7572ea350b Feature: Content Workspace Icon (#19292)
* add slot for icon

* expose icon data

* render icon

* load type for scaffold

* rename

* render icon for media

* add observable for content type icon

* request data in data source

* wire up document scaffolding

* remove unused

* export server data source

* render icon for member

* rename data source to align with other detail sources

* rename data source

* remove unused styling

* remove console log

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove console log

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove console log

* Update detail-repository-base.ts

* Update document-workspace-split-view.element.ts

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-20 11:12:19 +02:00
Karl-Johan SjögrenandGitHub ec6a38e052 Fix for invalid state in JsonBlockValueConverter when an unused layout has a nested array (#19363)
* Fix for invalid state in JsonBlockValueConverter when an unused layout has a nested array

* Improved comments as suggested by copilot review, also fixed code style miss

* Added check for malformed JSON with more closing array tokens then opening tokens
2025-05-20 10:07:50 +01:00
Andreas Zerbst 66c997a843 Skips test as there has been updates to notifications and we will need to refactor the test 2025-05-20 10:42:40 +02:00
Andreas Zerbst fc5f20745b Updated test as we do not have notifications for save/publish 2025-05-20 10:02:42 +02:00
Andreas Zerbst 6a032390c2 Merge remote-tracking branch 'origin/v15/dev' into v16/merge-15-to-16-release
# Conflicts:
#	Directory.Packages.props
#	build/nightly-E2E-test-pipelines.yml
#	src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollection.cs
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/ContentWithTiptap.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/Media.spec.ts
#	version.json
2025-05-20 09:26:06 +02:00
Nhu DinhandGitHub ea8ec4e375 V16 QA Updated E2E nightly pipeline (#19355)
Disabled SQLite tests and made it run against the release/16.0 branch
2025-05-20 11:31:14 +07:00
Niels LyngsøandGitHub 2dd2329067 Resolve seen issue regarding destroyed validation context (#19359)
maybe messages has been destroyed so enable it to be undefined
2025-05-19 12:35:32 +00:00
57bec5192b Add culture awareness to the backoffice search APIs (#19322)
* Added culture parameter to search APIs and propagated it to the indexed entity search service

* Variant Culture aware search in Document and Media Pickers (#19336)

* generate types

* enable selection of entity-item-ref elements

* Update input-document.element.ts

* add culture to document search args

* pass culture param to search end point

* get variant context in document picker

* add variant context

* set culture in variant context when changing app language

* set variant context when swithing variant in a workspace

* Update content-detail-workspace-base.ts

* clean up

* remove from split view manager

* Update property-dataset-base-context.ts

* change name to fallbackCulture

* simplify

* get context instead of consuming

* make all methods async

* implement for media

* Update current-user-action.extension.ts

* allow null until we reach the server

* remove log

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>

* remove console.log

* add display culture

* opt-in inheritance

* set observe alias to observeAppCulture

* stop inheritance if specific cultures are set

* remove unused import

* include culture for document and media global search

* await value for get methods

* include orderCulture for document collections

* Update document-collection.context.ts

* Update document-collection.context.ts

* fix self import

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-05-19 11:59:06 +00:00
Niels LyngsøandGitHub afed7b08f8 await value for get methods (#19356) 2025-05-19 11:38:44 +00:00
Jacob OvergaardandGitHub 3d8707e536 V16 RC: HtmlImageSourceParser should not care for order of attributes (#19331)
* fix: split attribute regex into two to be able to ignore the order of attributes

* the regex should not care for the ending of the tag

* test: adds test cases to test order of attributes

* remove image sources using new regex

* adds more documentation

* adds test cases to test removal of source with and without parameters

* test for null value

* test: adds more cases for null and reversed parameters
2025-05-19 11:41:12 +01:00
930a29f3d5 Document URLs Data Resolver (#19316)
* remove padding

* add document urls data resolver

* use in url info app

* handle invariant cases

* do not render culture if all links have the same culture

* use if defined

* handle variant with no links

* Update types.ts

* fix lint errors

* get variant aware document data

* remove unused

* use media item repository

* temp remove check

* populate url

* add spacing to reference app

* reset the url when removing document or media

* add validator

* make url input required

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-05-19 12:36:40 +02:00
Niels LyngsøandGitHub dda69a1ead Hotfix: do not validate the invariant-variant entry when we vary by culture (#19326)
do not validate the variant entry when we vary by culture
2025-05-19 10:37:10 +01:00
Jacob OvergaardandGitHub 8f171564b7 V16 RC: File upload errors should be shown to the user (#19344)
fix: when a file upload error is encountered it should handle all messages coming from UmbApiError
2025-05-19 10:22:40 +01:00
Jacob OvergaardandGitHub 2c3af1b329 V16 RC: Add more debug info to System Information (#19343)
* feat: rearrange sysinfo and see if we can pull in the version from package.json directly

* fix: use correct id to select #codeblock
2025-05-19 10:17:46 +01:00
Andy ButlandandGitHub 343bb853fd Invalidate external login session on removal of provider (16) (#19289)
* Cherry-pick from 13 and adjust.

* Resolve circular dependency references and clear OpenIddict tokens on purging sessions associated with removed login providers.

* Removed out of date comment.

* Removed incorrect casing update for SQLite.
2025-05-19 11:00:15 +02:00
3f10bd8c21 Added logging and try/catch around retrieval of references, so we don't block critical operations following an incompatible data type change (#18576)
* Added logging and try/catch around retrieval of references, so we don't block critical operations following an incompatible data type change.

* Added a little more detail to the log message.

* Added a little more detail to the log message.

* Fix unittest mock dependency

---------

Co-authored-by: Migaroez <geusens@gmail.com>
2025-05-19 10:54:22 +02:00
Mads RasmussenandGitHub 1fdeb4f251 Add explicit Global Search extension point (#19348)
* add global search extension

* render global search extension in search modal

* register document global search

* add media global search

* add data type global search

* add dictionary global search

* import manifests

* register document type global search

* add media type global search

* register member global search

* register member type global search

* register template global search

* export missing consts

* export missing consts

* export missing consts

* add conditions
2025-05-19 10:50:12 +02:00
Jacob Overgaard 135f0f63de Merge branch 'main' into v17/dev 2025-05-16 16:58:11 +02:00
Jacob Overgaard ceab77d911 fix: remove direct imports (they are already imported by the index barrel) 2025-05-16 14:18:15 +02:00
e959850a66 Introduce Variant Context (#19334)
* add variant context

* set culture in variant context when changing app language

* set variant context when swithing variant in a workspace

* Update content-detail-workspace-base.ts

* clean up

* remove from split view manager

* Update property-dataset-base-context.ts

* change name to fallbackCulture

* simplify

* make all methods async

* Update current-user-action.extension.ts

* remove culture and segment state

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-16 12:30:29 +02:00
e62e55d1c0 Media Picker Modal File Previews (#19335)
* Ordered `@property` setters/getters

* JSDocs + comments

* Removed unneeded CSS

* Markup code formatting

* Hides "Reset focal point" button

when focal point has default value

* Image Cropper field element: adds active state to crops

* Image Cropper Editor Field element: reduced the markup and styles

Removing duplications from inherited class

* Removed unused code from Image Cropper Focus Setter element

* Big refactor of Image Cropper Editor modal

to support File Upload Previews

* Added `<umb-file-upload-preview>`

to handle the logic of rendering the relevant `fileUploadPreview` extension.

* Refactored SVG File Upload Preview component

Removes the `<uui-card-media>` container.
Controversially removes the link, but this was inconsistent with other file previews.

* Refactored General File Upload Preview component

Removes the `<uui-card-media>` container.
Controversially removes the link, but this was inconsistent with other file previews.

* Refactored Image File Upload Preview component

Removes the `<uui-card-media>` container.
Controversially removes the link, but this was inconsistent with other file previews.

* Refactored Audio and Video File Upload Preview component

To align code with the other file previews.

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/image-cropper-editor/image-cropper-editor-modal.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-05-16 10:29:09 +00:00
28fc81756a Tiptap Media Picker: ImageSharp HMAC support (#19333)
* Tiptap Media Picker: Uses imaging repository

to get the resized URLs from the server.
This adds support for ImageSharp's HMAC security.

* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/toolbar/media-picker.tiptap-toolbar-api.ts

* feat: uses the actual configured image SIZE for both width and height as documented

this also deprecates the public maxWidth property

* feat: verifies that a resized image exists and use the size of that

* feat: transfer the image size calculation to the drag'n'drop uploader and ensures that imageSize() accounts for maxHeight as well

* docs: adds comment to explain why it calculates the image size

* test: adds cases for imageSize

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-05-16 10:17:49 +00:00
df56f1985b Fix Allow Edit Invariant config in split view (#19320)
* temp implementation

* pass correct property variant id

* check for dataset variantId

* pass dataset variant id

* more explicit unique

* pass dataset variant id

* pass correct property variant id

* rename variable

* use !

* re-fit tests with new argument

* update rule check

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-16 09:23:29 +02:00
AbdulazizandGitHub 76fcb4ade2 Change CONTRIBUTING.md to fit the new github style and also the branc… (#19246)
Change CONTRIBUTING.md to fit the new github style and also the branch to fork as there is no more contrib branch
2025-05-16 09:05:04 +02:00
c20b0ab3c9 Fix localiztion for buttons in pagination (#19006)
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-05-15 22:31:28 +02:00
Jacob Overgaard 8bc3de10a2 chore: removes unused import to fix lint errors 2025-05-15 22:00:14 +02:00
Niels LyngsøandGitHub 5e212f7503 hotfix: remove current user action look and color (#19324)
remove option for color and look
2025-05-15 11:44:14 +02:00
mole 012959dc3e Bump version 2025-05-14 12:17:03 +02:00
Nhu DinhandGitHub 41bf741901 V16 QA Fixing the failing E2E tests (#19318)
* Updated nightly E2E pipeline

* Fixed failing E2E tests

* Skipped content tests wirh list view content due to an issue

* Updated tests due to UI changes

* Bumped version

* Added more waits
2025-05-14 16:10:03 +07:00
d239849cc5 Include property aliases in compatible composition check (#19277)
* add method to get all property aliases

* pass property aliases to composition modal

* put in a box + adjust spacing

* disable if doc type is not compatible for composing

* compare with what is used for composition

* add comment

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-14 10:47:43 +02:00
6fd6319b12 Ensures cultures set on content are correctly cased (#19290)
* Ensures cultures set on content are correctly cased and verifies with integration tests.

* Improved test comments.

* Move culture casing check into an extension method and use from content service.

* Deduplicated test code and added more test cases

* Only run invalid culture codes test on Windows

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-05-14 09:47:21 +02:00
Niels LyngsøandGitHub a84c114f54 hotfix: #19299 (#19315)
* make sure the unique follows the unique of the models type

* make sure the uniques are used to clean up

* omit #containers state for a more direct data flow

* ensure containers are refreshed correctly

* set ownerContentTypeUnique to undefined when clear
2025-05-14 09:29:55 +02:00
Andreas ZerbstandGitHub 2d5e34b49d V16 QA added a fix for a failing language test (#19311)
* Updated language helper to use data mark

* Bumped version
2025-05-13 12:49:08 +00:00
Mads RasmussenandGitHub 8878bdacd3 Close dropdown after executed action workaround (#19305)
* close dropdown workaround

* Update dropdown.element.ts
2025-05-13 12:57:03 +02:00
54f50e0686 Allow segment access to editors with access to documents, not only settings (#19291)
* Allow segment access to editors with access to documents, not only settings.

* Update src/Umbraco.Cms.Api.Management/Controllers/Segment/SegmentControllerBase.cs

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Cleaned up usings

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-05-13 10:33:34 +00:00
f784f62303 Deprecate AuditService.Write() method (#19306)
* Deprecate the AuditService.Write() method

It will be moved to a new service with the rework of the AuditService, as it relates to a different repository (umbracoLog vs umbracoAudit).

* Update obsolete message to reference V18

* Apply suggestions from code review

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-05-13 09:58:34 +00:00
Jacob Overgaard 81ae9f41e8 fix: turns off autocomplete for the main entity name field 2025-05-13 10:47:55 +02:00
Andy ButlandandGitHub b0f3009c49 Authorize copy and move destination for the create granular permission (#19303) 2025-05-13 10:00:17 +02:00
Laura NetoandGitHub b42888dffa Cannot view audit logs when they contain entries with user id 0 (#19263) 2025-05-12 12:31:16 +02:00
Andreas ZerbstandGitHub b13eb8aaf8 V15 Added second level block acceptance tests (#19264) 2025-05-12 09:23:55 +00:00
Jacob Overgaard 2b00f15d1a build: prevents public releases that matches the main branch 2025-05-12 10:33:41 +02:00
23df7f1ddc Allow selection of unpublished documents in link picker and align display of URLs (#19296)
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-05-12 07:47:22 +00:00
Mads RasmussenandGitHub 3493d9fbc4 align label with other create options (#19210) 2025-05-09 10:41:29 +00:00
Niels LyngsøandGitHub 0e73c5472a implement label for entity actions bundle (#19242) 2025-05-09 10:00:45 +00:00
Sven GeusensandGitHub 49715d6f36 Forward port of #19045 (Added custom RichTextRegexValidator to validate markup instead of JSON) (#19280) 2025-05-09 11:17:00 +02:00
f772c26e6e Improve active state check for menu and tree item (#19281)
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-09 09:11:39 +00:00
1fc8b4ff7f Allow configuring collection no-items text via manifest or attribute (#19284)
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-09 09:05:58 +00:00
a8f58d8f75 Simplify descriptions, labels and notification messages for publishing (#19267)
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-05-09 08:52:02 +00:00
3a39728803 hotfix: #19230 (#19285)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-09 10:23:19 +02:00
Mads RasmussenandGitHub f7bee379d7 Enforce: allowEditInvariantFromNonDefault configuration in the Backoffice UI (#19265) 2025-05-09 10:20:10 +02:00
Nhu DinhandGitHub 5d9d94a0e8 V16 QA Added acceptance tests for publishing with descendants (#19262) 2025-05-09 07:27:02 +00:00
Niels LyngsøandGitHub 713d5eff5e setup context tokens to support menu structure workspace (#19172) 2025-05-09 09:25:39 +02:00
a463c99e4c Feature: ability to drag across tabs (#19183)
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-05-08 17:24:45 +02:00
Andy ButlandandGitHub 367a13b0e7 Correct the display of pending package migrations (#19276) 2025-05-08 16:14:26 +02:00
Niels LyngsøandGitHub e9a5dafc62 Fix #19221 (#19254) 2025-05-08 09:27:59 +00:00
Mads RasmussenandGitHub 822cfe9c28 Batch item rest requests (#19233) 2025-05-08 11:17:57 +02:00
Andreas ZerbstandGitHub 275478066e V15 QA complex block grid test (#18347) 2025-05-08 11:12:37 +02:00
Niels LyngsøandGitHub a5d32336fc Fix: Ensure minimum height for Block List Custom Views (#18398) (#19253) 2025-05-08 11:04:03 +02:00
Lee KelleherandGitHub 712cbe84c1 Member Type Root Collection View / Workspace (#19271) 2025-05-08 10:22:10 +02:00
Andreas ZerbstandGitHub b01def0872 V15 QA added a fix for flaky integration tests run on SQL Server Linux (#18965) 2025-05-08 08:53:29 +02:00
Mads RasmussenandJacob Overgaard d1f0437daf Update eslint.config.js 2025-05-08 08:36:57 +02:00
Nikolaj Geisle a31923c1e2 Merge branch 'release/16.0'
# Conflicts:
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Collections.cs
2025-05-07 18:24:26 +02:00
Lee KelleherandGitHub 2c58c701ed V16: Localization refinements (#19258) 2025-05-07 14:25:25 +00:00
Jacob Overgaard f42328e46f trigger the nightly builds on the main branch 2025-05-07 12:02:31 +02:00
6de255f667 Saveable workspace interface + token (#19220)
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-05-07 08:20:05 +00:00
Nhu DinhandGitHub 4d7641be97 V16 QA Updated the nightly test pipeline to run against the main branch (#19261) 2025-05-07 10:09:28 +02:00
Andy ButlandandGitHub 744ff61fb0 Handle null for retrieval of content section in unit tests (#19260) 2025-05-07 07:18:18 +00:00
Andy ButlandandGitHub 22e0720395 Log language ISO codes instead of language names (#19259) 2025-05-07 08:42:39 +02:00
AbdulazizandGitHub 89cd13df8f V16: Block selector is limited to 100 blocks (#19240) 2025-05-06 14:12:49 +02:00
AbdulazizandGitHub e55ff3e5b7 V16: Main language dropdown does not scroll (#19237) 2025-05-06 14:10:59 +02:00
2297404041 Normalize webhook payloads (#19110)
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-05-06 14:02:49 +02:00
41ca028023 Normalize webhook payloads (#19110)
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-05-06 14:01:11 +02:00
Andy ButlandandGitHub 0d080bdbf6 Hide the content files that come from the Microsoft.CodeAnalysis.Workspaces.Common package in the web.ui project (#19239) 2025-05-06 09:42:09 +00:00
dependabot[bot]andJacob Overgaard cdadd6c29d Bump vite from 6.2.6 to 6.3.5 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.6 to 6.3.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-06 10:34:38 +02:00
Jacob OvergaardandGitHub 95bfee7c63 V16 RC: getOpenApiConfiguration().token does not work (#19217) 2025-05-06 08:43:10 +01:00
Nhu DinhandGitHub b106305167 V15 QA Added acceptance tests for tiptap style select (#19234) 2025-05-06 07:15:30 +00:00
Nhu DinhandGitHub 103631de15 V15 QA Updated the build stage to align with the azure pipelines yml (#19235) 2025-05-06 06:59:32 +00:00
DitteKKoustrupandGitHub 489322adac Create Localization Contributing Documentation (#18412) 2025-05-05 15:46:37 +02:00
Jacob Overgaard 2d7037df4b docs: updates branch recommendation 2025-05-05 15:27:38 +02:00
Jacob Overgaard 44552ccf75 build(dev): update all github workflows with new default branch name 2025-05-05 15:26:51 +02:00
Kenn JacobsenandGitHub 6518a261f0 Revert #16058 for non-applicable settings (#19229) 2025-05-05 15:06:18 +02:00
dependabot[bot]andJacob Overgaard 6f4a8a2041 Bump vite from 6.3.2 to 6.3.5 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.3.2 to 6.3.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-05 15:02:06 +02:00
2dced37117 Clean up extension methods (#17051)
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-05-05 14:53:26 +02:00
Jacob Overgaard 44d9f5ac2e build: bump version to 17.0.0-rc 2025-05-05 14:52:52 +02:00
Jacob Overgaard b2e80865b8 Merge branch 'v16/dev' into contrib 2025-05-05 14:16:22 +02:00
Jacob Overgaard 641e549bae build: bump version to 16.1.0-rc 2025-05-05 14:15:40 +02:00
Jacob Overgaard 4dd7ce1a73 Merge branch 'release/16.0' into v16/dev 2025-05-05 14:14:49 +02:00
Sebastiaan Janssen 358ab7b205 Merge branch 'v16/dev' into contrib 2025-05-05 14:12:22 +02:00
Sebastiaan Janssen 7e647c6b38 Merge branch 'contrib' of https://github.com/umbraco/Umbraco-CMS into contrib
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	src/Umbraco.Web.UI.Login/package-lock.json
2025-05-05 14:11:45 +02:00
6ce4fbfc0c V16 QA Fixed nightly test pipeline (#19226)
* Use Windows instead

* Updated the build stage to align with the azure pipelines yml

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2025-05-05 10:13:50 +00:00
Andy Butland a0873f0860 Restored interface methods on obsolete IBackgroundTaskQueue (#19223)
* Restore interface methods on obsolete IBackgroundTaskQueue.

* Fixed typos in comment.
2025-05-05 10:37:33 +02:00
Andy Butland f39094fcea Merge remote-tracking branch 'origin/v15/dev' into v16/dev
# Conflicts:
#	Directory.Packages.props
2025-05-05 10:36:43 +02:00
Andy Butland 1b19ca7cdb Merge branch 'release/15.4.1' into v15/dev
# Conflicts:
#	version.json
2025-05-05 10:31:48 +02:00
Markus JohanssonandGitHub 12049e9c03 Tiptap cannot set the top position of the toolbar (#19087)
* Fixes #19086 by making top position a variable

* #19086 Added JSDoc for cssprops
2025-05-05 07:55:52 +02:00
d83e9f736d Changed the Image crop UI component to fit the new Backoffice UI design (#19204)
* Changed the Image crop UI component to fit the new Backoffice UI

* style adjustments

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-02 06:49:25 +00:00
dependabot[bot]andJacob Overgaard 1c1035e1ea Bump vite from 6.2.6 to 6.3.4 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.6 to 6.3.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.4
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 08:34:23 +02:00
Niels LyngsøandGitHub 8a98f6034c write message when no blocks available (#19198) 2025-05-02 08:31:10 +02:00
dependabot[bot]andJacob Overgaard 03523ad90b Bump vite from 6.2.6 to 6.3.4 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.6 to 6.3.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.4
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 08:30:42 +02:00
45c4f251fa V16 login photo (#19212)
* remove curves

* new photo

* Revert "remove curves"

This reverts commit f691d1762f.

* re-introduce curves

* fix the edge of the lines

* fix edge of lines

* use color-background for alignment with login screen

* chore: replace login image in mocks

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-05-02 08:19:25 +02:00
Nathaniel NunesandGitHub abf068934d add overflow:visible to allow the workspace action menu to be highlighted (#18391)
* add overflow:visible to allow the workspace action menu to be highlighted when tabbed into
2025-05-02 01:16:27 +02:00
Mads RasmussenandGitHub ace167f0c8 Fix filter logic (#19215)
* update filter logic

* Update input-document-type.element.ts
2025-05-01 20:59:19 +00:00
Mads RasmussenandGitHub a201bbd064 Preview segment (#19203)
* add new manifest

* wip element

* add segment to preview context

* add segment icon

* open preview route on the same server

* Update preview.context.ts

* clean up

* pass culture and segment to preview window
2025-05-01 22:21:02 +02:00
Niels Lyngsø 057fd05635 Merge branch 'release/16.0' into v16/dev
# Conflicts:
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
2025-05-01 22:13:01 +02:00
Niels Lyngsø dc4355cbe2 use FormControl value property 2025-05-01 20:59:06 +02:00
04a10c2e8d Reposition workspace entity actions (#19199)
* add border to description

* reposition menu

* reposition menu

* try and fix e2e tests

* add data-mark

* use correct function

* bump helpers

* style correction

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-01 14:44:47 +00:00
+2 60457456f9 Block Type Configuration: filter search to only include element types (#19201)
* Incorrect forum and security urls when raising issue (#19080)

* Add 'ManifestWithDynamicConditions' to ManifestHeaderApp so Header Apps can be conditionally shown/loaded (#19124)

* V15 QA Added acceptance tests for bulk trash dialog (#19125)

* Added tests for bulk trash content dialog

* Updated tests for trash content dialog

* Added tests for trash and bulk trash media dialog

* Moved trash content tests into a folder

* Bumped version

* Make trash tests run in the pipeline

* Make trash tests run in the pipeline

* Fixed comments

* Reverted npm command

* readme shield for forum

* Allow deselection of color picker property. (#19174)

* V15 Added acceptance tests for tiptap statusbar (#19131)

* Updated tests for tiptap RTE

* Moved tests for titptap toolbar to another class

* Added tests for titptap toolbar

* Added tests for tiptap statusbar

* Bumped version

* Make tiptap tests run in the pipeline

* Bumped version

* Reverted npm command

* build: restores some of the behavior from V13 in relation to StaticAssets (#19189)

In v13, the StaticAssets build was only triggered based on the existence of either the output folder or a preserve.* marker file. Here, we also additionally check for the node_modules/.package-lock.json file before reinstalling npm dependencies. We also now only run `npm install` rather than `npm ci` to optimise the build.

* filter search to only include element types

* V16 QA update failing nightly tests (#19190)

* Fixed tests

* More updates for tests

* Bumped version of testhelpers

* Fixed notifications in tests

* Last fixes

* Revert "Merge branch 'v16/dev' into v16/hotfix/filter-element-type-search-for-block-types"

This reverts commit 7b8b5c28da, reversing
changes made to 6d4ddb7077.

* disable not pickable search results

* correct use of pickable filter

---------

Co-authored-by: Lotte Pitcher <LottePitcher@users.noreply.github.com>
Co-authored-by: Warren Buckley <warren@hackmakedo.com>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Lotte Pitcher <github@lottepitcher.co.uk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-01 13:17:49 +00:00
Andy Butland 793534c627 Merge branch 'release/15.4' into v15/dev
# Conflicts:
#	version.json
2025-05-01 07:38:58 +02:00
Andy ButlandandGitHub 479ea0c77d Further dependency upgrades (#19202)
* Updates dependencies on Umbraco.Code and Microsoft.CodeAnalysis.*.

* Avoids dependency warnings on build of Web.UI project.

* Bumped version to 16.0-rc2.
2025-04-30 14:10:42 +02:00
mole 65d3ace566 Bump version to rc2 2025-04-30 11:13:23 +02:00
mole 8e5f3c1cdf Merge remote-tracking branch 'origin/release/16.0' into v16/dev 2025-04-30 11:12:35 +02:00
Andreas ZerbstandGitHub acdaee6ad8 V16 QA update failing nightly tests (#19190)
* Fixed tests

* More updates for tests

* Bumped version of testhelpers

* Fixed notifications in tests

* Last fixes
2025-04-30 08:39:08 +00:00
Mads RasmussenandGitHub 2feef9c5b7 Ensure picker search config query params are always included in the server request (#19194)
* ensure picker search config query params are always included

* fix type error
2025-04-30 09:58:17 +02:00
Andy Butland 0a7d00182b V13: Clear Member Username Cache in Load Balanced Environments (#19191)
* Clear usernamekey

* Odd explaining comment

* Update src/Umbraco.Core/Cache/Refreshers/Implement/MemberCacheRefresher.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Make UserNameCachePrefix readonly for better immutabilityly

* Move prefix to CacheKeys constants

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# Conflicts:
#	src/Umbraco.Core/Cache/CacheKeys.cs
2025-04-29 18:11:53 +02:00
Jacob Overgaard 63090a1df8 Merge branch 'release/15.4' into release/16.0 2025-04-29 16:01:06 +02:00
Jacob Overgaard f7a2569506 Merge branch 'v15/dev' into v16/dev 2025-04-29 15:53:57 +02:00
Jacob Overgaard 10518ed454 Merge branch 'release/15.4' into v15/dev 2025-04-29 15:51:45 +02:00
30f0b2a1a9 Open entity actions menu as pop up instead of modal (#19185)
* Open entity actions menu as pop up instead of modal

* Update entity-actions-bundle.element.ts

* Update entity-actions-bundle.element.ts

* ensure no indent for the menu items of the entity actions menu

* add scroll container

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-04-29 15:18:16 +02:00
Jacob Overgaard 9e481f3e4f build: restores some of the behavior from V13 in relation to StaticAssets (#19189)
In v13, the StaticAssets build was only triggered based on the existence of either the output folder or a preserve.* marker file. Here, we also additionally check for the node_modules/.package-lock.json file before reinstalling npm dependencies. We also now only run `npm install` rather than `npm ci` to optimise the build.
2025-04-29 13:07:12 +02:00
Jacob Overgaard 581798f097 Merge branch 'v15/dev' into v16/dev 2025-04-29 13:06:49 +02:00
Jacob Overgaard a1379f13a0 Merge branch 'contrib' into v15/dev 2025-04-29 13:05:06 +02:00
Jacob OvergaardandGitHub 38e9781fc5 build: restores some of the behavior from V13 in relation to StaticAssets (#19189)
In v13, the StaticAssets build was only triggered based on the existence of either the output folder or a preserve.* marker file. Here, we also additionally check for the node_modules/.package-lock.json file before reinstalling npm dependencies. We also now only run `npm install` rather than `npm ci` to optimise the build.
2025-04-29 13:04:24 +02:00
Nhu DinhandGitHub dfc6ead6d5 V15 Added acceptance tests for tiptap statusbar (#19131)
* Updated tests for tiptap RTE

* Moved tests for titptap toolbar to another class

* Added tests for titptap toolbar

* Added tests for tiptap statusbar

* Bumped version

* Make tiptap tests run in the pipeline

* Bumped version

* Reverted npm command
2025-04-29 07:39:56 +00:00
Kenn JacobsenandGitHub ae54b92005 Output culture variant update dates from the Delivery API (#19180) 2025-04-29 07:01:07 +02:00
Andy Butland 758a9cf1ec Allow deselection of color picker property. (#19174) 2025-04-28 16:57:48 +02:00
Andy ButlandandGitHub 5469d9841b Allow deselection of color picker property. (#19174) 2025-04-28 15:50:03 +02:00
Mads RasmussenandGitHub 65caa60496 Add copy to clipboard success notification (#19179)
* add localization

* show notification

* Update clipboard.property-context.ts
2025-04-28 13:21:05 +00:00
Andy Butlandandkjac cdba470f2d Webhook log authorization and file system path checks (#19177)
* Add authorization for webhooks to item and log endpoints.

* Remove full path details from exception when requesting a path outside of the physical file system's root.

* Added missing usings.

* Revert changes to the webhook items API

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-04-28 14:39:39 +02:00
Andy Butland 30a431f870 Merge branch 'release/15.4' into v15/dev 2025-04-28 14:37:26 +02:00
0ee9e81b01 V16: XHR requests do not report the underlying problem details object (#19160)
* fix: detects if a request contains a problemdetails object then maps that back to the UmbApiError

* feat: uses isProblemDetailsLike everywhere and avoids showing the user a big "detail" string

* feat: disables notifications for temp file upload to handle it manually in case of special server errors

* fix: use temporary file manager for dictionary to catch all errors

* fix: uses temporary file manager to upload avatars to handle all server errors

* feat: observe on allowed image types for user avatar

* Update src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file-manager.class.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* feat: located the status code 413 directly now that the management api supports it out-of-the-box

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-28 12:13:03 +00:00
93ec790c64 Add segments support for Publish entity action (#19178)
* fix: the publish action should use the publish modal

* feat: allows the publish modal to handle invariant data

* chore: rearrange the unpublish action & modal so they are one-for-one alike with publishing

* Updated acceptance tests - add steps to interact with publish modal

* Added tests for publish variant content

* Bumped version of test helper

* handle segment

* include segments in success notification

* include segments in success message

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
2025-04-28 11:50:20 +00:00
Mads RasmussenandGitHub b760101a17 remove entity actions for new content (#19163) 2025-04-28 13:26:50 +02:00
59d30a7c77 V16: Show modal when publishing invariant content (#19159)
* fix: the publish action should use the publish modal

* feat: allows the publish modal to handle invariant data

* chore: rearrange the unpublish action & modal so they are one-for-one alike with publishing

* Updated acceptance tests - add steps to interact with publish modal

* Added tests for publish variant content

* Bumped version of test helper

* feat: adds text to indicate you are about to publish

---------

Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
2025-04-28 11:05:41 +00:00
Lotte PitcherandSebastiaan Janssen 3579c4ac9e readme shield for forum 2025-04-28 12:57:51 +02:00
Sebastiaan Janssen 671751b618 Merge branch 'v15/dev' into contrib 2025-04-28 12:55:17 +02:00
Mads RasmussenandGitHub bd921ca9e0 Remove success notification after file rename (#19149) 2025-04-28 08:39:06 +00:00
Kenn JacobsenandGitHub 012480f396 Output the correct error status code from the Management API (#19175) 2025-04-28 07:53:44 +00:00
Niels LyngsøandGitHub 5ff7205ed0 preset values for decimal and integer + securing that we can set a value of 0 (#19173) 2025-04-28 07:41:11 +00:00
Mads RasmussenandGitHub 6bda0b9d4d remove sort children success notification from repository (#19166) 2025-04-28 08:52:35 +02:00
Mads RasmussenandGitHub 2d32437779 Entity action error handling (#19171)
* handle errors

* handle error

* entity action error handling

* error handling

* fix
2025-04-28 08:51:26 +02:00
Kenn JacobsenandGitHub 462fd483e9 Include "Accept-Segment" in the "vary" header (#19167) 2025-04-28 06:42:11 +02:00
Kenn JacobsenandGitHub 4f883b6714 Make culture specific update dates work again (#19145) 2025-04-27 08:26:15 +02:00
Nhu DinhandGitHub 3b6e4a96f1 V15 QA Added acceptance tests for bulk trash dialog (#19125)
* Added tests for bulk trash content dialog

* Updated tests for trash content dialog

* Added tests for trash and bulk trash media dialog

* Moved trash content tests into a folder

* Bumped version

* Make trash tests run in the pipeline

* Make trash tests run in the pipeline

* Fixed comments

* Reverted npm command
2025-04-26 09:59:03 +07:00
9b81bf50ab Prevent input-document type search from returning element types when not allowed (#19155)
* prevent document type picker search from returning element types when not allowed

* rename + fix modal rejection

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-04-25 14:17:32 +00:00
Mads RasmussenandGitHub 35721cb663 Bring back error notification when trying to delete a folder with items (#19157)
* clean up

* throw real error from repo error

* only dispatch executed event if the action was successful
2025-04-25 14:59:35 +02:00
Niels LyngsøandGitHub 6ed969c64c do not re-set promise on clear (#19152) 2025-04-25 14:51:07 +02:00
Niels LyngsøandGitHub 3c27e856b2 use new element name (#19158) 2025-04-25 12:46:23 +00:00
mole 127c4a6482 Use windows instead 2025-04-25 12:36:44 +02:00
Mads RasmussenandGitHub 6db062cb7a Remove success notification after document type export (#19151) 2025-04-25 10:18:06 +00:00
Niels LyngsøandGitHub 0349dce9c4 Implement a Context Proxy (Fix Provide event handling across proxies) (#19141)
* use it self as host

* implement UmbContextProxy

* rename to UmbContextProxyController
2025-04-25 10:10:29 +00:00
Mads RasmussenandGitHub 3d0ebfd35c Prevent Culture and Hostnames modal close on error (#19133)
* only close modal if update is succesfull

* remove positive notification
2025-04-25 11:30:47 +02:00
mole c2447907ac Pin nuget publish stages to 22.04 2025-04-25 11:23:42 +02:00
mole e7a5a5623d Revert "Use DotnetCoreCLI instead of NuGetCommand"
This reverts commit 6b8a30c3ff.
2025-04-25 11:19:48 +02:00
Niels LyngsøandGitHub c8b2ae58e0 make repositories remember their store (#19148) 2025-04-25 08:57:54 +00:00
Niels LyngsøandGitHub 514a92bd35 Fix Document-Data-Resolver to avoid Promise Rejection Error (#19142)
* improve clean-up

* fix init of UmbDocumentItemDataResolver

* make properties private

* adjust fallback logic for more performant approach
2025-04-25 10:33:29 +02:00
mole 6b8a30c3ff Use DotnetCoreCLI instead of NuGetCommand 2025-04-25 09:57:17 +02:00
Andy ButlandandGitHub 85c4fe8214 Removed population of Urls on media response model and obsoleted property (#19130)
* Obsolete Urls property on MediaResponseModel and no longer populate.

* Updated OpenApi.json

* Update client-side types.

* Client updates to align document and media URL display.

* Fixed UI linting errors.

* Fixed UI linting errors (2).

* Fixed UI linting errors (3).

* Removed change to ClientOptions.
2025-04-25 05:16:56 +00:00
ba0dcfa773 Avoid hybrid cache usage when traversing unpublished ancestors in a published context (non preview) (#19137)
* Filter Available should not return items without published ancestors when not in preview

* Update unittests mocks

* Internal documentation and minor code tidy.

* Tidied up integration tests and added new tests for the added method.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-24 21:07:40 +02:00
mole ef9a6e1821 Merge remote-tracking branch 'origin/v15/dev' into v16/dev 2025-04-24 13:19:21 +02:00
b4528cf963 Fixed error with reflection on integration test configure builder attributes, so integration tests can be created outside of the Umbraco integration test project (#19077)
* Fixed error with reflection on integration test configure builder attributes, so integration tests can be created outside of the Umbraco integration test project.

* Fix nullability

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-04-24 13:18:29 +02:00
cb1ec988ce V15: Ensure elements cache is cleared on subscribers in load balanced scenarios (#19128)
* Clear elementscache from cache refreshers

* Add very simple test ensuring the elements cache is cleared

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-04-24 13:15:30 +02:00
Kenn JacobsenandGitHub 8caf4ae3e0 Retrofit ContentEditingBaseBuilder to match new create/update models (#19129) 2025-04-24 12:28:05 +02:00
Warren BuckleyandMads Rasmussen 97ded97fc7 Add 'ManifestWithDynamicConditions' to ManifestHeaderApp so Header Apps can be conditionally shown/loaded (#19124) 2025-04-24 12:26:58 +02:00
Warren BuckleyandGitHub 15643135ba Add 'ManifestWithDynamicConditions' to ManifestHeaderApp so Header Apps can be conditionally shown/loaded (#19124) 2025-04-24 12:25:58 +02:00
b48d989659 V16: Removes all generic Created, Saved, and Deleted notifications (#19119)
* feat: removes all generic Created, Saved, and Deleted notifications

* Comment out the notification checks in acceptance tests

* Bumped version of test helper

* Fixed publish with descendants tests

* Cleaned up

* Bumped version of test helper

---------

Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-04-24 11:50:49 +02:00
Sven Geusensandkjac 297ceaf0aa Remove fake null checks as they are no longer needed after merge into v16 (#19109) 2025-04-24 11:46:41 +02:00
Jacob OvergaardandGitHub 1e99d6f609 V16: Adds texts for unpublish & publish with descendants (#19118)
* feat: adds new texts for 'unpublished' action

* chore(mock): adds missing endpoints for mock data

* feat: removes old, deprecated, and hardcoded messages for unpublish

* fix: publish actions should not fail just because the notification context might not be available

* feat: the unpublish actions should mimick the publish actions

* chore(mock): adds mock endpoints for 'publish with descendants'

* feat: moves 'publish with descendants' notifications to calling workspace

* feat: adds DK translations

* feat: adds different notification for unpublishing invariant content
2025-04-24 11:32:53 +02:00
Jacob OvergaardandGitHub b8c2a3366f V16: Bumps core dependencies openapi-ts and uuid to latest (#19127)
* removes `server-api-dev` script that acts weird with base urls after upgrade of client-fetch

* build(deps): updates client-fetch and uuid dependencies
2025-04-24 11:11:36 +02:00
6d330a30eb V16: Context Api can unprovide Contexts (#19113)
* make consume return undefined

* make consume return undefined

* a few more undefined context handlings

* unprovide context

* rename

* jsdocs

* refactor UmbContextBase to not use generic types

* reset target on disconnect

* posible undefined context

* callback with undefined when disconnected

* update comment

* correct types

* correct error handling

* do not throw an error when missing

* always return permitted to onChange callback

* fix not existing store

* fix resetting structure manager

* fix requestAuditLogs

* support gone context

* support context not begin present

* use UMB_ENTITY_WORKSPACE_CONTEXT for right typing

* correct type to use UMB_SUBMITTABLE_WORKSPACE_CONTEXT

* correct context consumption

* fix tests

* fix tests

* catch modal registration that has been destroyed

* catch

* handle context unprovide

* more clean up

* fix context consumption

* Update repository-details.manager.ts

* enable store to be undefined

* enable UmbRelationTypeDetailRepository store to be undefined

* remove log

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-04-24 08:57:02 +00:00
Jacob Overgaard 607207b13b chore: updates OpenApi.json 2025-04-24 10:34:49 +02:00
Kenn JacobsenandGitHub 1dd5fe3cbc Ensure the default segment is always included in API responses (#19126) 2025-04-24 09:46:30 +02:00
Niels LyngsøandGitHub 80bf2314c6 upgrade client dependencies (#19121)
* update npm

* run icon script

* generate server end-points
2025-04-24 08:52:26 +02:00
Niels LyngsøandGitHub 8342d4b94f minor styling adjustments (#19122) 2025-04-24 08:51:17 +02:00
Mads RasmussenandGitHub 60eaef5590 Fix UI creation and updating of Document Blueprints (#19123)
* fallback to save preselected variants

* Update content-detail-workspace-base.ts
2025-04-24 07:58:08 +02:00
Andy ButlandandGitHub 3dd32642e2 Updated server-side dependencies to latest versions for Umbraco 16 (#19117)
* Updated dependencies to latest versions.

* Fixed breaking changes following dependency updates.

* Limited NUnit updates to within the current major.

* Fixed failing delivery API contract integration test.
2025-04-23 20:05:41 +02:00
Mads RasmussenandGitHub 513f980e5c Split "Sort Children"-logic to remove "illegal" import from core to packages (#19105)
* wip sortChildrenOfContent kind

* export types

* add modal token + consts

* Update manifests.ts

* add content tree item model

* wip use umb-table element

* set as prop

* render sort icon

* prevent selection when sortable

* remove unused

* clean up

* reflect sortable prop

* start implementing sortChildrenOfContent

* render name and create date

* handle date ordering

* remove unused

* clean up

* fix grab and grabbing styling for sortable table rows

* render label when no children

* Update sort-children-of-content-modal.element.ts

* fix styling of load more

* only allow sorting when all items are loaded

* Update index.js
2025-04-23 15:12:48 +00:00
024a450377 Added integration tests for publishing service with invalid content (#19095)
* Added integration tests for publishing service with invalid content.

* Amend test to new create/update models

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-04-23 15:09:39 +00:00
Niels LyngsøandGitHub 9246ecbb08 reject init when document-type failed to load (#19092) 2025-04-23 14:21:30 +00:00
b330395db0 Content Type inheritance (#19034)
* content type nesting

* TODOs

* repository detail manager

* todo

* implement unlimited compositions

* a little refactor

* warn

* clear state

* refactor to use unique

* note

* code corrections to match with types

* unique type for Array State

* implement usedForInheritance and editedTypes for Structure Manager and Compositions

* rename method

* Update repository-details.manager.ts

* avoid type casting

* align naming

* do not await

* fix race condition when switching document types fast

* remove test prop

* Update manifests.ts

* UmbMediaTypeWorkspaceContext Routes for inheritance

* import

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-04-23 15:05:32 +02:00
2cf28271cd Service refactoring to "fully" enable segments (#19114)
* Refactor serverside content editing to support all variance combinations

* Fix build errors

* Reintroduce the tests ignored by #19060

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-04-23 14:54:51 +02:00
53b94a8f57 Add async methods to IFileType (#19116)
* Add GetChecksumStreamAsync and GetLengthAsync

* Obsolete CanSetPhysical, Set and GetVirtualPath

* Updated obsolete messages to reference Umbraco 18

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-23 11:38:03 +00:00
bdb7baf946 Add report for bidirectional module imports (#19112)
* add report for bidirectional module imports

* remove duplicates

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-04-23 11:35:35 +00:00
b898eb6e03 Removed population of Urls on document response model and obsoleted property (#19030)
* Removed population of Urls on document response model and obsoleted property.

* Updated readme for acceptance tests to show how to run a single test.

* Removed URLs from document models on the client-side and fixed issue with link picker stil using legacy URLs response data.

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-04-23 10:58:38 +00:00
Niels LyngsøandGitHub 3187d99d23 Custom validator example take2 (#19093)
* declare type and constant

* implement for example

* commit example

* fix document data

* make rte blocks optional

* remove blocks from this mock data

* fix mock data for RTE

* comment and destroy method implementation

* set to 8

* update comments

* remove console.log

* host may be undefined

* prevent duplicate messages
2025-04-23 12:47:19 +02:00
Andy ButlandandGitHub 7c98af558d Allow for configuration of log file names (#19074)
* Added configuration for the log file name and format.

* Added unit test for LoggingConfiguration.

* Rely on configuration validation to verify supported log file format arguments.

* Fixed unit test failing on build pipeline.
2025-04-23 12:28:51 +02:00
Lee KelleherandGitHub 1bddcb8d39 Imports umb-app-logo (#19103)
for displaying the backoffice logo
2025-04-23 10:11:36 +00:00
Niels LyngsøandGitHub bb3b8b2255 Merge pull request #19060 from umbraco/v15/feature/select-segment
Feature: Segments
2025-04-23 10:55:05 +02:00
85b58f2015 Custom serialization for ValidationProblemDetails to allign paths in custom and mvc error messages (#19111)
* Rowrked #18771 with a more brute force solution

* Fixes class name. Adds unit test verifying behaviour.

* Corrected test name.

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-23 10:17:18 +02:00
d568e981ab V16: Implement cache tags (#19101)
* Implement tags for content cache

* Implement tags for media cache

* Refactor to only use cache and media tags

* Remove from DI

* Cleanup

* Update Nuget packages

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Change description to be more precise

* Minor code tidy: indents, static methods where possible, made tags methods a little terser.

* Fixed according to review

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-23 10:08:08 +02:00
Niels LyngsøandGitHub 808e56beec Merge branch 'v16/dev' into v15/feature/select-segment 2025-04-23 10:07:37 +02:00
Andreas Zerbst 85cba7e8cb Updated locator 2025-04-23 10:02:41 +02:00
Andreas Zerbst dcf601b44e Bumped version of testHelpers 2025-04-23 10:02:26 +02:00
Niels Lyngsø 4114342de2 add observe alias 2025-04-23 09:38:10 +02:00
Niels LyngsøandGitHub 5b76d3bc04 Merge branch 'v16/dev' into v15/feature/select-segment 2025-04-23 09:32:21 +02:00
Niels LyngsøandGitHub 18a8e3bde5 implement readonly mode for umb-property-editor-ui-document-type-picker (#19089) 2025-04-23 07:12:56 +00:00
Niels LyngsøandGitHub 8849647dcd declare type and constant (#19091) 2025-04-23 07:08:08 +00:00
fcddba5c73 Update version of MiniProfiler.AspNetCore.Mvc to align with MiniProfiler.Shared. (#19107)
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-04-23 07:59:51 +02:00
64f1e17479 Segment support for the Delivery API (#19082)
* Segment support for the Delivery API

* Do not apply empty strings as variance.

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-04-23 05:45:04 +00:00
Kenn JacobsenandGitHub 4a768b694e Merge branch 'v16/dev' into v15/feature/select-segment 2025-04-23 07:12:07 +02:00
Sven GeusensandGitHub c42237ecfa Remove fake null checks as they are no longer needed after merge into v16 (#19109) 2025-04-23 07:09:00 +02:00
Mads Rasmussen b794392df8 Delete Segments.cs 2025-04-22 15:16:49 +02:00
Mads Rasmussen 09d1615e60 only show culture options when unpublishing 2025-04-22 15:06:07 +02:00
Mads Rasmussen 7d4d8c9a79 Update document-publishing.workspace-context.ts 2025-04-22 15:01:46 +02:00
Mads Rasmussen 78877bea57 correct variant selection in save modal 2025-04-22 14:44:16 +02:00
kjac 8ef061b768 Ignore failing tests for now (will be fixed in a follow-up PR) 2025-04-22 14:13:43 +02:00
kjac 3521549ff3 Fix build errors 2025-04-22 14:10:45 +02:00
Niels Lyngsø 39046c35af refactor to remove 2025-04-22 14:08:06 +02:00
Niels Lyngsø b4f26a8ffe style "open-split-view" 2025-04-22 14:01:43 +02:00
Mads Rasmussen bdabaa80d3 Update workspace-split-view-variant-selector.element.ts 2025-04-22 13:47:01 +02:00
Mads Rasmussen 1f63e7d41b Update workspace-split-view-variant-selector.element.ts 2025-04-22 13:45:14 +02:00
Niels Lyngsø 366e8d6809 html refactor + restyling 2025-04-22 13:38:22 +02:00
Mads Rasmussen bcafffdbf0 enforce allowNonExistingSegmentsCreation config 2025-04-22 13:31:20 +02:00
Mads Rasmussen f725ea8019 remove todo 2025-04-22 12:33:29 +02:00
Kenn JacobsenandGitHub 548970a27f Merge branch 'v16/dev' into v15/feature/select-segment 2025-04-22 12:07:04 +02:00
Mads Rasmussen 6c6e1f7336 do not render toggle if there are no segment variant options 2025-04-22 11:22:03 +02:00
Andy Butland 1dc9f8540d Merge branch 'v16/dev' of https://github.com/umbraco/Umbraco-CMS into v16/dev 2025-04-22 10:01:05 +02:00
Andy Butland 6987515cbe Merge remote-tracking branch 'origin/v15/dev' into v16/dev
# Conflicts:
#	version.json
2025-04-22 09:52:59 +02:00
Andy Butland 8e87f2260c Bumped version in dev branch to 15.5.0-rc. 2025-04-22 09:52:10 +02:00
Mads Rasmussen 2fc5880d7d Update property-workspace-view-settings.element.ts 2025-04-22 09:47:26 +02:00
Andy Butland 927e4d8cad Merge branch 'release/15.4' into v15/dev 2025-04-22 09:45:15 +02:00
Niels LyngsøandGitHub fb39711571 give tiptap a invalid border color to fit with other inputs in invalid state (#19090) 2025-04-22 08:43:12 +01:00
Andy Butland 225f4d3e09 Merge remote-tracking branch 'origin/v15/dev' into v16/dev 2025-04-22 09:33:07 +02:00
Mads Rasmussen a290601e5e fix property shared labels in content type workspace 2025-04-22 09:30:58 +02:00
Lotte PitcherandGitHub cd71e5666a Incorrect forum and security urls when raising issue (#19080) 2025-04-22 06:51:08 +02:00
Niels Lyngsø 141a4a4678 Improve error 2025-04-21 20:24:58 +02:00
Niels Lyngsø 74a9b8aae7 JSDocs for Validation Context 2025-04-21 20:24:17 +02:00
Sven GeusensandGitHub c86a6fa8e5 V15/fix/sub variant block deletion (#18802)
* Fix

* Editors with access should be able to clear a blocklist value

* Writeup around block element level variation

* Dissallow values to be removed a limited language user does not have permissions to

* Remove commented out code

* improved comments

* Improve expose list for limited language access sub variant block lists
2025-04-21 10:30:12 +02:00
Lee KelleherandGitHub f69f257d12 Refines umb-localize rendering (#19075) 2025-04-17 14:45:40 +02:00
b1795da0ee Adds searchResultItem element for Media items (#19058)
* Adds `searchResultItem` for Media

Includes "trashed" state tag

* Removes trailing whitespace from manifest name

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-17 07:57:19 +00:00
Lee KelleherandGitHub 38af101605 Adds search to Document Type picker (#19062)
* Loosens the guard for an empty `query`

* Adds search to Document Type picker

* Document Type Search Provider: adds support for querying element types

* Adds `pickerSearchResultItem` element for Document Types
2025-04-17 09:25:06 +02:00
Lee KelleherandGitHub aa89eed3aa V16: Chore: Search modal code sweep (#19061)
* Removes trailing whitespace from manifest names

* Refactored default `umb-search-result-item` element

- Reverted `elementName` constant
- Replaced fallback hashtag inline SVG with "icon-shape-hexagon"
- Added "extra" div (for UI consistency)
- Reworked CSS rules

* Search modal: replaced inline icons

* Search modal: refactored markup

* Search modal: removed font-size

for consistency with the rest of the backoffice.
2025-04-17 09:24:32 +02:00
Lee KelleherandGitHub bb41647d91 Dynamic Root: refactor to use UMB_ANCESTORS_ENTITY_CONTEXT (#19032) 2025-04-17 09:23:49 +02:00
235a951f31 Transparent Focal Point (#19047)
* make focal point transparent

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-image-cropper/image-cropper-focus-setter.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove background color

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-17 09:22:52 +02:00
Lee KelleherandGitHub 804995e59e Content Picker Search: Option to exclude trashed items (#19064)
* Document Picker: support for excluding trashed items

* Media Picker: support for excluding trashed items
2025-04-17 09:21:10 +02:00
Lee KelleherandGitHub 5544823b97 Adds searchResultItem for Document Type (#19059)
Includes "Element Type" tag.
2025-04-17 09:20:12 +02:00
Lee KelleherandGitHub b9cf156e5a Update community forum links (#19065)
* Help menu: fixes Our Umbraco link

* Changes forum link from Our Umbraco

to the new Community Forum website.

* Small fixes in the Log Viewer Message

* Help Menu: flattens structure

for tighter UI.

* Replaced hot-linked favicon images

with built-in icons.
Except for Microsoft Bing.

* Corrected "Search Umbraco Forum using Google" link
2025-04-17 09:17:25 +02:00
Lee KelleherandGitHub 2fcf1c7812 Adds trashed/draft state to document search result items (#19057)
* Corrected class name

* Reverted `elementName` constant

* Replaced `UmbAppLanguageContext` type usage

with `typeof UMB_APP_LANGUAGE_CONTEXT.TYPE`.

* Refactored `render` method

- "Trashed", adds tag + faded text + strike-through
- "Draft", adds tag + faded text
- Replaced fallback hashtag icon with "icon-document"
- Reworked CSS rules
2025-04-17 09:16:30 +02:00
Niels LyngsøandGitHub a9043a543e align validation with new fetch client (#19071) 2025-04-17 09:15:54 +02:00
Niels LyngsøandGitHub cd83cb2852 Merge branch 'v16/dev' into v15/feature/select-segment 2025-04-16 22:39:31 +02:00
Niels Lyngsø b2ab769edc change varying labels in Content Type Designer 2025-04-16 22:01:46 +02:00
Mads RasmussenandGitHub 59cad092ae Cleanup last known self imports (#19067)
* clean up self imports in workspace module

* clean up media type self imports

* fix self imports in property action module

* fix self imports in propety editor module

* Update index.js

* lower threshold
2025-04-16 19:33:25 +00:00
Niels Lyngsø 70bdabf9d6 clean up unused parts 2025-04-16 20:56:10 +02:00
Niels Lyngsø 3030006e4f correct error message 2025-04-16 20:48:32 +02:00
Andy ButlandandGitHub 1ccb5cc09e Removes tree actions from tree selection in duplicate document dialog. (#19053) 2025-04-16 18:21:39 +01:00
Niels LyngsøandGitHub 4561394283 Merge branch 'v16/dev' into v15/feature/select-segment 2025-04-16 18:05:26 +02:00
Mads Rasmussen 6038428f79 rename 2025-04-16 15:21:11 +02:00
Mads Rasmussen d52d3aa642 add todo 2025-04-16 15:18:07 +02:00
Mads Rasmussen 20d763f443 render toggle if segmentation is enabled in the config 2025-04-16 15:17:00 +02:00
Jacob Overgaard c63ed69ee2 Merge branch 'v15/dev' into v16/dev 2025-04-16 14:54:50 +02:00
Jacob Overgaard 12ca71558a Merge branch 'release/15.4' into v15/dev 2025-04-16 14:48:09 +02:00
Jacob Overgaard 25fffd4173 Merge remote-tracking branch 'origin/release/15.4' into v15/dev 2025-04-16 14:47:02 +02:00
Lee KelleherandGitHub 2b6f9fb9c4 V16: Chore: Deprecate getManifest() methods (#19056)
* Deprecates `getManifest()` methods

Resolution is to use the `.manifest` property instead.

* Revised the deprecation message to improve clarity
2025-04-16 14:35:50 +02:00
Lee KelleherandGitHub 0eac3952a6 Code sweep (#19055)
Markup and style tidy-up and consistency.
Import ordering.
2025-04-16 14:34:49 +02:00
Mads Rasmussen b87e8d90e4 remove unused code 2025-04-16 14:33:09 +02:00
Jacob Overgaard 889bd0b6e4 fix a bad merge 2025-04-16 14:07:42 +02:00
Mads Rasmussen 6033daff3b add label for shared cultures and segments 2025-04-16 13:44:10 +02:00
Lee KelleherandGitHub 4cec19625f Corrects UmbLocalizationController usage in coments/docs (#19052) 2025-04-16 13:15:25 +02:00
Mads Rasmussen cc25027e65 Update element-data-manager.ts 2025-04-16 12:31:32 +02:00
Mads Rasmussen f91c0568d1 temp remove 2025-04-16 12:31:24 +02:00
Mads Rasmussen d391cff254 move 2025-04-16 11:22:49 +02:00
Mads Rasmussen 63485bca15 Update content-data-manager.ts 2025-04-16 10:49:11 +02:00
Mads Rasmussen 64915eea92 Update content-detail-workspace-base.ts 2025-04-16 10:49:05 +02:00
Mads Rasmussen fbdf69e680 Update content-data-manager.ts 2025-04-16 10:25:56 +02:00
Mads Rasmussen 13109d7342 use new tryExecute 2025-04-16 09:39:23 +02:00
Mads Rasmussen e988c5a450 move fields to variant interface 2025-04-16 09:33:40 +02:00
Mads Rasmussen eddf06e773 Merge branch 'v16/dev' into v15/feature/select-segment 2025-04-16 09:29:28 +02:00
761c76143d Make the entity search service async (#19048)
* Make the entity search service async

* Update src/Umbraco.Core/Services/IIndexedEntitySearchService.cs

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-15 14:20:31 +00:00
Kenn JacobsenandGitHub 96c0509719 Content search abstractions to facilitate new search in the backoffice (#19046) 2025-04-15 16:18:42 +02:00
Mads RasmussenandGitHub fcc8e2fe3a Chore: Temp solution to remove user circular imports (#19021)
* remove user and document/media circular imports

* fix code order

* change MAX_CIRCULAR_DEPENDENCIES

* remove all comments from content before checking for imports

* fix self import

* fix self imports
2025-04-15 13:18:14 +00:00
Jacob Overgaard dab3975d2e Merge branch 'v15/dev' into v16/dev 2025-04-15 14:47:51 +02:00
Migaroez beb60065bb Merge branch 'release/15.4' into v15/dev 2025-04-15 14:40:19 +02:00
Mads RasmussenandGitHub 3cd3abe5c8 Fix document module self import (#19035)
* fix document self import

* lower SELF_IMPORTS_THRESHOLD

* Update index.js

* Update index.js
2025-04-15 10:46:33 +00:00
Mads RasmussenandGitHub e6ab1d9a6b Move + Rename input-collection-configuration element to input-content-type-collection-configuration (#19041)
* move to content-type module

* make name more explicit

* add total to text

* update threshold

* remove completed todo
2025-04-15 09:27:06 +00:00
Mads RasmussenandGitHub 37e25c3b2b fix for member and member type (#19037) 2025-04-15 10:48:19 +02:00
Mads RasmussenandGitHub bfa9cab1cf Update theme.context.ts (#19036) 2025-04-15 10:47:58 +02:00
4087f3fab7 V16: Split media handling from UmbDropzoneManager (#19031)
* move media handling into separate class

* override manager + remove deprecated code

* remove export

* fix order

* fix export of consts

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/dropzone/media-dropzone.manager.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix imports

* fix wrong dropzone manager instance

* remove unused

* remove unused

* lower MAX_CIRCULAR_DEPENDENCIES

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-15 09:52:05 +02:00
Jacob Overgaard e9b0486988 Merge branch 'v15/dev' into v16/dev 2025-04-15 09:43:56 +02:00
Jacob Overgaard 7e57396960 Merge branch 'contrib' into v15/dev 2025-04-15 09:21:11 +02:00
Andy ButlandandGitHub 83fe87ca88 Clarified "too many" entries validation message. (#19040) 2025-04-15 06:34:58 +00:00
Andy ButlandandGitHub ae078bf96b Adds some missing mime types to ensure uploaded audio and video displays with preview. (#19039) 2025-04-15 08:03:10 +02:00
6455f96e51 CONTRIBUTING.md - fix incorrect link to contributing-first-issue.md (#19038)
Co-authored-by: Andrew Lacey <AndrewL@if.co.nz>
2025-04-15 06:35:10 +02:00
Mads RasmussenandGitHub 906285120e Dont check for imports in comments (#19026)
* remove all comments from content before checking for imports

* lower treshold
2025-04-14 18:50:20 +00:00
Andy ButlandandGitHub 76e2103551 Make sure not to early return when verifying ancestor path is published without completing scope (#19029)
* Make sure not to early return when verifying ancestor path is published without completing scope.

* Added comment.
2025-04-14 17:45:57 +02:00
797db55f73 Content client package (#18978)
* scaffold content package

* move content module files

* move content type module files

* update module paths

* fix imports and registration

* import package

* move content collection condition to content module

* align naming

* use consts

* fix imports

* fix import

* change circular threshold

* adjust threshold

* build the correct modules for content package

* Update package-lock.json

* Update index.js

* Update package-lock.json

* Update index.js

* move UmbPropertyStructureWorkspaceContext token and interface

* move UmbWorkspaceContentTypeAliasConditionConfig to content-type module

* fix self import

* fix self imports

* Update content-workspace-context.interface.ts

* remove type from import

* add readOnlyGuard to interface

* remove dependency on content

* move property type module into content package

* update package.json + tsconfig

* import manifests

* move build config

* Update index.js

* lint corrections

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-04-14 14:25:03 +00:00
340ae6c474 Document 3rd Party Licenses (#19027)
* specifies the license for base64-js

* specifies the license for router-slot

* specifies the license for contentment/bytes

* adds a general third-party notices file for all direct dependency libraries

* merge separate licenses for icon packs into NOTICES.txt

* updates lee kelleher permission

* updates the name of DOMPurify

* adds Element Internals Polyfill

* capitalize names

* Update src/Umbraco.Web.UI.Client/src/packages/core/utils/bytes/bytes.function.ts

Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>

* adds babel

* adds eslint

* adds hey-api/openapi-ts

* adds open web components

* adds playwright

* adds rollup

* adds storybook

* adds cross-env

* adds glob

* adds globals

* adds madge

* adds msw

* adds playwright-msw

* adds prettier

* adds remark-gfm

* adds svgo

* adds tiny-glob

* adds tsc-alias

* adds typedoc

* adds typescript

* adds typescript-eslint

* adds typescript-json-schema

* adds vite-plugin-static-copy

* adds vite-tsconfig-paths

* adds web component analyzer

* adds rollup-plugin-esbuild

* adds rollup-plugin-import-css

* adds rollup plugins as general license

---------

Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
2025-04-14 16:01:14 +02:00
Sebastiaan Janssen 449c94f08d Merge branch 'v15/dev' into contrib 2025-04-14 14:22:36 +02:00
83b92666ac Use maximum available value for JSON serialization depth (#19001)
* Use maximum available value for JSON serialization depth.

* Updated unittests with best practices

---------

Co-authored-by: Migaroez <geusens@gmail.com>
2025-04-14 13:50:19 +02:00
8604163c91 Fix dropzone style circular imports (#19024)
* implement standalone

* remove unused style export

* Update src/Umbraco.Web.UI.Client/src/packages/media/dropzone/components/input-dropzone/input-dropzone.element.ts

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-04-14 09:22:29 +00:00
Henrik GedionsenandSebastiaan Janssen b7bf30744a Use GetIdsFromPathReversed to avoid allocating the string values of the integers parsed 2025-04-14 11:19:08 +02:00
dependabot[bot]andJacob Overgaard 9e97f6028b Bump vite from 6.2.5 to 6.2.6 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.5 to 6.2.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.6
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-14 11:01:59 +02:00
dependabot[bot]andJacob Overgaard 8ba3a4d926 Bump vite from 6.2.5 to 6.2.6 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.5 to 6.2.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.6
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-14 10:22:22 +02:00
Jacob OvergaardandGitHub 3939742917 V16: Replace legacy/fetch with @hey-api/client-fetch (#19002)
* feat: adds new backend-api and http-client packages and generates the api with @hey-api/client-fetch

* feat: maps generic T back to promise to avoid usage of 'any'

* feat: sets up baseUrl and auth for the new client

* feat: gets the api base url from server context instead of the http client

* feat: gets the api base url from server context instead of the http client

* feat: allows undefined token for xhr requests

* feat: changes the response object to be either type T directly (to support @hey-api/client-fetch) or the given type if the response does not contain a 'data' object

* revert interface

* feat: creates an api return type to comply with @hey-api/client-fetch

* feat: maps T back to the data model for non-api types

* feat: simplify api response to return the promise you sent to it with an optional error object

* feat: moves http related modules to the core package

* feat: updates the required type of the client for the api interceptors

* docs: removes invalid property

* feat: adds request parameters to documents

* feat: adds request parameters to imaging

* feat: adds return type to item-server-data-source-base

* feat: adds request parameters to webhooks

* feat: adds request parameters to users

* feat: renames all `requestBody` to `body` to conform with new client-fetch

* feat: uses query to take parameters in

* feat: adds data source response to tree types

* feat: adds request parameters to templating

* feat: adds request parameters to templating

* feat: adds request parameters to telemetry

* feat: adds request parameters to tags

* feat: adds request parameters to examine management

* feat: adds request parameters to relations

* feat: adds request parameters to packages

* feat: catches new api errors that are direct problem details objects

* feat: adds default interceptor to handle Umb-Generated-Resource headers

* feat: uses an error interceptor specifically to catch errors to avoid overhead

* feat: adds request parameters to members

* Revert "feat: uses an error interceptor specifically to catch errors to avoid overhead"

This reverts commit 7ffb7b29bf.

* feat: adds request parameters to media

* feat: adds request parameters to log viewer

* feat: adds request parameters to languages

* feat: adds request parameters to health check

* feat: adds request parameters to oembed

* feat: adds request parameters to documents

* feat: adds request parameters to redirect management

* feat: adds request parameters to blueprints

* feat: adds request parameters to dictionary

* feat: adds request parameters to data types

* feat: adds request parameters to temporary file

* feat: instructs delete methods to return an unknown value

* feat: allows default value to be unknown

* feat: adds request parameters to culture

* chore: import path

* feat: adds correct models to mocks

* feat: adds correct models to installer and upgrader

* feat: adds correct models to mocks

* chore: forgot to move ignore line

* chore: ignores generated files in eslint

* chore: removes old generated files

* feat: moves network connection status manager back into the main app to avoid imports from core

* chore: update imports

* feat: generate API for login screen without relying on the backoffice

* feat: uses the generated models on the login screen

* feat: sets 'credentials' to 'include' and adds it back to openapiconfiguration to avoid a breaking change

* adds back in commands moved to a workspace

* chore: vscode workspace settings formatted and useFlatConfig added for better compatibility
2025-04-14 10:21:42 +02:00
684790df70 Chore: Add script to check for "illegal" imports (#18992)
* stop webhook module from importing itself

* wip script to list all module imports from a folder

* Update package.json

* fix ufm

* fix tip tap

* order by name

* fix stylesheet module

* fix self import

* fix self import

* pass folder as a variable

* implement folder variable

* allow to pass module name + prettify log output

* check for imports from core to packages and report error

* add comments

* run as part of test

* Update package.json

* add threshold

* Update index.js

* add report of module self imports

* Update index.js

* Update index.js

* Update src/Umbraco.Web.UI.Client/devops/module-dependencies/index.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove self imports in /extension-api

* fix order

* fix self imports

* fix self import

* fix self imports

* fix self imports

* fix collection self import

* fix self imports

* fix self import

* Update collection-pagination.element.ts

* Update entity-action.extension.ts

* fix self imports

* lower threshold

* fix self imports

* fix self imports

* fix self imports

* fix merge

* fix tree self imports

* Update sort-children-of-modal.element.ts

* Update section.context.ts

* change threshold

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-14 07:55:20 +00:00
Nhu DinhandGitHub 7fe6971a61 V15 Updated acceptance tests for unsupported invariant content item with variant blocks (#18919)
* Updated tests for invariant block grid with variant blocks

* Updated tests for invariant block list with variant blocks

* Updated tests for invariant document with variant blocks

* Bumped version

* Changed npm command

* Updated isValidationMessageVisible

* Fixed name

* Fixed comments

* Reverted npm command
2025-04-12 08:59:31 +00:00
16ee7227ae Feature: Document Property Value Permission (#18997)
* add property visibility state manager

* implement in structure manager

* filter properties based on visibility

* wip document type structure permissions

* rename

* register entity permission for document type property

* add entity permission for media type property

* pass fallback permissions to document granular permissions

* set as preset

* clean up

* wip document type property picker

* add preset value

* Update input-document-type-structure-granular-user-permission.element.ts

* move files

* rename

* Update input-document-value-granular-user-permission.element.ts

* remove temp test

* Update manifests.ts

* remove unused

* Update input-document-value-granular-user-permission.element.ts

* rename see permission + add write permission

* fix missing type

* require property type unique

* add unique to property type

* rename to property type

* map to unique

* deprecate id on property type

* return unique from property picker

* more explicit naming

* use type

* render detail

* Update input-document-value-granular-user-permission.element.ts

* wip modal flow

* clean up

* add headlines

* hide actions

* pass preset value

* add edit permission method

* include property in permission name

* add read and write managers

* implement read and write state managers

* Update content-type-structure-manager.class.ts

* enforce property permissions

* Storage for granular permissions at property type level

* add guards

* make variant property version

* Rename server models to include "property"

* generate server types

* add permissionType to model

* add mappers to user group permission data

* add mapper to current user permission data

* destroy

* clear state

* use permission type for guard check

* add permission type

* require specific permission type

* use correct schema type

* add mappings

* clean up

* log errors

* fix mapping

* null check for icon

* use fallback if there is no forDataModel

* add translations

* sort group alphabetically

* add empty state for no verbs

* organize folders

* always require unique and variant id

* Allow storing empty lists of verbs

* pass variant id to all states

* Remove empty verbs

* add alias to name

* prevent picking the same property type multiple times

* fix lint errors

* fix create state by observing variant options

* move to workspace context

* Update document-property-value-user-permission.workspace-context.ts

* Update content-editor-properties.element.ts

* clean up

* Rename models (last time, promise!)

* Add migration for default document property value permissions

* generate new server models

* update after model changes

* Correct the default permission identifiers

* Add default permissions to newly created DBs

* Add validation and clean-up

* rename to visibility state

* rename to view

* add helpers

* apply to blocks

* Update document-property-value-user-permission.workspace-context.ts

* disable view and write state by default

* add tests for start and stopping a state

* throw errors if adding to a state that is not running

* export consts

* export consts

* fix circular

* fix circular

* set the entity type when setting values

* only apply for block in document values

* split logic

* start states for document blocks

* only apply states when state is running

* Fixed typos in test method names.

* add readonly type

* Enforce: AllowEditInvariantFromNonDefault configuration (#18758)

* add read only state

* handle read only property state in properties element

* prevent editing shared props on non default

* enforce configuration

* clean up

* set variant id

* move to property module

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>

* remove unnecessary messages

* make sure to destroy consumer

* Thoughts as TODO

* use Entry type

* use Entry type

* get rid of things not yet released

* clean up

* use generic methods

* TODO comment

* use generic observable

* catch if not found

* move variant id out of property type

* mega refactor temp commit

* Guard Manager

* set readOnly as a property on property editors

* further rename

* remove property state managers

* revert state manager

* fix sorting rule

* mega rename and correction

* refactor properties elements

* todo note

* clean up

* impl

* mega refactor moving permission guards to workspace

* rename

* type change

* rearrange

* correct import

* fix tests

* correct tests

* reset viewGuards block

* type correction

* refactor read only for user permissions setting

* todo note

* align property element

* await promise

* impl view guard property filtering

* correct const name

* fix fallback user permissions in mock data

* correct property type id mock data

* toggle permissions example

* complex permission

* Move migration to 16.0.

* rename fallBackToDisallowed to fallbackToNotPermitted

* clean up setReadOnlyStateForUserPermission

* capital o

* align read only naming

* rename method

* add js docs

* remove unused

* correct method name

* add js docs

* add js docs

* camel case function

* fix eslint problems

* camelcase const

* align method names

* remove unused

* fix host

* fix spelling mistake

* align naming

* fix spelling mistake

* add alias

* use read only state methods

* camel case function

* correct method name

* add js docs

* camelcase function

* camel case function

* align method names

* change method name wording

* Include document property value permissions in the current user's aggregated permissions.

* use is read only

* delete unused

* fix implementation of AllowEditInvariantFromNonDefault

* don't know what is happening here. Local is it lower on github it is higher

* Update document-workspace.context.ts

* revert to v16 dev

* simplify if statement

* make it explicit that these are ui only permissions

* add action label for read

* remove duplicates

* use read instead of browse

* align description

* use document instead of node

* make the base class abstract

* extend in test

* Update guard.manager.base.test.ts

* fix example

* style adjustment

* group styling

* refactor guard rule resolving

* remove imports

* remove console.log

* improve disconnected context consumer rejection message

* fix publishableVariantsFilter

* Update document-workspace.context.ts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-11 14:16:59 +02:00
Niels LyngsøandGitHub 9e9c8c986c set working directory (#18995) 2025-04-11 09:09:45 +00:00
Niels LyngsøandGitHub 3210c304fe fix appending to a froozen object (#19003) 2025-04-11 10:33:21 +02:00
Niels LyngsøandGitHub 63f2fabb5f clean up unnessecary redirect code (#19007) 2025-04-11 07:44:39 +00:00
Andy ButlandandGitHub 9ef2b37be4 Ensure dates read from the database are treated as local when constructing entities (#18989)
* Ensure dates read from the database are treated as local when constructing entities.

* Fixed typos in comments.
2025-04-11 09:32:05 +02:00
Nhu DinhandGitHub 516d62a348 V15 Added acceptance tests for the mandatory property editor in a content or a block (#18920)
* Added tests for mandatory checkboxlist in a content

* Added tests for mandatory dropdown in a content

* Added tests for mandatory media picker in a content

* Added tests for mandatory radiobox in a content

* Added tests for block grid with mandatory property editors

* Added tests for block list with mandatory property editors

* Bumped version

* Cleaned up

* Changed npm command

* Fixed comments

* Fixed comments

* Reverted
2025-04-11 03:13:36 +00:00
Andy ButlandandGitHub 21283245f1 Merge pull request #18993 from umbraco/v16/merge-from-15
Merges v15/dev to v16/dev.
2025-04-10 10:28:50 +02:00
Andy Butland b02b201cab Re-applied obsoletions to tracked references repository.
Re-applied modal handling for rollback.
2025-04-10 09:52:48 +02:00
Andy Butland 0c2485adf9 Post-merge fixes. 2025-04-10 07:16:00 +02:00
Andy Butland 1bb2837254 Post-merge fixes. 2025-04-10 07:12:34 +02:00
Andy Butland 0281d800d0 Post-merge fixes. 2025-04-10 07:04:29 +02:00
Andy Butland ecbfc72323 Merge branch 'v15/dev' into v16/merge-from-15
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/PublishedCache/RebuildPublishedCacheController.cs
#	src/Umbraco.Cms.Api.Management/Factories/UserPresentationFactory.cs
#	src/Umbraco.Core/Persistence/Repositories/ITrackedReferencesRepository.cs
#	src/Umbraco.Core/Services/ContentEditingService.cs
#	src/Umbraco.Core/Services/DataTypeService.cs
#	src/Umbraco.Core/Services/IContentEditingService.cs
#	src/Umbraco.Core/Services/IDataTypeService.cs
#	src/Umbraco.Core/Services/ITrackedReferencesService.cs
#	src/Umbraco.Core/Services/RelationService.cs
#	src/Umbraco.Core/Services/TrackedReferencesService.cs
#	src/Umbraco.Infrastructure/Examine/Deferred/DeliveryApiContentIndexHandleContentTypeChanges.cs
#	src/Umbraco.Infrastructure/Examine/DeliveryApiIndexingHandler.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TrackedReferencesRepository.cs
#	src/Umbraco.Web.UI.Client/src/external/backend-api/src/sdk.gen.ts
#	src/Umbraco.Web.UI.Client/src/mocks/data/document-blueprint/document-blueprint.data.ts
#	src/Umbraco.Web.UI.Client/src/mocks/data/document/document.db.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/modal-registration/modal-route-registration.controller.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/route/route.context.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/route/route.interface.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/route/router-slot.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/model.ts
#	src/Umbraco.Web.UI.Client/src/packages/data-type/reference/repository/data-type-reference.server.data.ts
#	src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/repository/document-publishing.server.data-source.ts
#	src/Umbraco.Web.UI.Client/src/packages/documents/documents/rollback/entity-action/rollback.action.ts
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.Common/Builders/UserGroupBuilder.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Core/Services/TemporaryFileServiceTests.cs
2025-04-09 22:45:56 +02:00
Kenn JacobsenandGitHub ff58fbd2b1 Make it possible to disable Examine indexes by composition (#18988) 2025-04-09 18:13:18 +02:00
Jacob OvergaardandGitHub 4778501a6e V16: Installer does not proceed from last step (#18981)
* fix: moves logic from installation step to context in order not to destroy the host for the request

* chore: removes console.warn
2025-04-09 16:40:54 +01:00
Niels Lyngsø ff30b4f686 Merge branch 'contrib' into v15/dev 2025-04-09 16:56:48 +02:00
dependabot[bot]andJacob Overgaard 6bca91a52f Bump koa from 2.15.3 to 2.16.1 in /src/Umbraco.Web.UI.Client
Bumps [koa](https://github.com/koajs/koa) from 2.15.3 to 2.16.1.
- [Release notes](https://github.com/koajs/koa/releases)
- [Changelog](https://github.com/koajs/koa/blob/master/History.md)
- [Commits](https://github.com/koajs/koa/compare/2.15.3...v2.16.1)

---
updated-dependencies:
- dependency-name: koa
  dependency-version: 2.16.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-09 15:57:36 +02:00
164b80af0e Display content type names on dynamic node query steps (#18742)
* Display content type names on dynamic node query steps.

* Refactored to use `UmbRepositoryItemsManager` observable

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-04-09 11:47:25 +00:00
10e56a52f3 V16: Removes TinyMCE (server-side) (#18913)
* Create new migration

* Migrate UI to tiptap

* remember to overwrite toolbar

* Add setting to disable migration

* Add default extensions when migrating

* Remove places where editorUI alias is used

* Remove more tinyMCE stuff

* Make sure that blocks also works

* Reverted files from bad merge

* bring back value converters

* Class name casing

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-04-09 10:00:59 +00:00
+8 3bd66b89e1 Merge branch 'v15/dev' into v16/dev (#18971)
* Only prevent the unpublish or delete of a related item when configured to do so if it is related as a child, not as a parent (#18886)

* Only prevent the unpubkish or delete of a related item when configured to do so if it is related as a child, not as a parent.

* Fixed incorect parameter names.

* Fixed failing integration tests.

* Use using variable instead to reduce nesting

* Applied suggestions from code review.

* Used simple using statement throughout RelationService for consistency.

* Applied XML header comments consistently.

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>

* Feature: highlight invariant doc with variant blocks is unsupported (#18806)

* mark variant blocks in invariant docs as invalid

* implement RTE Blocks

* Fix pagination for users restricted by start nodes (#18907)

* Fix pagination for users restricted by start nodes

* Default implementation to avoid breakage

* Review comments

* Fix failing test

* Add media start node tests

* Fix issue preventing blueprint derived values from being scaffolded (#18917)

* Fix issue preventing blueprint derived values from being scaffolded.

* fix manipulating frooen array

* compare with variantId as well

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>

* ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com

* ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com

* ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com

* Remove admin permission on user configuration, allowing users with user section access only to manaage users and groups. (#18848)

* Tiptap RTE: Style Menu extension kind (#18918)

* Adds 'styleMenu' Tiptap toolbar extension kind

* Adds icons for `<h4>` and `<p>` tags

* Adds commands to HTML Global Attributes extension

for setting the `class` and `id` attributes.

* Renamed "default-tiptap-toolbar-element.api.ts" file

The "element" part was confusing.

* Toolbar Menu: uses correct `item` value

* Cascading Menu: adds localization for the label

* Adds `label` attribute to UUI components

for accessibility.

* Toolbar Menu: uses correct `appearance` value

* Removed unrequired `api` from Style Select

* Destructs the `item.data` object

* Ensure has children reflects only items with folder children when folders only are queried. (#18790)

* Ensure has children reflects only items with folder children when folders only are queried.

* Added supression for change to integration test public code.

---------

Co-authored-by: Migaroez <geusens@gmail.com>

* Only apply validation on content update to variant cultures where the editor has permission for the culture (#18778)

* Only apply validation on content update to variant cultures where the editor has permission for the culture.

* Remove inadvertent comment updates.

* Fixed failing integration test.

* Adds ancestor ID details on document tree and collection responses (#18909)

* Populate ancestor keys on document tree response items.

* Populate ancestor keys on document collection response items.

* Update OpenApi.json

* Use array of objects rather than Ids for the ancestor collection.

* Update OpenApi.json.

* Move publish with descendants to a background task with polling (#18497)

* Use background queue for database cache rebuild and track rebuilding status.

* Updated OpenApi.json and client-side types.

* Updated client to poll for completion of database rebuild.

* Move IBackgroundTaskQueue to core and prepare publish branch to run as background task.

* Endpoints for retrieval of status and result from branch publish operations.

* Poll and retrieve result for publish with descendants.

* Handled issues from testing.

* Rework to single controller for status and result.

* Updated client side sdk.

* OpenApi post dev merge gen

---------

Co-authored-by: Migaroez <geusens@gmail.com>

* Clear roots before rebuilding navigation dictionary (#18766)

* Clear roots before rebuilding navigation dictionary.

* Added tests to verify fix.

* Correct test implementation.

* Convert integration tests with method overloads into test cases.

* Integration test compatibility supressions.

* Fixes save of empty, invariant block list on variant content. (#18932)

* remove unnecessary code (#18927)

* V15/bugfix/fix route issue from 18859 (#18931)

* unique check

* unique for workspace empty path

* more unique routes

* Bump vite from 6.2.3 to 6.2.4 in /src/Umbraco.Web.UI.Client

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.4/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.4
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* removes autogenerated workflows

* make getHasUnpersistedChanges public (#18929)

* Added management API endpoint, service and repository for retrieval of references from the recycle bin (#18882)

* Added management API endpoint, service and repository for retrieval of references from the recycle bin.

* Update src/Umbraco.Cms.Api.Management/Controllers/Document/RecycleBin/ReferencedByDocumentRecycleBinController.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Removed unused code.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updated management API endpoint and model for data type references to align with that used for documents, media etc. (#18905)

* Updated management API endpoint and model for data type references to align with that used for documents, media etc.

* Refactoring.

* Update src/Umbraco.Core/Constants-ReferenceTypes.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixed typos.

* Added id to tracked reference content type response.

* Updated OpenApi.json.

* Added missing updates.

* Renamed model and constants from code review feedback.

* Fix typo

* Fix multiple enumeration

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>

* Skip lock tests

* Look-up redirect in content finder for multi-lingual sites using path and legacy route prefixed with the integer ID of the node with domains defined (#18763)

* Look-up redirect in content finder for multi-lingual sites using path and legacy route prefixed with the integer ID of the node with domains defined.

* Added tests to verify functionality.

* Added reference to previous PR.

* Referenced second PR.

* Assemble URLs for all cultures, not just the default.

* Revert previous update.

* Display an original URL if we have one.

* Bump vite from 6.2.4 to 6.2.5 in /src/Umbraco.Web.UI.Client

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.4 to 6.2.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.5/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add raw value validation to multiple text strings property editor (#18936)

* Add raw value validation to multiple text strings property editor

* Added additional assert on unit test and comment on validation logic.

* Don't remove items to obtain a valid value

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Integration tests for content publishing with ancestor unpublished (#18941)

* Resolved warnings in test class.

* Refactor regions into partial classes.

* Aligned test names.

* Variable name refactoring.

* Added tests for unpublished paths.

* Adjust tests to verify current behaviour.

* Cleaned up project file.

* fix circular icon import (#18952)

* remove segment toggle for elements (#18949)

* Fix modal route registration circular import (#18953)

* fix modal route registration circular import

* Update modal-route-registration.controller.ts

* V15/fix/18595 (#18925)

* fix for #18595

* updates the en.ts

* Avoid unneeded Dictionary operations (#18890)

* Avoid some heap allocations

* Remove unneeded double seek

* Avoid allocating new empty arrays, reuse existing empty array

* Avoid allocating strings for parsing comma separated int values (#18199)

* Data type References UI: Workspace + Delete (#18914)

* Updated management API endpoint and model for data type references to align with that used for documents, media etc.

* Refactoring.

* Update src/Umbraco.Core/Constants-ReferenceTypes.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixed typos.

* generate server models

* add extension slot

* register data type reference info app

* add reference data mappers

* Added id to tracked reference content type response.

* Updated OpenApi.json.

* Added missing updates.

* generate new models

* update models

* register ref item

* remove debugger

* render types

* register member type property type ref

* register media type property type ref

* Renamed model and constants from code review feedback.

* register reference workspace info app kind

* use kind for document references

* use kind for media references

* use kind for member references

* use deleteWithRelation kind when deleting data types

* fix manifest types

* fix types

* Update types.gen.ts

* update code to fit new server models

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Feature: discard changes for block workspace (#18930)

* make getHasUnpersistedChanges public

* Discard changes impl for Block Workspace

* fix 18367 (#18956)

* Merge commit from fork

* Prevent path traveral vulnerability with upload of temporary files.

* Used BadRequest instead of NotFound for invalid file name response.

* V15 QA Fixing the failing media acceptance tests (#18881)

* Fixed the function name due to test helper changes

* Updated assertion steps due to UI changes

* Added more waits

* Bumped version

* Increase timeout

* Reverted

---------

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>

* V15 QA added clipboard test for not being able to copy to root when block is not allowed at root (#18937)

* Added clipboard test

* Bumped version

* Updated to use the name

* Run all tests on the pipeline

* Reverted command

* build: adjusts circular ref number to 4

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
Co-authored-by: Migaroez <geusens@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Jacob Welander Jensen <64834767+Welander1994@users.noreply.github.com>
Co-authored-by: Henrik <hg@impact.dk>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2025-04-09 09:58:01 +02:00
Mads RasmussenandGitHub 10a70a8397 Move router-slot exports to @umbraco-cms/backoffice/router (#18962)
* move router-slot files to core/router

* remove external module

* generate tsconfig

* fix imports

* ignore lint errors

* ignore diff package
2025-04-09 08:45:20 +02:00
Mads RasmussenandGitHub af07c42120 Remove external base64-js module (#18969)
* move base64 folder into openid

* remove from package.json and tsconfig

* import from local module
2025-04-08 12:47:39 +00:00
64e8f34f0f V16: Adds server context to store information about paths (#18967)
* fix: straightens out unnecessary imports of components and re-exports them appropriately

* fix: imports repository from file directly

* feat: introduces a "server" package and moves UmbAppContext logic to UmbServerContext

* feat: updates all cases of `UmbAppContext` -> `UmbServerContext`

* build: adjusts MAX_CIRCULAR_DEPENDENCIES from 6 to 3

* Update src/Umbraco.Web.UI.Client/devops/circular/index.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* feat: removes unused interface

* build: adds server bundle to vite

* build: vite should build index barrel

* build: readjust to 5 to account for previous failed build

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-08 11:20:03 +00:00
Mads RasmussenandGitHub 6aa471479e Internalize uuid package (#18955)
* move uuid to core package package.json

* install

* remove external + generate tsconfig

* import from local node_modules

* temp accept uuid as import
2025-04-08 10:44:10 +00:00
Jacob Overgaard 8178dba674 build: set MAX_CIRCULAR_DEPENDENCIES to 6 2025-04-08 10:16:09 +02:00
Jacob Overgaard 385a8fecba build: adds another fail scenario to the circular checker if it encounters fewer dependencies than anticipated 2025-04-08 10:16:09 +02:00
Jacob Overgaard 84d8736b90 fix: removes circular dependency by stopping module from importing from itself 2025-04-08 10:16:09 +02:00
Jacob OvergaardandGitHub fd1761dcc1 V16: API error interceptor should return early if it will not execute (#18963)
* fix: resolves an unintended circular reference based on files being moved around

introduced in #18939

* fix: improves error handling to return early if interceptor does not catch a 500

* fix: adds try/catch around json parsing
2025-04-08 09:12:52 +01:00
dependabot[bot]andJacob Overgaard 10ecc99d74 Bump vite from 6.2.4 to 6.2.5 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.4 to 6.2.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.5/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 09:23:23 +02:00
Jacob Overgaard 6630220961 build: adjust number of max circulars to 7 2025-04-08 09:11:10 +02:00
Jacob OvergaardandGitHub e1f9219b93 V16: Updates openapi-ts client and deprecates tryExecuteAndNotify (#18939)
* build(deps-dev): bump @hey-api/openapi-ts from 0.61.3 to 0.66.1

* docs: adds information on how to configure new fetch-client

* feat: adds preliminary umb-prefixed error types

* fix: uses correct import path

* docs: jsdocs

* feat: optimises error reporting

* feat: maps functions into separate controllers

* feat: adds color to peek notification

* feat: moves the internal api interceptors controller and adds more interceptors

* feat: adds host to params

* feat: marks certain functions as deprecated

* feat: maps api errors to UmbErrors

* chore: removes deprecation console logs

* chore: allows any

* feat: maps xhr errors to umb errors

* feat: adds host to tryExecute

* feat: adjusts deprecation notifices and checks

* chore: adjusts deprecation notices

* chore: add .warn() to deprecation

* feat: updates login app repository

* feat: changes all `tryExecuteAndNotify` calls to `tryExecute`

* feat: copies helper functions to resources package and deprecates in notification package

* chore: removes unused imports

* feat: adds exports

* chore: removes controller that is no longer useful

* feat: marks _peekError as protected

* feat: adds support for error notifications (and to ignore them) and to cancel an ongoing request

* feat: eliminates duplicated logic in xhr controller

* feat: touches only the cloned response to allow interceptors downstream to unwrap the body

* feat: stores the host for async context

* feat: disables automatic notifications for validation data source

* feat: disables notifications where they are otherwise handled or ignored

* feat: removes deprecated code

* feat: eliminates a controller that only had a static method

* docs: adds jsdocs

* docs: adds jsdocs

* docs: adds jsdocs

* feat: returns umb-notifications response without modifying it

* feat: eliminates dependency on generated `ProblemDetails` type

* feat: eliminates dependence on generated `ApiError` type

* feat: eliminates dependence on generated `CancelError` type

* fix: removes dependency on CancelablePromise
2025-04-07 22:54:51 +01:00
Mads RasmussenandGitHub 6a36a797ad Fix confirm modal circular import (#18951)
* fix circular import for confirm modal

* Update open-modal.controller.ts
2025-04-07 11:40:57 +02:00
Lee KelleherandGitHub dc87cf800f Reverts removal of RTE Block Type Configuration property-editor (#18933)
I'd accidentally removed this in PR #18889.
Adding it back in to the "block-rte" package.
2025-04-04 14:04:45 +02:00
e0341f9d10 V16: Migrate TinyMCE data type configuration to Tiptap (#18843)
* Create new migration

* Migrate UI to tiptap

* remember to overwrite toolbar

* Add setting to disable migration

* Add default extensions when migrating

* Make sure that blocks also works

* Renamed classes to reference TinyMCE migration

* Defaults TinyMCE toolbar mapping to `null`

if we can't map to a known Tiptap toolbar extension (manifest alias),
then it may cause an issue with the toolbar rendering.

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-04-03 18:52:30 +00:00
Lee KelleherandGitHub 8754caa06f V16: Stylesheet Create Options (#18911)
* Adds `entityCreateOptionAction` extensions for Stylesheets

* Deprecates `umb-stylesheet-create-options-modal` and token.

* Corrected localization labels

to resolve failing acceptance test.

* Updated @umbraco/playwright-testhelpers to 16.0.0

* Removed redundant RTE Stylesheet acceptance tests
2025-04-03 16:30:21 +00:00
Jacob OvergaardandGitHub 7d7db6bb2b V16: Vite development optimizations (#18915)
* feat: resolve TODO by removing quiet option

* feat: exclude ./src/mocks from production build

* feat: load only msw when running through vite

* feat: optimise load order

* feat: handles mocked logos with virtual path

* feat: loads mocked service worker from virtual path

* feat: loads assets from virtual path

* feat: forces MSW=on for the static build

* build: adds storybook workflow copied over from the old backoffice repository

* build: limits where the build runs

* build: adds workflow to build a static version of the backoffice upon request

* build: excludes the `/umbraco/backoffice/assets` folder from navigation fallback just in case

* build: triggers run when the workflow file itself changes

* build: triggers run when package.json changes

* build: marks the 'contrib' branch as production

* build: activates static builds on preview/* labels

* build: bumps github checkout version

* build: updates key for backoffice web app

* build: updates key for storybook

* build: disables build for release branches to preseve on preview environments
2025-04-03 15:15:04 +01:00
Lee KelleherandGitHub c3709de1d3 V16: Removes RTE Stylesheets (client-side) (#18908)
* Removed Stylesheet RTE workspace view

* Removed Stylesheet RTE Rule components

* Removed Stylesheet RTE Rule Manager

* Removed Stylesheet RTE localizations

* Removed Stylesheet RTE mock data

* Aligns the Stylesheet code editor height

with the Scripts code editor.
2025-04-02 17:02:46 +02:00
7e46a1c148 V16: Removes TinyMCE (client-side) (#18889)
* Removed TinyMCE client-side code

* Replaces "MaxImageSizeConfiguration" with "Integer" property-editor

* Adds "Dimensions" property-editor

Promoted from TinyMCE package code.

* Updated Tiptap property-editor label

to remove the "[Tiptap]" suffix.

* Corrected Tiptap config localization keys

* Removed TinyMCE acceptance test

* Reverted Tiptap property-editor label

to add the "[Tiptap]" suffix back in.

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-04-01 17:00:27 +02:00
Mads Rasmussen 250ddf319e only show the local split view 2025-04-01 15:40:58 +02:00
Mads Rasmussen 015c0cfc16 indent segments 2025-04-01 15:39:21 +02:00
Mads Rasmussen 53be19cb00 auto expand parent culture 2025-04-01 15:33:10 +02:00
Mads Rasmussen 3a93c9b9a4 set segment variant name 2025-04-01 14:44:02 +02:00
Mads Rasmussen ff39e54ec6 adjust display name 2025-04-01 14:42:31 +02:00
Jacob Overgaard dbd9218c75 Merge branch 'v15/dev' into v16/dev 2025-04-01 14:03:40 +02:00
Mads Rasmussen 5a6d7326d8 render segment name in input 2025-04-01 13:27:18 +02:00
Mads Rasmussen c8e9beffa1 set name input to readonly for segments 2025-04-01 13:16:21 +02:00
Mads Rasmussen e064169df5 more explicit method name 2025-04-01 13:11:19 +02:00
Mads Rasmussen d87415099c align icon 2025-04-01 13:01:10 +02:00
Mads Rasmussen 34cfa3cb62 only render segments if culture is created 2025-04-01 12:48:32 +02:00
Mads Rasmussen 9e9b1efdf3 only show culture variant options in dialogs 2025-04-01 11:03:02 +02:00
Mads Rasmussen f309117223 nest segments under cultures 2025-04-01 10:53:42 +02:00
Jacob Overgaard d1ee95c7b1 Merge branch 'v15/dev' into v16/dev 2025-04-01 10:38:34 +02:00
Jacob Overgaard 7b4bfbb28e Merge branch 'v15/dev' into v16/dev 2025-04-01 10:31:59 +02:00
Mads Rasmussen 0ab024d7c1 remove duplicate tag 2025-04-01 10:17:37 +02:00
Mads Rasmussen 302b58e513 Merge branch 'v15/dev' into v15/feature/select-segment 2025-04-01 10:08:46 +02:00
00ec63a966 Todo cleanup of abstract service being aware of implementation types (#18832)
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-03-31 09:52:34 +00:00
Lee KelleherandGitHub 19123b4799 Removed deprecated methods from ITwoFactorLoginService (#18880) 2025-03-31 11:03:01 +02:00
Niels LyngsøandGitHub 3446b77d7d Feature: context consumer auto destroys if no callback + getContext options (#18835)
* consumer destroys when no callback

* getContext can be simplification

* JSDocs

* implement options to skipHost and pass context alias matches
2025-03-31 10:32:36 +02:00
kjac 8d9822ea70 Fix mapping errors for invariant editing 2025-03-31 07:06:23 +02:00
kjac 15f0f44ff5 Fix segment variant mapping from API 2025-03-30 14:05:07 +02:00
kjac 043b39d553 Allow for creating and editing segment variant documents 2025-03-30 13:02:00 +02:00
Niels Lyngsø 1e5d29e667 Merge remote-tracking branch 'origin/v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Core/Services/ITwoFactorLoginService.cs
#	src/Umbraco.Web.UI.Client/src/packages/media/dropzone/components/input-dropzone/input-dropzone.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/media/dropzone/dropzone-manager.class.ts
2025-03-28 13:00:56 +01:00
Mads Rasmussen 2ff11afa95 only show button ellipsis when there are culture variants 2025-03-28 10:15:24 +01:00
Mads Rasmussen e61541a2cf fix type errors 2025-03-28 10:00:48 +01:00
Mads Rasmussen d6b40ce526 send segments when saving a culture 2025-03-28 09:43:52 +01:00
Mads Rasmussen f63794737a use variant id class to check 2025-03-28 08:29:39 +01:00
Mads Rasmussen 9e5c7977da check for null segment for invariant option 2025-03-28 08:27:47 +01:00
Mads Rasmussen 64eb3cdf57 fix spelling mistake 2025-03-28 08:21:25 +01:00
Mads Rasmussen 6b60ff8ade remove default language tag 2025-03-28 08:06:02 +01:00
Mads Rasmussen e1e69aeec4 handle segmented data when saving 2025-03-28 08:02:53 +01:00
Mads Rasmussen 746ad55a0b fix name display values 2025-03-27 14:43:59 +01:00
Mads Rasmussen cb33afba3b support segments for route fallback 2025-03-27 14:13:37 +01:00
Mads Rasmussen 98fd90409e return empty array 2025-03-27 13:39:54 +01:00
Mads Rasmussen e8ba63bad4 only execute if we have proper values 2025-03-27 13:37:16 +01:00
Mads Rasmussen 5557ec4cd8 remove log 2025-03-27 11:35:32 +01:00
Mads Rasmussen dbf0e740d8 render label based on how to document varies 2025-03-27 11:34:40 +01:00
Mads Rasmussen 7a21cf5617 add observables to interface 2025-03-27 11:34:18 +01:00
Niels Lyngsø fdef134c3b lint fixes 2025-03-27 11:08:35 +01:00
Mads Rasmussen c21d160f52 render segment name 2025-03-27 10:59:50 +01:00
Nhu DinhandNiels Lyngsø bcaaf5a1f4 V15 Added acceptance tests for data type default configuration (#18740)
* Added tests for Approved Color default configuration

* Updated tests for Approved Color configuration

* Added tests for ChecklboxList configuration

* Added tests for Data type default configuration - part 1

* Added tests for data type configuration and updated tests due to test helper changes

* Added more steps to verify the default configuration

* Added tests for the default configuration and refactoring code

* Added steps to verify the TinyMCE default configuration

* Bumped version

* Fixed tests due to test helper changes

* Make all Data Type tests run in the pipeline

* Updated assertion steps

* Fixed format

* Bumped version

* Bumped version

* Comment failing tests

* Reverted npm command
2025-03-27 10:58:58 +01:00
Niels LyngsøandNiels Lyngsø d438d79b8c lint corrections (#18833) 2025-03-27 10:58:58 +01:00
0c7202c6d9 Fix bug uploading an image via the Media Picker is no longer automatically selected (#18667)
* Fix bug uploading an image via the Media Picker is no longer automatically selected

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts

Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* remove submit modal

* fix: avoids overriding the dropzone manager as that does not work with inheritance

* fix: set disabling of folders correctly

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-03-27 10:58:58 +01:00
Nhu DinhandNiels Lyngsø 361c9d9f97 V15 QA Added acceptance tests for user group default configuration (#18800)
* Updated userGroup tests due to test helper changes

* Added tests for user group default configuration

* Bumped version

* Fixed due to test helper changes

* Reverted npm command
2025-03-27 10:58:58 +01:00
Mads RasmussenandNiels Lyngsø 678bce697b fix preset logic (#18815) 2025-03-27 10:58:58 +01:00
Kenn JacobsenandNiels Lyngsø b008afbb27 Obsolete a few unused things. (#18814) 2025-03-27 10:58:57 +01:00
Niels LyngsøandNiels Lyngsø 11479b22b3 implement validation context (#18808) 2025-03-27 10:58:57 +01:00
Andy ButlandandNiels Lyngsø 1c6b7698c8 Fixed issue where siblings of type at route are omitted from the result. (#18796) 2025-03-27 10:58:57 +01:00
Sven GeusensandGitHub 8c5fe3d52b removed syslib003 & syslib0051 obsoleted code dependencies (#18827)
Followed guidance in https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslibxxxx
2025-03-27 10:47:07 +01:00
Mads Rasmussen b873288015 do not include segments in save options 2025-03-27 10:34:06 +01:00
Mads Rasmussen 2264ce8678 use alias in spec info 2025-03-27 10:23:00 +01:00
Mads Rasmussen f296d5d2b4 render name instead of alias 2025-03-27 10:16:49 +01:00
Mads Rasmussen bc9cc83eca Merge branch 'v15/feature/property-vary-by-segment' into v15/feature/select-segment 2025-03-26 19:47:16 +01:00
Mads Rasmussen 17c4a08ae1 Merge branch 'v15/dev' into v15/feature/property-vary-by-segment 2025-03-26 19:46:31 +01:00
Mads Rasmussen f1020436d1 only show default language tag for a language 2025-03-26 15:26:49 +01:00
Mads Rasmussen b21183c562 fix types 2025-03-26 15:20:59 +01:00
Mads Rasmussen 6d974a624d Merge branch 'v15/feature/property-vary-by-segment' into v15/feature/select-segment 2025-03-26 15:18:10 +01:00
Mads Rasmussen 6ba4b36514 Merge branch 'v15/dev' into v15/feature/property-vary-by-segment 2025-03-26 15:17:51 +01:00
Mads Rasmussen 30f1ec194e include segment in active variants 2025-03-26 15:14:37 +01:00
Mads Rasmussen 2801df3c6f cast type 2025-03-26 15:14:15 +01:00
Mads Rasmussen 666f9457f3 Update content-detail-workspace-base.ts 2025-03-26 13:40:02 +01:00
Mads Rasmussen 6e42c53d79 add culture for segments 2025-03-26 13:34:10 +01:00
Mads Rasmussen 7e713cab84 append segment to spec info 2025-03-26 13:29:51 +01:00
Mads Rasmussen 0ebe465e6f add segment info to model 2025-03-26 13:25:38 +01:00
Mads Rasmussen d583169642 make variant options for segments too 2025-03-26 11:51:43 +01:00
Mads RasmussenandGitHub 26d66a815a Move public access files to member-public-access module (#18793)
* move to member package

* fix imports

* add module to build

* split types and consts

* export types

* add export type

* add import type
2025-03-26 08:26:18 +00:00
Niels LyngsøandGitHub d93b0002ba avoid destroying before promise has resolved. (#18811) 2025-03-26 09:25:04 +01:00
Niels Lyngsø 12f4c17f85 fix failing e2e test 2025-03-26 08:46:43 +01:00
Niels Lyngsø fd4585fba7 fix ts merge conflict 2025-03-26 08:24:52 +01:00
Mads Rasmussen 721e6ccb0c clean up 2025-03-25 21:48:51 +01:00
Mads Rasmussen 45ff3c3a6f wip loading segment data 2025-03-25 21:42:29 +01:00
Mads Rasmussen 21a23b8057 render tag for vary by segment 2025-03-25 20:33:26 +01:00
Mads Rasmussen 04d8b29226 remove duplicates 2025-03-25 20:30:27 +01:00
Mads Rasmussen f76d093226 simplify labels 2025-03-25 20:30:20 +01:00
Mads Rasmussen b3055fa5ce use property-layout for appearance 2025-03-25 20:24:16 +01:00
Mads Rasmussen 7f089a630a render toggle for vary by segment 2025-03-25 20:20:15 +01:00
Andy Butland 7dc9cbd9b1 Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Factories/RelationTypePresentationFactory.cs
#	src/Umbraco.Core/Services/PropertyValidationService.cs
#	src/Umbraco.Web.UI.Client/utils/all-umb-consts/imports.ts
2025-03-25 17:56:50 +01:00
Mads RasmussenandGitHub f5c307b8f1 remove duplicate keys (#18787) 2025-03-25 09:41:50 +01:00
0b0a2dc251 Added v16 to run at midnight (#18785)
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
2025-03-25 11:06:33 +07:00
Niels LyngsøandGitHub 780f16e79b UX: Make discard changes button red (#18767)
* make discard button red

* change headline
2025-03-24 22:10:57 +01:00
Andy ButlandandGitHub fdea721a8e Move registration of delivery API component to infrastructure to resolve issue resolve it from controller. (#18777) 2025-03-24 13:25:06 +01:00
Niels Lyngsø 2fe83b5637 Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Core/Web/ICookieManager.cs
2025-03-21 19:42:15 +01:00
Lee KelleherandGitHub 9ee31367df V16: Removed deprecated client-side code (#18662)
* Removed duplicated "document-is-not-trashed.condition" code

* Removed deprecated code, marked for removal in Umbraco 15

(that we forgot about)

* Removed deprecated code, marked for removal in Umbraco 16

* Regenerated constants

* Reverted deletion
2025-03-21 18:56:52 +01:00
Andy ButlandandGitHub 825f791d01 Remove the non-controversial, straightforward obsoleted constructs for Umbraco 16 (#18661)
* Removed obsoletes from IConfigManipulator.

* Removed obsolete models builder extensions.

* Removed the obsolete ContentDashboardSettings.

* Removed the obsolete InstallMissingDatabase setting on GlobalSettings.

* Removed obsolete NuCache settings.

* Removed obsolete RuntimeMinificationSettings.

* Removed obsolete health check constant.

* Removed obsolete icon constant.

* Removed obsolete telemetry constant.

* Removed obsolete property and constructor on UmbracoBuilder.

* Removed obsolete constructor on AuditNotificationsHandler.

* Removed obsolete constructor on HTTP header health checks.

* Removed obsolete constructor on MediaFileManager.

* Removed obsolete GetDefaultFileContent on ViewHelper.

* Remove obsoleted methods on embed providers.

* Fix tests.

* Removed obsolete constructors on BlockEditorDataConverter.

* Removed obsolete SeedCacheDuration property on CacheSettings.

* Removed obsolete PublishCulture on ContentRepositoryExtensions.

* Removed obsolete MonitorLock.

* Removed obsolete synchronous HasSavedValues from IDataTypeUsageService and IDataTypeUsageRepository.

* Removed obsolete HasSavedPropertyValues from IPropertyTypeUsageService and IPropertyTypeUsageRepository.

* Removed obsolete methods in ITrackedReferencesService and ITrackedReferencesRepository.

* Removed obsolete DateValueEditor constructors.

* Removed obsolete GetAutomaticRelationTypesAliases.

* Removed obsolete constructor on TextOnlyValueEditor.

* Removed obsolete constructors on RegexValidator and RequiredValidator.

* Removed obsolete constructs on SliderValueConverter and TagsValueConverter.

* Removed obsolete GetContentType methods from IPublishedCache.

* Removed ContentFinderByIdPath.

* Removed obsolete constructor on DefaultMediaUrlProvider.

* Removed obsolete constructor on Domain.

* Removed obsolete constructor on PublishedRequest.

* Removed obsolete methods on CheckPermissions.

* Removed obsolete GetUserId from IBackOfficeSecurity.

* Removed obsolete methods on LegacyPasswordSecurity.

* Removed obsolete constructors on AuditService.

* Removed obsolete methods on IContentEditingService.

* Remove obsolete constructors and methods on ContentService/IContentService.

* Removed obsolete constructor in ContentTypeEditingService.

* Removed obsolete constructor in MediaTypeEditingService.

* Removed obsolete constructor in MemberTypeEditingService.

* Removed obsolete constructor in ContentTypeService.

* Removed obsolete constructors in ContentTypeServiceBase.

* Removed obsolete constructors and methods in ContentVersionService.

* Removed obsolete constructor in DataTypeUsageService.

* Removed obsolete constructor in DomainService.

* Removed obsolete constructor in FileService.

* Removes obsolete AttemptMove from IContentService.

* Removes obsolete SetPreventCleanup from IContentVersionService.

* Removes obsolete GetReferences from IDataTypeService.

* Removed obsolete SetConsentLevel from IMetricsConsentService.

* Removed obsolete methods from IPackageDataInstallation.

* Removed obsolete methods from IPackagingService.

* Removed obsolete methods on ITwoFactorLoginService.
Removed obsolete ITemporaryMediaService.

* Removed obsolete constructor from MediaService, MemberTypeService and MediaTypeService.

* More obsolete constructors.

* Removed obsoleted overloads on IPropertyValidationService.

* Fixed build for tests.

* Removed obsolete constructor for PublicAccessService, UserService and RelationService.

* Removed GetDefaultMemberType.

* Removed obsolete user group functionality from IUserService.

* Removed obsolete extension methods on IUserService.

* Removed obsolete method from ITelemetryService.

* Removed obsolete UdiParserServiceConnectors.

* Removed obsolete method on ICookieManager.

* Removed obsolete DynamicContext.

* Removed obsolete XmlHelper.

* Fixed failing integration tests.

* Removed obsoletes in Umbraco.Cms.Api.Common

* Removed obsoletes in Umbraco.Cms.Api.Delivery

* Removed obsoletes in Umbraco.Cms.Api.Management

* Removed obsoletes in Umbraco.Examine.Lucene

* Removed obsoletes in Umbraco.Infrastructure

* Fix failing delivery API contract integration test.

* Made integration tests internal.

* Removed obsoletes from web projects.

* Fix build.

* Removed Twitter OEmbed provider

* Removed obsolete constructor on PublishedDataType.

* Removed obsolete constructors on PublishedCacheBase.

* Removed the obsolete PropertyEditorTagsExtensions.

* Removed obsoletion properties on configuration response  models (#18697)

* Removed obsolete methods from server-side models.

* Update client-side types and sdk.

* Update client-side files.

* Removed obsoletion of Utf8ToAsciiConverter.ToAsciiString overload. (#18694)

* Removed obsolete method in UserService. (#18710)

* Removed obsoleted group alias keys from being publicly available. (#18682)

* Removed unneceessary ApiVersion attribute.

* Clean-up obsoletions on MemberService (#18703)

* Removed obsoleted method on MemberService, added future obsoletion to interface and updated all callers.

* Removed obsoletion on member service method that's not obsolete on the interface.
2025-03-21 17:02:31 +00:00
Jacob Overgaard fb3a56a240 Merge branch 'v15/dev' into v16/dev 2025-03-21 12:25:41 +01:00
Jacob Overgaard 0d1afcf3c7 Merge branch 'v15/dev' into v16/dev 2025-03-21 11:08:31 +01:00
Jacob Overgaard a82e0ca23a fix: add nullability check to modalManager 2025-03-21 11:07:59 +01:00
Andy Butland 663be397dc Merge branch 'v15/dev' into v16/dev 2025-03-21 09:11:06 +01:00
kjac 83aca5aa6e Merge branch 'v15/dev' into v16/dev 2025-03-20 14:52:35 +01:00
Niels Lyngsø 991b8bfb37 Merge branch 'v15/dev' into v16/dev 2025-03-18 14:42:44 +01:00
Niels Lyngsø 6c9ff96972 fix UmbContextConsumer 2025-03-18 14:41:01 +01:00
Niels Lyngsø 0d4acb440d fix context consumer test 2025-03-18 10:54:07 +01:00
Andy Butland 3f5898ba95 Merge branch 'v15/dev' into v16/dev 2025-03-17 15:49:20 +01:00
Niels Lyngsø 939552e9f1 Merge branch 'v15/dev' into v16/dev 2025-03-17 11:09:30 +01:00
Niels Lyngsø 0a7d0a8f8b Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-03-17 11:08:27 +01:00
Niels LyngsøandGitHub b9eb988d29 V16/feature: get context resolves in undefined if not found (#18611)
* implement getContext rejecter + allow for resolving in undefined

* fix test

* timeout concept

* adjustments

* adapt implementation

* ability to set timeoutFrame for faster test

* update

* make sure provider only provides when connected

* make sure action apis can fail without resolving

* make sure to await the arrival of the UMB_AUTH_CONTEXT

* no need to be async

* consume to stay up to date

* one rendering cycle approach

* adjusting context consumption part 1

* implementation adjustments

* correction patch 2

* correction patch 3

* correction batch 4

* correction batch 5

* correction batch 6
2025-03-14 14:06:45 +00:00
Andy Butland 9beb679dbf Merge branch 'v15/dev' into v16/dev 2025-03-13 10:43:42 +01:00
Andy Butland 9b3da86192 Merge branch 'v15/dev' into v16/dev 2025-03-12 12:29:09 +01:00
1d5a4dfa3a Chore: deprecate UmbPropertyValueChangeEvent for v.16 (#18455)
* deprecate

* fix import

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-03-11 13:51:49 +01:00
mole 9d7c2d4a82 add async keyword 2025-03-11 12:46:21 +01:00
Mads Rasmussen 0e561da146 Merge branch 'v15/dev' into v16/dev 2025-03-11 11:43:07 +01:00
Niels Lyngsø c8eb4f1d53 Merge branch 'v15/dev' into v16/dev 2025-03-10 16:54:38 +01:00
Niels Lyngsø 98bf623721 Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/PublishedCache/RebuildPublishedCacheController.cs
#	src/Umbraco.Core/Configuration/Models/ContentSettings.cs
2025-03-09 21:28:23 +01:00
13c788d6ec Add AsyncMigrationBase, update base classes and call async methods (#17057)
* Add AsyncMigrationBase, update base classes and call async methods

* Restored and obsoleted synchronous execution on IMigrationPlanExecutor.

* Resolved breaking changes.

* Fixed build.

* Further obsoletes.

* Fix build against v16/dev.

* Removed and obsolete code related to post-migrations.

* Removed service registration of unused interface.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-03 11:54:22 +01:00
780184e553 Remove UmbracoPath setting (#16037)
* Use require modifier instead of setting null-suppressed default values

* Only remove read-only properties when IgnoreReadOnlyProperties is set

* Obsolete UmbracoPath property and remove work-around for obsolete setter

* Remove UmbracoPath setting and use constant instead

* Remove usage of GetBackOfficePath

* Add IHostingEnvironment.GetBackOfficePath() extension method

* Add Constants.System.UmbracoPathSegment constant

* Update Constants.System XML docs

* Replace StringBuilder with string interpolation

Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>

* Fix syntax error

* Removed uses of obsoletes.

* Further obsolete messages.

* Cleaned up usings.

* Update src/Umbraco.Infrastructure/Install/FilePermissionHelper.cs

Co-authored-by: Ronald Barendse <ronald@barend.se>

---------

Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-03 07:38:30 +01:00
561d871677 Remove await Task.FromResult() and unnecessary async modifiers (#16535)
* Remove await Task.FromResult and unnecessary async modifiers

* Remove usage of await Task.WhenAll() to avoid deadlocks

* Fix code formatting

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-03 06:47:37 +01:00
Andy Butland 064a71240e Merge branch 'v15/dev' into v16/dev 2025-03-03 06:43:17 +01:00
Andy Butland 678e942a2e Merge branch 'v15/dev' into v16/dev 2025-02-21 10:01:15 +01:00
Andy Butland a76344ec4c Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Core/Configuration/Models/RuntimeSettings.cs
2025-02-20 09:33:29 +01:00
Jacob OvergaardandGitHub e77bac3088 V16: Allow MaxRequestLength to be specified as a long (#18141)
* feat: allows MaxFileSize to be specified as 64-bit rather than 32-bit to be able to accept larger files

the underlying kestrel architecture already accepts a `long` in ConfigureKestrelServerOptions.cs

* chore: removes unused configuration option

* chore: generate OpenApi.json
2025-01-29 06:31:24 +01:00
Jacob Overgaard 27afb3f0f3 Merge branch 'v15/dev' into v16/dev 2025-01-28 10:29:30 +01:00
822a8cc2f1 v16: Start removing scope references (#18074)
* Start removing scope references

* Update src/Umbraco.Infrastructure/Examine/UmbracoIndexConfig.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Make test-only ctor internal

* Fix tests

* Dont treat warnings as errors

* Disable package validation, as this is a major

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-22 21:19:12 +01:00
Jacob Overgaard 32792b4ba4 feat: removes deprecated setting HideBackOfficeLogo 2025-01-22 14:21:54 +01:00
Jacob Overgaard 849b98cbaf bump version to 16.0.0-rc 2025-01-22 14:21:19 +01:00
Jacob Overgaard 0b3836456e Merge branch 'v15/dev' into v16/dev 2025-01-22 14:20:34 +01:00
0d1cdd1bb4 Refactor setting arrays to sets (#16058)
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2024-12-02 15:50:23 +01:00
7919 changed files with 265906 additions and 143331 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ dotnet_style_predefined_type_for_locals_parameters_members = true:warning
dotnet_style_predefined_type_for_member_access = true:warning
# Modifier preferences
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#normalize-modifiers
dotnet_style_require_accessibility_modifiers = always:warning
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:warning
dotnet_style_readonly_field = true:warning
+10 -4
View File
@@ -9,7 +9,7 @@ In order to use Umbraco as a CMS and build your website with it, you should not
- Are you about to [create a pull request for Umbraco][contribution guidelines]?
- Are you trying to get to the bottom of a problem in your existing Umbraco installation?
If the answer is yes, please read on. Otherwise, make sure to head on over [to the download page](https://our.umbraco.com/download) and start using Umbraco CMS as intended.
If the answer is yes, please read on. Otherwise, make sure to head on over [to the releases page](https://releases.umbraco.com) and start using Umbraco CMS as intended.
## Table of contents
@@ -37,7 +37,7 @@ In order to work with the Umbraco source code locally, first make sure you have
### Familiarizing yourself with the code
Umbraco is a .NET application using C#. The solution is broken down into multiple projects. There are several class libraries. The `Umbraco.Web.UI` project is the main project that hosts the back office and login screen. This is the project you will want to run to see your changes.
Umbraco is a .NET application using C#. The solution is broken down into multiple projects. There are several class libraries. The `Umbraco.Web.UI` project is the main project that hosts the back office and login screen. This is the project you will want to run to see your changes.
There are two web projects in the solution with client-side assets based on TypeScript, `Umbraco.Web.UI.Client` and `Umbraco.Web.UI.Login`.
@@ -73,13 +73,19 @@ Just be careful not to include this change in your PR.
Conversely, if you are working on front-end only, you want to build the back-end once and then run it. Before you do so, update the configuration in `appSettings.json` to add the following under `Umbraco:Cms:Security`:
```
```json
"BackOfficeHost": "http://localhost:5173",
"AuthorizeCallbackPathName": "/oauth_complete",
"AuthorizeCallbackLogoutPathName": "/logout",
"AuthorizeCallbackErrorPathName": "/error"
"AuthorizeCallbackErrorPathName": "/error",
"BackOfficeTokenCookie": {
"SameSite": "None"
}
```
> [!NOTE]
> If you get stuck in a login loop, try clearing your browser cookies for localhost, and make sure that the `Umbraco:Cms:Security:BackOfficeTokenCookie:SameSite` setting is set to `None`.
Then run Umbraco from the command line.
```
+19 -19
View File
@@ -1,8 +1,8 @@
# Contributing to Umbraco CMS
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
👍🎉 First of all, thanks for taking the time to contribute! 🎉👍
These contribution guidelines are mostly just that - guidelines, not rules. This is what we've found to work best over the years, but if you choose to ignore them, we still love you! 💖 Use your best judgement, and feel free to propose changes to this document in a pull request.
These contribution guidelines are mostly just that - guidelines, not rules. This is what we've found to work best over the years, but if you choose to ignore them, we still love you! 💖 Use your best judgment, and feel free to propose changes to this document in a pull request.
We have a guide on [what to consider before you start](contributing-before-you-start.md) and more detailed guides at the end of this article.
@@ -12,56 +12,56 @@ This guide describes each step to make your first contribution:
1. **Fork**
Create a fork of [`Umbraco-CMS` on GitHub](https://github.com/umbraco/Umbraco-CMS)
Create a fork of [`Umbraco-CMS` on GitHub](https://github.com/umbraco/Umbraco-CMS)
![Fork the repository](img/forkrepository.png)
![Fork the repository](img/forkrepositorynew.png)
2. **Clone**
When GitHub has created your fork, you can clone it in your favorite Git tool or on the command line with `git clone https://github.com/[YourUsername]/Umbraco-CMS`.
When GitHub has created your fork, you can clone it in your favorite Git tool or on the command line with `git clone https://github.com/[YourUsername]/Umbraco-CMS`.
![Clone the fork](img/clonefork.png)
![Clone the fork](img/cloneforknew.png)
3. **Switch to the correct branch**
Switch to the `contrib` branch
Switch to the `main` branch
4. **Branch out**
Create a new branch based on `contrib` and name it after the issue you're fixing, For example: `v15/bugfix/18132-rte-tinymce-onchange-value-check`.
Create a new branch based on `main` and name it after the issue you're fixing. For example: `v15/bugfix/18132-rte-tinymce-onchange-value-check`.
Please follow this format for branches: `v{major}/{feature|bugfix|task}/{issue}-{description}`.
Please follow this format for branches: `v{major}/{feature|bugfix|task|qa|improvement}/{issue}-{description}`.
This is a development branch for the particular issue you're working on, in this case a bug-fix for issue number `18132` that affects Umbraco v.15.
This is a development branch for the particular issue you're working on, in this case, a bug-fix for issue number `18132` that affects Umbraco v.15.
Don't commit to `contrib`, create a new branch first.
Don't commit to `main`, create a new branch first.
5. **Build or run a Development Server**
You can build or run a Development Server with any IDE that supports DotNet or the command line.
You can build or run a Development Server with any IDE that supports .NET or the command line.
Read [Build or run a Development Server](BUILD.md) for the right approach to your needs.
Read [Build or run a Development Server](BUILD.md) for the right approach to your needs.
6. **Change**
Make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will [happily give feedback](contributing-first-issue.md#questions).
Make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will [happily give feedback](contributing-first-issue.md#questions).
7. **Commit and push**
Done? Yay! 🎉
Done? Yay! 🎉
Remember to commit to your branch. When it's ready push the changes to your fork on GitHub.
Remember to commit to your branch. When it's ready, push the changes to your fork on GitHub.
8. **Create pull request**
On GitHub, in your forked repository (`https://github.com/[YourUsername]/Umbraco-CMS`) you will see a banner saying that you pushed a new branch and a button to make a pull request. Tap the button and follow the instuctions.
On GitHub, in your forked repository (`https://github.com/[YourUsername]/Umbraco-CMS`), you will see a banner saying that you pushed a new branch and a button to make a pull request. Tap the button and follow the instructions.
Want to read further? [Creating a pull request and what happens next](contributing-creating-a-pr.md).
Would you like to read further? [Creating a pull request and what happens next](contributing-creating-a-pr.md).
## Further contribution guides
- [Before you start](contributing-before-you-start.md)
- [Finding your first issue: Up for grabs](contributing-before-you-start.md)
- [Finding your first issue](contributing-first-issue.md)
- [Contributing to the new backoffice](https://docs.umbraco.com/umbraco-backoffice/)
- [Unwanted changes](contributing-unwanted-changes.md)
- [Other ways to contribute](contributing-other-ways-to-contribute.md)
+2 -2
View File
@@ -4,11 +4,11 @@ contact_links:
url: https://github.com/umbraco/Umbraco-CMS/discussions/new?category=features-and-ideas
about: Start a new discussion when you have ideas or feature requests, eventually discussions can turn into plans
- name: ⁉️ Support Question
url: https://our.umbraco.com
url: https://forum.umbraco.com
about: This issue tracker is NOT meant for support questions. If you have a question, please join us on the forum.
- name: 📖 Documentation Issue
url: https://github.com/umbraco/UmbracoDocs/issues
about: Documentation issues should be reported on the Umbraco documentation repository.
- name: 🔐 Security Issue
url: https://umbraco.com/about-us/trust-center/security-and-umbraco/how-to-report-a-vulnerability-in-umbraco/
url: https://umbraco.com/trust-center/security-and-umbraco/how-to-report-a-vulnerability-in-umbraco/
about: Discovered a Security Issue in Umbraco?
+11 -2
View File
@@ -4,8 +4,8 @@
[![NuGet Version](https://img.shields.io/nuget/v/Umbraco.Cms)](https://www.nuget.org/packages/Umbraco.Cms)
[![Build status](https://img.shields.io/azure-devops/build/umbraco/Umbraco%2520Cms/301?logo=azurepipelines&label=Azure%20Pipelines)](https://umbraco.visualstudio.com/Umbraco%20Cms/_build?definitionId=301)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
[![Forum](https://img.shields.io/badge/help-forum-blue)](https://forum.umbraco.com)
[![Chat about Umbraco on Discord](https://img.shields.io/discord/869656431308189746?logo=discord&logoColor=fff)](https://discord.gg/umbraco)
[![Read what's going on in the Umbraco Discord chat now](https://img.shields.io/badge/read-discord-blue)](https://discord-chats.umbraco.com)
![Mastodon Follow](https://img.shields.io/mastodon/follow/110661369750014952?domain=https%3A%2F%2Fumbracocommunity.social)
@@ -38,9 +38,17 @@ Some important documentation links to get you started:
- [Getting to know Umbraco](https://docs.umbraco.com/umbraco-cms/fundamentals/get-to-know-umbraco)
- [Tutorials for creating a basic website and customizing the editing experience](https://docs.umbraco.com/umbraco-cms/tutorials/overview)
## Backoffice Preview
Want to see the latest backoffice UI in action? Check out our live preview:
**[backofficepreview.umbraco.com](https://backofficepreview.umbraco.com/)**
This preview is automatically deployed from the main branch and showcases the latest backoffice features and improvements. It runs from mock data and persistent edits are not supported.
## Get help
If you need a bit of feedback while building your Umbraco projects, we are [chatty on Discord](https://discord.umbraco.com). Our Discord server serves both a social space but also has channels for questions and answers. Feel free to lurk or join in with your own questions. Or just post your daily Wordle score, up to you!
If you need a bit of feedback while building your Umbraco projects, we are [chatty on Discord](https://discord.umbraco.com). Our Discord server serves as a social space for all Umbracians. If you have any questions or need some help with a problem, head over to our [dedicated forum](https://forum.umbraco.com/) where the Umbraco Community will be happy to help.
## Looking to contribute back to Umbraco?
@@ -52,3 +60,4 @@ You came to the right place! Our GitHub repository is available for all kinds of
Umbraco is contribution-focused and community-driven. If you want to contribute back to the Umbraco source code, please check out our [guide to contributing](CONTRIBUTING.md).
### Tip: You should not run Umbraco from source code found here. Umbraco is extremely extensible and can do whatever you need. Instead, [install Umbraco as noted above](#looking-to-install-umbraco) and then [extend it any way you want to](https://docs.umbraco.com/umbraco-cms/extending/).
+1 -1
View File
@@ -114,7 +114,7 @@ To declare the Published Cache Status Dashboard as a new manifest, we need to ad
},
conditions: [
{
alias: 'Umb.Condition.SectionAlias',
alias: UMB_SECTION_ALIAS_CONDITION_ALIAS,
match: 'Umb.Section.Settings',
},
],
+21 -3
View File
@@ -7,9 +7,26 @@ We recommend you to [sync with our repository][sync fork] before you submit your
GitHub will have picked up on the new branch you've pushed and will offer to create a Pull Request. Click that green button and away you go.
![Create a pull request](img/createpullrequest.png)
We like to use [git flow][git flow] as much as possible, but don't worry if you are not familiar with it. The most important thing you need to know is that when you fork the Umbraco repository, the default branch is set to `contrib`. This is the branch you should be targeting.
We like to use [git flow][git flow] as much as possible, but don't worry if you are not familiar with it. The most important thing you need to know is that when you fork the Umbraco repository, the default branch is set to `main`. This is the branch you should be targeting.
Please note: we are no longer accepting features for v8 and below but will continue to merge security fixes as and when they arise.
We welcome PRs for features and bugfixes for different versions according to the [published support and EOL schedule][support-and-eol].
We don't have rules for naming PRs - so name them as you prefer. At HQ we do have a best practice on clear and concise PR naming, so if you would like to use the format feel free to do so.
Our convention of doing it is:
_Area: Description (closes #IssueID)_
1. Start by specifying the area. Fx the feature name(UFM, Tiptap etc.) or specific section (migrations, relations, segmentation).
2. In your description, where applicable, mention type of PR (Build, Bump, Fix, Refactor etc.).
4. Good practise is to make sure you describe specifically the change and/or impact of change.<br>
Example: Writing "Extension Insights: Fixes CSS alignment" instead of "Fixed issue".
6. Add (closes #IssueID) behind description, if your PR resolves an issue.
That's it!
## The review process
[review process]: #the-review-process
@@ -48,4 +65,5 @@ There will be times that we really like your proposed changes and well finish
[making larger changes]: contributing-before-you-start.md#making-large-changes
[pr or package]: contributing-before-you-start.md#pull-request-or-package
[Core collabs]: contributing-core-collabs-team.md
[Core collabs]: contributing-core-collabs-team.md
[support-and-eol]: https://umbraco.com/products/knowledge-center/long-term-support-and-end-of-life/
+18 -15
View File
@@ -1,6 +1,8 @@
## Finding your first issue: Up for grabs
## Finding your first issue
Umbraco HQ will regularly mark newly created issues on the issue tracker with [the `community/up-for-grabs` tag][up for grabs issues]. This means that the proposed changes are wanted in Umbraco but the HQ does not have the time to make them at this time. We encourage anyone to pick them up and help out.
Umbraco HQ will regularly mark newly created issues on the issue tracker with [the `community/up-for-grabs` tag][up for grabs issues]. This means that the proposed changes are wanted in Umbraco but the HQ does not have the time to make them at this time. In adding the label we will endeavour to provide some guidelines on how to go about the implementation, such that it aligns with the project. We encourage anyone to pick them up and help out.
You don't need to restrict yourselves to issues that are specifically marked as "up for grabs" though. If you are running into a bug you have reported or found on the [issue tracker][issue tracker], it's not necessary to wait for HQ response. Feel free to dive in and try to provide a fix, raising questions as you need if you have concerns about the modifications necessary to resolve the problem.
If you do start working on something, make sure to leave a small comment on the issue saying something like: "I'm working on this". That way other people stumbling upon the issue know they don't need to pick it up, someone already has.
@@ -11,18 +13,18 @@ Great question! The short version goes like this:
1. **Fork**
Create a fork of [`Umbraco-CMS` on GitHub][Umbraco CMS repo]
![Fork the repository](img/forkrepository.png)
1. **Clone**
When GitHub has created your fork, you can clone it in your favorite Git tool
![Clone the fork](img/clonefork.png)
![Clone the fork](img/clonefork.png)
1. **Switch to the correct branch**
Switch to the `contrib` branch
Switch to the `main` branch
1. **Build**
@@ -30,7 +32,7 @@ Great question! The short version goes like this:
1. **Branch**
Create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp-12345`. This means it's a temporary branch for the particular issue you're working on, in this case issue number `12345`. Don't commit to `contrib`, create a new branch first.
Create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp-12345`. This means it's a temporary branch for the particular issue you're working on, in this case issue number `12345`. Don't commit to `main`, create a new branch first.
1. **Change**
@@ -40,7 +42,7 @@ Great question! The short version goes like this:
Done? Yay! 🎉
Remember to commit to your new `temp` branch, and don't commit to `contrib`. Then you can push the changes up to your fork on GitHub.
Remember to commit to your new `temp` branch, and don't commit to `main`. Then you can push the changes up to your fork on GitHub.
#### Keeping your Umbraco fork in sync with the main repository
[sync fork]: #keeping-your-umbraco-fork-in-sync-with-the-main-repository
@@ -57,10 +59,10 @@ Then when you want to get the changes from the main repository:
```
git fetch upstream
git rebase upstream/contrib
git rebase upstream/main
```
In this command we're syncing with the `contrib` branch, but you can of course choose another one if needed.
In this command we're syncing with the `main` branch, but you can of course choose another one if needed.
[More information on how this works can be found on the thoughtbot blog.][sync fork ext]
@@ -77,7 +79,7 @@ You can get in touch with [the core contributors team][core collabs] in multiple
- If there's an existing issue on the issue tracker then that's a good place to leave questions and discuss how to start or move forward.
- If you want to ask questions on some code you've already written you can create a draft pull request, [detailed in a GitHub blog post][draft prs].
- Unsure where to start? Did something not work as expected? Try leaving a note in the ["Contributing to Umbraco"][contrib forum] forum. The team monitors that one closely, so one of us will be on hand and ready to point you in the right direction.
- Unsure where to start? Did something not work as expected? Try leaving a note in the [forum][forum]. The team monitors that one closely, so one of us will be on hand and ready to point you in the right direction.
<!-- Local -->
@@ -88,6 +90,7 @@ You can get in touch with [the core contributors team][core collabs] in multiple
[sync fork ext]: http://robots.thoughtbot.com/post/5133345960/keeping-a-git-fork-updated "Details on keeping a git fork updated"
[draft prs]: https://github.blog/2019-02-14-introducing-draft-pull-requests/ "Github's blog post providing details on draft pull requests"
[contrib forum]: https://our.umbraco.com/forum/contributing-to-umbraco-cms/
[forum]: https://forum.umbraco.com/
[Umbraco CMS repo]: https://github.com/umbraco/Umbraco-CMS
[up for grabs issues]: https://github.com/umbraco/Umbraco-CMS/issues?q=is%3Aissue+is%3Aopen+label%3Acommunity%2Fup-for-grabs
[up for grabs issues]: https://github.com/umbraco/Umbraco-CMS/issues?q=is%3Aissue+is%3Aopen+label%3Acommunity%2Fup-for-grabs
[issue tracker]: https://github.com/umbraco/Umbraco-CMS/issues
+223
View File
@@ -0,0 +1,223 @@
# **Contributing to Localization in the Backoffice**
Do you want to help keep our translations accurate and up to standard? 🌍✨
Your input makes a real difference! By reviewing, refining, or suggesting improvements, you ensure that our translations remain clear, consistent, and user-friendly for everyone.
## **How Can I Contribute?**
To contribute to localization in the Backoffice, follow this step-by-step guide:
### **1. Change the Language in Backoffice**
1. Open the Backoffice, click on your profile icon in the top-right corner, and select "Edit."
![Menubar profile image](/.github/img/contributing/ProfileImage.png "Menubar profile image")
![Edit button inside profile](/.github/img/contributing/editBtn.png "Edit button inside profile")
2. Under "UI Culture," select the language you want to review from the dropdown menu.
![Dropdown of languages in Umbraco](/.github/img/contributing/uiCulture.png "Dropdown of languages in Umbraco")
### **2. Find a Translation Error**
1. Navigate through the Backoffice and check if everything is translated correctly.
2. When you find a translation error, right-click on it and select "Inspect."
3. Look for the nearest element that starts with `umb-` and has a name indicating something specific to the given location.
**Example:**
* The closest parent element should be specific, such as `umb-document-type-workspace-view-settings` instead of a generic element like `umb-property-layout.`
### **3. Find the Code in VS Code**
1. Open VS Code and search for the nearest `umb-` element you identified.
![Search for nearest umb element in code](/.github/img/contributing/searchInVsCode.png "Search for nearest umb element in code")
2. Scroll down to find `render() {` and look for the element label that needs updating.
![Find render and label in code](/.github/img/contributing/renderCode.png "Find render and label in code")
3. If the label is hardcoded, it must be updated.
**Example:**
`label="Vary by culture"`
### **4. Find the Correct Translation**
1. Open the `en.ts` or `en-us.ts` file and search for relevant keywords. \
\
**Example:**
* If the text is "Vary by culture," search for `vary`, `culture`, or `Vary by culture`.
2. Once you find the translation, take the element name and search for it in the target language file (e.g., `da-dk.ts` for Danish).
![Search for translation in language files](/.github/img/contributing/searchingThroughLanguageFiles.png "Search for translation in language files")
3. If a translation exists, insert it into the label element found earlier.
### **5. Insert the Translation**
To display the new translation correctly, insert the following code inside the label element:
`${this.localize.term('action_key')}`
Replace `action_key` with the correct translation key.
**Example:**
`${this.localize.term('contentTypeEditor_allowVaryByCulture')}`
![Localization code snippet](/.github/img/contributing/localizationCodeSnippetInCode.png "Localization code snippet")
Save the changes and return to the Backoffice to see the update.
![Changes in backoffice after changes in code](/.github/img/contributing/changedBackofficeAfterLocalization.png "Changes in backoffice after changes in code")
### **6. Commit and Push**
1. Commit your changes to a new temporary branch (avoid committing directly to `main`).
2. Push the changes to your fork on GitHub.
### **7. Create a Pull Request**
1. In your forked repository on GitHub (`https://github.com/[YourUsername]/Umbraco-CMS`), a banner will appear stating that you pushed a new branch.
2. Click the button to create a pull request and follow the instructions.
## **I Cant Find the Correct Translation**
If you cant find the translation you need, it may not exist yet. In this case, you can create a new action with related keys.
### **1. Ensure It Doesnt Already Exist**
Search thoroughly in `en.ts` or `en-us.ts` for all relevant keywords.
### **2. Create an Action**
1. Choose a meaningful name for the action to avoid confusion. \
\
**Example:** Translation for the Data Type "Color Picker."
* **Good name:** `colorPickerConfigurations`
* **Bad name:** `colorpicker`
2. A specific action name prevents unnecessarily long key names.
3. Define the action:
### **3. Create Keys**
1. Use clear and descriptive key names. \
\
**Example:**
* **Good name:** `colorsTitle`
* **Bad name:** `colors`
2. Add the necessary keys inside the action with proper translations.
![Action and related Keys in language files](/.github/img/contributing/actionAndKeys.png "Action and related Keys in language files")
## **I Cant Find a <code>render()</code> Code in VS Code**
In some cases, such as Data Types, the label might not be inside `render()`. Instead, it may be in a manifest file.
### 1. Search for the Text
Copy the text from the Backoffice and search for it in the code.
### 2. Open the Manifest File
Once you find the relevant manifest file, open it to confirm youre in the right place.
### 3. Change the Label
In Markdown files, localization is slightly different. Instead of:
`${this.localize.term('action_key')}`
Use: `#action_key`
**Example:**
`#colorPickerConfigurations_showLabelTitle`
### 4. Change the Description
For descriptions in Markdown files, use:
`{umbLocalize: action_key}`
**Example:**
`{umbLocalize: colorPickerConfigurations_showLabelDescription}`
### 5. Save and Verify
Once all changes are made, your manifest should look something like this:
![Localization changes to manifest files](/.github/img/contributing/finishedManifestAfterLocalizatonChanges.png "Localization changes to manifest files")
---
### Thank you
Following these steps ensures that the Umbraco Backoffice remains accessible and user-friendly in all supported languages. Thanks for contributing! 🎉
+218
View File
@@ -0,0 +1,218 @@
# Umbraco CMS Development Guide
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
## Working Effectively
Bootstrap, build, and test the repository:
- Install .NET SDK (version specified in global.json):
- `curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version $(jq -r '.sdk.version' global.json)`
- `export PATH="/home/runner/.dotnet:$PATH"`
- Install Node.js (version specified in src/Umbraco.Web.UI.Client/.nvmrc):
- `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash`
- `export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"`
- `nvm install $(cat src/Umbraco.Web.UI.Client/.nvmrc) && nvm use $(cat src/Umbraco.Web.UI.Client/.nvmrc)`
- Fix shallow clone issue (required for GitVersioning):
- `git fetch --unshallow`
- Restore packages:
- `dotnet restore` -- takes 50 seconds. NEVER CANCEL. Set timeout to 90+ seconds.
- Build the solution:
- `dotnet build` -- takes 4.5 minutes. NEVER CANCEL. Set timeout to 10+ minutes.
- Install and build frontend:
- `cd src/Umbraco.Web.UI.Client`
- `npm ci --no-fund --no-audit --prefer-offline` -- takes 11 seconds.
- `npm run build:for:cms` -- takes 1.25 minutes. NEVER CANCEL. Set timeout to 5+ minutes.
- Install and build Login
- `cd src/Umbraco.Web.UI.Login`
- `npm ci --no-fund --no-audit --prefer-offline`
- `npm run build`
- Run the application:
- `cd src/Umbraco.Web.UI`
- `dotnet run --no-build` -- Application runs on https://localhost:44339 and http://localhost:11000
Check out [BUILD.md](./BUILD.md) for more detailed instructions.
## Validation
- ALWAYS run through at least one complete end-to-end scenario after making changes.
- Build and unit tests must pass before committing changes.
- Frontend build produces output in src/Umbraco.Web.UI.Client/dist-cms/ which gets copied to src/Umbraco.Web.UI/wwwroot/umbraco/backoffice/
- Always run `dotnet build` and `npm run build:for:cms` before running the application to see your changes.
- For login-only changes, you can run `npm run build` from src/Umbraco.Web.UI.Login and then `dotnet run --no-build` from src/Umbraco.Web.UI.
- For frontend-only changes, you can run `npm run dev:server` from src/Umbraco.Web.UI.Client for hot reloading.
- Frontend changes should be linted using `npm run lint:fix` which uses Eslint.
## Testing
### Unit Tests (.NET)
- Location: tests/Umbraco.Tests.UnitTests/
- Run: `dotnet test tests/Umbraco.Tests.UnitTests/Umbraco.Tests.UnitTests.csproj --configuration Release --verbosity minimal`
- Duration: ~1 minute with 3,343 tests
- NEVER CANCEL: Set timeout to 5+ minutes
### Integration Tests (.NET)
- Location: tests/Umbraco.Tests.Integration/
- Run: `dotnet test tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj --configuration Release --verbosity minimal`
- NEVER CANCEL: Set timeout to 10+ minutes
### Frontend Tests
- Location: src/Umbraco.Web.UI.Client/
- Run: `npm test` (requires `npx playwright install` first)
- Frontend tests use Web Test Runner with Playwright
### Acceptance Tests (E2E)
- Location: tests/Umbraco.Tests.AcceptanceTest/
- Requires running Umbraco application and configuration
- See tests/Umbraco.Tests.AcceptanceTest/README.md for detailed setup (requires `npx playwright install` first)
## Project Structure
The solution contains 30 C# projects organized as follows:
### Main Application Projects
- **Umbraco.Web.UI**: Main web application project (startup project)
- **Umbraco.Web.UI.Client**: TypeScript frontend (backoffice)
- **Umbraco.Web.UI.Login**: Separate login screen frontend
- **Umbraco.Core**: Core domain models and interfaces
- **Umbraco.Infrastructure**: Data access and infrastructure
- **Umbraco.Cms**: Main CMS package
### API Projects
- **Umbraco.Cms.Api.Management**: Management API
- **Umbraco.Cms.Api.Delivery**: Content Delivery API
- **Umbraco.Cms.Api.Common**: Shared API components
### Persistence Projects
- **Umbraco.Cms.Persistence.SqlServer**: SQL Server support
- **Umbraco.Cms.Persistence.Sqlite**: SQLite support
- **Umbraco.Cms.Persistence.EFCore**: Entity Framework Core abstractions
### Test Projects
- **Umbraco.Tests.UnitTests**: Unit tests
- **Umbraco.Tests.Integration**: Integration tests
- **Umbraco.Tests.AcceptanceTest**: End-to-end tests with Playwright
- **Umbraco.Tests.Common**: Shared test utilities
## Common Tasks
### Running Umbraco in Different Modes
**Production Mode (Standard Development)**
Use this for backend development, testing full builds, or when you don't need hot reloading:
1. Build frontend assets: `cd src/Umbraco.Web.UI.Client && npm run build:for:cms`
2. Run backend: `cd src/Umbraco.Web.UI && dotnet run --no-build`
3. Access backoffice: `https://localhost:44339/umbraco`
4. Application uses compiled frontend from `wwwroot/umbraco/backoffice/`
**Vite Dev Server Mode (Frontend Development with Hot Reload)**
Use this for frontend-only development with hot module reloading:
1. Configure backend for frontend development - Add to `src/Umbraco.Web.UI/appsettings.json` under `Umbraco:CMS:Security`:
```json
"BackOfficeHost": "http://localhost:5173",
"AuthorizeCallbackPathName": "/oauth_complete",
"AuthorizeCallbackLogoutPathName": "/logout",
"AuthorizeCallbackErrorPathName": "/error",
"BackOfficeTokenCookie": {
"SameSite": "None"
}
```
2. Run backend: `cd src/Umbraco.Web.UI && dotnet run --no-build`
3. Run frontend dev server: `cd src/Umbraco.Web.UI.Client && npm run dev:server`
4. Access backoffice: `http://localhost:5173/` (no `/umbraco` prefix)
5. Changes to TypeScript/Lit files hot reload automatically
**Important:** Remove the `BackOfficeHost` configuration before committing or switching back to production mode.
### Backend-Only Development
For backend-only changes, disable frontend builds:
- Comment out the target named "BuildStaticAssetsPreconditions" in src/Umbraco.Cms.StaticAssets.csproj:
```
<!--<Target Name="BuildStaticAssetsPreconditions" BeforeTargets="AssignTargetPaths">
[...]
</Target>-->
```
- Remember to uncomment before committing
### Building NuGet Packages
To build custom NuGet packages for testing:
```bash
dotnet pack -c Release -o Build.Out
dotnet nuget add source [Path to Build.Out folder] -n MyLocalFeed
```
### Regenerating Frontend API Types
When changing Management API:
```bash
cd src/Umbraco.Web.UI.Client
npm run generate:server-api-dev
```
Also update OpenApi.json from /umbraco/swagger/management/swagger.json
## Database Setup
Default configuration supports SQLite for development. For production-like testing:
- Use SQL Server/LocalDb for better performance
- Configure connection string in src/Umbraco.Web.UI/appsettings.json
## Clean Up / Reset
To reset development environment:
```bash
# Remove configuration and database
rm src/Umbraco.Web.UI/appsettings.json
rm -rf src/Umbraco.Web.UI/umbraco/Data
# Full clean (removes all untracked files)
git clean -xdf .
```
## Version Information
- Target Framework: .NET (version specified in global.json)
- Current Version: (specified in version.json)
- Node.js Requirement: (specified in src/Umbraco.Web.UI.Client/.nvmrc)
- npm Requirement: Latest compatible version
## Known Issues
- Build requires full git history (not shallow clone) due to GitVersioning
- Some NuGet package security warnings are expected (SixLabors.ImageSharp vulnerabilities)
- Frontend tests require Playwright browser installation: `npx playwright install`
- Older Node.js versions may show engine compatibility warnings (check .nvmrc for current requirement)
## Timing Expectations
**NEVER CANCEL** these operations - they are expected to take time:
| Operation | Expected Time | Timeout Setting |
| ----------------------- | ------------- | --------------- |
| `dotnet restore` | 50 seconds | 90+ seconds |
| `dotnet build` | 4.5 minutes | 10+ minutes |
| `npm ci` | 11 seconds | 30+ seconds |
| `npm run build:for:cms` | 1.25 minutes | 5+ minutes |
| `npm test` | 2 minutes | 5+ minutes |
| `npm run lint` | 1 minute | 5+ minutes |
| Unit tests | 1 minute | 5+ minutes |
| Integration tests | Variable | 10+ minutes |
Always wait for commands to complete rather than canceling and retrying.
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

+2 -2
View File
@@ -7,7 +7,7 @@ changelog:
- duplicate
- wontfix
categories:
- title: 🙌 Notable Changes
- title: 🙌 Notable Changes
labels:
- category/notable
- title: 💥 Breaking Changes
@@ -23,7 +23,7 @@ changelog:
- title: 📦 Dependencies
labels:
- dependencies
- title: 🌈 A11Y
- title: 🌈 Accessibility Improvements
labels:
- accessibility
- category/accessibility
+60
View File
@@ -0,0 +1,60 @@
name: Backoffice Static Web Apps CI/CD
on:
push:
branches:
- main
- release/*
- v*/dev
- v*/main
paths:
- src/Umbraco.Web.UI.Client/package.json
- src/Umbraco.Web.UI.Client/package-lock.json
- src/Umbraco.Web.UI.Client/src/**
- .github/workflows/azure-backoffice.yml
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
- release/*
- v*/dev
- v*/main
workflow_dispatch:
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed' && contains(github.event.pull_request.labels.*.name, 'preview/backoffice') && github.repository == github.event.pull_request.head.repo.full_name)
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
production_branch: main
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_VICTORIOUS_GROUND_017B08103 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "src/Umbraco.Web.UI.Client" # App source code path
app_build_command: "npm run build:for:static"
output_location: "dist" # Built app content directory - optional
skip_api_build: true # Set to true if you do not have an Azure Functions API in your repo
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'preview/backoffice') && github.repository == github.event.pull_request.head.repo.full_name
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
app_location: "src/Umbraco.Web.UI.Client"
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_VICTORIOUS_GROUND_017B08103 }}
action: "close"
+59
View File
@@ -0,0 +1,59 @@
name: Storybook CI/CD
on:
push:
branches:
- main
- v*/dev
- v*/main
paths:
- src/Umbraco.Web.UI.Client/package.json
- src/Umbraco.Web.UI.Client/package-lock.json
- src/Umbraco.Web.UI.Client/src/**
- .github/workflows/azure-storybook.yml
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
- v*/dev
- v*/main
workflow_dispatch:
env:
NODE_OPTIONS: --max_old_space_size=16384
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed' && contains(github.event.pull_request.labels.*.name, 'preview/storybook') && github.repository == github.event.pull_request.head.repo.full_name)
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v4
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
production_branch: main
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_SEA_0C7411A03 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "src/Umbraco.Web.UI.Client" # App source code path
app_build_command: "npm run storybook:build"
output_location: "/storybook-static" # Built app content directory - optional
skip_api_build: true # Set to true if you do not have an Azure Functions API in your repo
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'preview/storybook') && github.repository == github.event.pull_request.head.repo.full_name
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
app_location: "src/Umbraco.Web.UI.Client"
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_SEA_0C7411A03 }}
action: "close"
+4 -4
View File
@@ -4,15 +4,15 @@ on:
push:
branches:
- "*/dev"
- "*/contrib"
- "contrib"
- "*/main"
- "main"
- "release/*"
pull_request:
# The branches below must be a subset of the branches above
branches:
- "*/dev"
- "*/contrib"
- "contrib"
- "*/main"
- "main"
- "release/*"
schedule:
- cron: "33 2 * * 1"
@@ -0,0 +1,163 @@
name: Create a release discussions for each new version label
on:
schedule:
- cron: "0 * * * *" # every hour
workflow_dispatch: # allow manual runs
permissions:
contents: read
discussions: write
issues: read
pull-requests: read
jobs:
reconcile:
runs-on: ubuntu-latest
steps:
- name: Reconcile release/* labels → discussions
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
const categoryName = "Releases";
// 24h cutoff
const since = new Date(Date.now() - 24*60*60*1000).toISOString();
core.info(`Scanning issues/PRs updated since ${since}`);
// fetch repo + discussion categories
const repoData = await github.graphql(`
query($owner:String!, $repo:String!){
repository(owner:$owner, name:$repo){
id
discussionCategories(first:100){ nodes { id name } }
}
}
`, { owner, repo });
const repoId = repoData.repository.id;
const category = repoData.repository.discussionCategories.nodes.find(c => c.name === categoryName);
if (!category) {
core.setFailed(`Discussion category "${categoryName}" not found`);
return;
}
const categoryId = category.id;
// paginate issues/PRs updated in last 24h
for await (const { data: items } of github.paginate.iterator(
github.rest.issues.listForRepo,
{ owner, repo, state: "all", since, per_page: 100 }
)) {
for (const item of items) {
const releaseLabels = (item.labels || [])
.map(l => (typeof l === "string" ? l : l.name)) // always get the name
.filter(n => typeof n === "string" && n.startsWith("release/") && n !== "release/no-notes");
if (releaseLabels.length === 0) continue;
core.info(`#${item.number}: ${releaseLabels.join(", ")}`);
for (const labelName of releaseLabels) {
const version = labelName.substring("release/".length);
const titleTarget = `Release: ${version}`;
// search discussions
let discussionId = null;
let cursor = null;
while (true) {
const page = await github.graphql(`
query($owner:String!, $repo:String!, $cursor:String){
repository(owner:$owner, name:$repo){
discussions(first:50, after:$cursor){
nodes{
id
title
url
category{ name }
labels(first:50){ nodes{ name } }
}
pageInfo{ hasNextPage endCursor }
}
}
}
`, { owner, repo, cursor });
const nodes = page.repository.discussions.nodes;
const byLabel = nodes.find(d =>
d.category?.name === categoryName &&
d.labels?.nodes?.some(l => l.name === labelName)
);
if (byLabel) { discussionId = byLabel.id; break; }
const byTitle = nodes.find(d =>
d.category?.name === categoryName &&
d.title === titleTarget
);
if (byTitle) { discussionId = byTitle.id; break; }
if (!page.repository.discussions.pageInfo.hasNextPage) break;
cursor = page.repository.discussions.pageInfo.endCursor;
}
if (!discussionId) {
core.info(`→ Creating discussion for ${labelName}`);
const body =
`**Release date:** TODO (YYYY-MM-DD)\n\n` +
`### Links\n` +
`- [Issues and pull requests marked for version ${version}](https://github.com/${owner}/${repo}/issues?q=label%3A${encodeURIComponent(labelName)})\n`;
const created = await github.graphql(`
mutation($repoId:ID!, $catId:ID!, $title:String!, $body:String!){
createDiscussion(input:{
repositoryId:$repoId,
categoryId:$catId,
title:$title,
body:$body
}){ discussion{ id url } }
}
`, { repoId, catId: categoryId, title: titleTarget, body });
discussionId = created.createDiscussion.discussion.id;
// lock the discussion to prevent replies
await github.graphql(`
mutation($id:ID!){
lockLockable(input:{ lockableId:$id }) {
clientMutationId
}
}
`, { id: discussionId });
core.info(`🔒 Locked discussion ${discussionId}`);
} else {
core.info(`→ Found existing discussion for ${labelName}`);
}
// ensure label exists
let labelId;
try {
await github.rest.issues.getLabel({ owner, repo, name: labelName });
} catch (e) {
if (e.status === 404) {
await github.rest.issues.createLabel({
owner, repo, name: labelName, color: "0E8A16"
});
} else { throw e; }
}
const labelNode = await github.graphql(`
query($owner:String!, $repo:String!, $name:String!){
repository(owner:$owner, name:$repo){ label(name:$name){ id } }
}
`, { owner, repo, name: labelName });
labelId = labelNode.repository.label?.id;
if (!labelId) continue;
// add label to discussion
await github.graphql(`
mutation($id:ID!, $labels:[ID!]!){
addLabelsToLabelable(input:{ labelableId:$id, labelIds:$labels }) {
clientMutationId
}
}
`, { id: discussionId, labels: [labelId] });
core.info(`✓ ${labelName} attached to discussion`);
}
}
}
+4 -2
View File
@@ -3,16 +3,18 @@ name: Test Backoffice
on:
push:
branches:
- contrib
- main
- release/*
- v*/dev
- v*/main
paths:
- src/Umbraco.Web.UI.Client/**
pull_request:
branches:
- contrib
- main
- release/*
- v*/dev
- v*/main
paths:
- src/Umbraco.Web.UI.Client/**
+4 -2
View File
@@ -95,6 +95,10 @@ tools/docfx/
/tests/Umbraco.Tests.Integration/[Uu]mbraco/[Ll]ogs/
/tests/Umbraco.Tests.Integration/Views/
/tests/Umbraco.Tests.UnitTests/[Uu]mbraco/[Dd]ata/TEMP/
/BenchmarkDotNet.Artifacts/
playwright-report
trace.zip
/tests/Umbraco.Tests.AcceptanceTest/results
# Ignore auto-generated schema
/src/Umbraco.Cms.Targets/tasks/
@@ -107,5 +111,3 @@ tools/docfx/
/tests/Umbraco.Tests.Integration/appsettings-schema.*.json
/tests/Umbraco.Tests.Integration/umbraco-package-schema.json
/src/Umbraco.Cms/appsettings-schema.json
playwright-report
trace.zip
+6 -1
View File
@@ -62,6 +62,7 @@
"cwd": "${workspaceFolder}/src/Umbraco.Web.UI",
"stopAtEntry": false,
"requireExactSource": false,
"postDebugTask": "kill-umbraco-web-ui",
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
@@ -96,13 +97,17 @@
"stopAtEntry": false,
"requireExactSource": false,
"checkForDevCert": true,
"postDebugTask": "kill-umbraco-web-ui",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_URLS": "https://localhost:44339",
"UMBRACO__CMS__WEBROUTING__UMBRACOAPPLICATIONURL": "https://localhost:44339",
"UMBRACO__CMS__SECURITY__BACKOFFICEHOST": "http://localhost:5173",
"UMBRACO__CMS__SECURITY__AUTHORIZECALLBACKPATHNAME": "/oauth_complete",
"UMBRACO__CMS__SECURITY__AUTHORIZECALLBACKLOGOUTPATHNAME": "/logout",
"UMBRACO__CMS__SECURITY__AUTHORIZECALLBACKERRORPATHNAME": "/error"
"UMBRACO__CMS__SECURITY__AUTHORIZECALLBACKERRORPATHNAME": "/error",
"UMBRACO__CMS__SECURITY__KEEPUSERLOGGEDIN": "true",
"UMBRACO__CMS__SECURITY__BACKOFFICETOKENCOOKIE__SAMESITE": "None"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Umbraco.Web.UI/Views"
+13 -3
View File
@@ -1,5 +1,15 @@
{
"cSpell.words": [
"unprovide"
]
"cSpell.words": [
"backoffice",
"pickable",
"Pickable",
"Umbraco",
"unprovide",
"Unproviding"
],
"eslint.useFlatConfig": true,
"eslint.workingDirectories": [
"./src/Umbraco.Web.UI.Client/",
"./src/Umbraco.Web.UI.Login/"
]
}
+85 -74
View File
@@ -1,76 +1,87 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"detail": "Builds the client and SLN",
"promptOnClose": true,
"group": "build",
"dependsOn": [
"Client Build",
"Dotnet build"
],
"problemMatcher": []
},
{
"label": "Client Install",
"detail": "install npm for Umbraco.Web.UI.Client",
"promptOnClose": true,
"type": "npm",
"script": "install",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": []
},
{
"label": "Client Build",
"detail": "runs npm run build for Umbraco.Web.UI.Client",
"promptOnClose": true,
"group": "build",
"type": "npm",
"script": "build:for:cms",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": []
},
{
"label": "Client Watch",
"detail": "runs npm run dev for Umbraco.Web.UI.Client",
"promptOnClose": true,
"group": "build",
"type": "npm",
"script": "dev",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": []
},
{
"label": "Dotnet build",
"detail": "Dotnet build of SLN",
"promptOnClose": true,
"group": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/umbraco.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "Dotnet watch",
"detail": "Dotnet run and watch of Web.UI",
"promptOnClose": true,
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"detail": "Builds the client and SLN",
"promptOnClose": true,
"group": "build",
"dependsOn": ["Client Build", "Dotnet build"],
"problemMatcher": []
},
{
"label": "Client Install",
"detail": "install npm for Umbraco.Web.UI.Client",
"promptOnClose": true,
"type": "npm",
"script": "install",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": []
},
{
"label": "Client Build",
"detail": "runs npm run build for Umbraco.Web.UI.Client",
"promptOnClose": true,
"group": "build",
"type": "npm",
"script": "build:for:cms",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": []
},
{
"label": "Client Watch",
"detail": "runs npm run dev for Umbraco.Web.UI.Client",
"promptOnClose": true,
"group": "build",
"type": "npm",
"script": "dev",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": []
},
{
"label": "Dotnet build",
"detail": "Dotnet build of SLN",
"promptOnClose": true,
"group": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/umbraco.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "Dotnet watch",
"detail": "Dotnet run and watch of Web.UI",
"promptOnClose": true,
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "kill-umbraco-web-ui",
"type": "shell",
"problemMatcher": [],
"osx": {
"command": "pkill -f Umbraco.Web.UI"
},
"linux": {
"command": "pkill -f Umbraco.Web.UI"
},
"windows": {
"command": "taskkill /IM Umbraco.Web.UI.exe /F"
}
}
]
}
+381
View File
@@ -0,0 +1,381 @@
# Umbraco CMS - Multi-Project Repository
Enterprise-grade CMS built on .NET 10.0. This repository contains 21 production projects organized in a layered architecture with clear separation of concerns.
**Repository**: https://github.com/umbraco/Umbraco-CMS
**License**: MIT
**Main Branch**: `main`
---
## 1. Overview
### What This Repository Contains
**21 Production Projects** organized in 3 main categories:
1. **Core Architecture** (Domain & Infrastructure)
- `Umbraco.Core` - Interface contracts, domain models, notifications
- `Umbraco.Infrastructure` - Service implementations, data access, caching
2. **Web & APIs** (Presentation Layer)
- `Umbraco.Web.UI` - Main ASP.NET Core web application
- `Umbraco.Web.Common` - Shared web functionality, controllers, middleware
- `Umbraco.Cms.Api.Management` - Backoffice Management API (REST)
- `Umbraco.Cms.Api.Delivery` - Content Delivery API (headless)
- `Umbraco.Cms.Api.Common` - Shared API infrastructure
3. **Specialized Features** (Pluggable Modules)
- Persistence: EF Core (modern), NPoco (legacy) for SQL Server & SQLite
- Caching: `PublishedCache.HybridCache` (in-memory + distributed)
- Search: `Examine.Lucene` (full-text search)
- Imaging: `Imaging.ImageSharp` v1 & v2 (image processing)
- Other: Static assets, targets, development tools
**6 Test Projects**:
- `Umbraco.Tests.Common` - Shared test utilities
- `Umbraco.Tests.UnitTests` - Unit tests
- `Umbraco.Tests.Integration` - Integration tests
- `Umbraco.Tests.Benchmarks` - Performance benchmarks
- `Umbraco.Tests.AcceptanceTest` - E2E tests
- `Umbraco.Tests.AcceptanceTest.UmbracoProject` - Test instance
### Key Technologies
- **.NET 10.0** - Target framework for all projects
- **ASP.NET Core** - Web framework
- **Entity Framework Core** - Modern ORM
- **OpenIddict** - OAuth 2.0/OpenID Connect authentication
- **Swashbuckle** - OpenAPI/Swagger documentation
- **Lucene.NET** - Full-text search via Examine
- **ImageSharp** - Image processing
---
## 2. Repository Structure
```
Umbraco-CMS/
├── src/ # 21 production projects
│ ├── Umbraco.Core/ # Domain contracts (interfaces only)
│ │ └── CLAUDE.md # ⭐ Core architecture guide
│ ├── Umbraco.Infrastructure/ # Service implementations
│ ├── Umbraco.Web.Common/ # Web utilities
│ ├── Umbraco.Web.UI/ # Main web application
│ ├── Umbraco.Cms.Api.Management/ # Management API
│ ├── Umbraco.Cms.Api.Delivery/ # Delivery API (headless)
│ ├── Umbraco.Cms.Api.Common/ # Shared API infrastructure
│ │ └── CLAUDE.md # ⭐ API patterns guide
│ ├── Umbraco.PublishedCache.HybridCache/ # Content caching
│ ├── Umbraco.Examine.Lucene/ # Search indexing
│ ├── Umbraco.Cms.Persistence.EFCore/ # EF Core data access
│ ├── Umbraco.Cms.Persistence.EFCore.Sqlite/
│ ├── Umbraco.Cms.Persistence.EFCore.SqlServer/
│ ├── Umbraco.Cms.Persistence.Sqlite/ # Legacy SQLite
│ ├── Umbraco.Cms.Persistence.SqlServer/ # Legacy SQL Server
│ ├── Umbraco.Cms.Imaging.ImageSharp/ # Image processing v1
│ ├── Umbraco.Cms.Imaging.ImageSharp2/ # Image processing v2
│ ├── Umbraco.Cms.StaticAssets/ # Embedded assets
│ ├── Umbraco.Cms.DevelopmentMode.Backoffice/
│ ├── Umbraco.Cms.Targets/ # NuGet targets
│ └── Umbraco.Cms/ # Meta-package
├── tests/ # 6 test projects
│ ├── Umbraco.Tests.Common/
│ ├── Umbraco.Tests.UnitTests/
│ ├── Umbraco.Tests.Integration/
│ ├── Umbraco.Tests.Benchmarks/
│ ├── Umbraco.Tests.AcceptanceTest/
│ └── Umbraco.Tests.AcceptanceTest.UmbracoProject/
├── templates/ # Project templates
│ └── Umbraco.Templates/
├── tools/ # Build tools
│ └── Umbraco.JsonSchema/
├── umbraco.sln # Main solution file
├── Directory.Build.props # Shared build configuration
├── Directory.Packages.props # Centralized package versions
├── .editorconfig # Code style
└── .globalconfig # Roslyn analyzers
```
### Architecture Layers
**Dependency Flow** (unidirectional, always flows inward):
```
Web.UI → Web.Common → Infrastructure → Core
Api.Management → Api.Common → Infrastructure → Core
Api.Delivery → Api.Common → Infrastructure → Core
```
**Key Principle**: Core has NO dependencies (pure contracts). Infrastructure implements Core. Web/APIs depend on Infrastructure.
### Project Dependencies
**Core Layer**:
- `Umbraco.Core` → No dependencies (only Microsoft.Extensions.*)
**Infrastructure Layer**:
- `Umbraco.Infrastructure``Umbraco.Core`
- `Umbraco.PublishedCache.*``Umbraco.Infrastructure`
- `Umbraco.Examine.Lucene``Umbraco.Infrastructure`
- `Umbraco.Cms.Persistence.*``Umbraco.Infrastructure`
**Web Layer**:
- `Umbraco.Web.Common``Umbraco.Infrastructure` + caching + search
- `Umbraco.Web.UI``Umbraco.Web.Common` + all features
**API Layer**:
- `Umbraco.Cms.Api.Common``Umbraco.Web.Common`
- `Umbraco.Cms.Api.Management``Umbraco.Cms.Api.Common`
- `Umbraco.Cms.Api.Delivery``Umbraco.Cms.Api.Common`
---
## 3. Teamwork & Collaboration
### Branching Strategy
- **Main branch**: `main` (protected)
- **Branch naming convention**: `v<version>/<type>/<description>`
**Format**: `v{major-version}/{type}/{kebab-case-description}`
**Version**: Read from `version.json` in the repository root. Use the major version number (e.g., `v17` for version 17.x.x).
**Types**:
| Type | Use Case |
|------|----------|
| `feature` | New feature being introduced to the product |
| `bugfix` | Fix to an existing issue with the product |
| `qa` | Adding or updating unit, integration, or end-to-end tests |
| `improvement` | Update to something that already exists but isn't broken (UI finessing, refactoring) |
| `task` | Update that doesn't directly impact product behavior (dependency updates, build pipeline) |
**Description**: A short, kebab-case description (a few words). This should be prefixed with the GitHub issue number if the update is related to resolving a tracked issue.
**Examples**:
```
v17/bugfix/12345-correct-display-of-pending-migrations
v17/feature/add-webhook-support
v17/improvement/optimize-content-cache
v17/qa/add-media-service-tests
v17/task/update-ef-core-dependency
```
See `.github/CONTRIBUTING.md` for full guidelines.
### Pull Request Process
- **PR Template**: `.github/pull_request_template.md`
- **Required CI Checks**:
- All tests pass
- Code formatting (dotnet format)
- No build warnings
- **Merge Strategy**: Squash and merge (via GitHub UI)
- **Reviews**: Required from code owners
#### PR Naming Convention
Use the format: `Area: Description (closes #IssueID)`
**Examples**:
| Area | Description | Issue |
|------|-------------|-------|
| Relations: | Move persistence of relations from repository into notification handlers | (closes #00000) |
| Management API: | Correct the population of the parent for sibling items when retrieved under a folder | |
| Docs: | Updated contributing guidelines to welcome contributions on bugfixes | |
**Area**: The feature or aspect affected (e.g., UFM, TipTap, Docs, Segmentation, Migrations). Helps readers quickly understand what is being changed.
**Description Best Practices**:
- Include the area of change (Relations, Management API, etc.)
- Describe the change and its impact
- Be specific, not vague (describe "a golden retriever" not just "a dog")
**Issue Linking**: Add `(closes #IssueID)` to auto-close linked issues on merge.
### Commit Messages
Follow Conventional Commits format:
```
<type>(<scope>): <description>
Types: feat, fix, docs, style, refactor, test, chore
Scope: project name (core, web, api, etc.)
Examples:
feat(core): add IContentService.GetByIds method
fix(api): resolve null reference in schema handler
docs(web): update routing documentation
```
### Code Owners
Project ownership is distributed across teams. Check individual project directories for ownership.
---
## 4. Architecture Patterns
### Core Architectural Decisions
1. **Layered Architecture with Dependency Inversion**
- Core defines contracts (interfaces)
- Infrastructure implements contracts
- Web/APIs consume implementations via DI
2. **Interface-First Design**
- All services defined as interfaces in Core
- Enables testing, polymorphism, extensibility
3. **Notification Pattern** (not C# events)
- See `/src/Umbraco.Core/CLAUDE.md` → "2. Notification System (Event Handling)"
4. **Composer Pattern** (DI registration)
- See `/src/Umbraco.Core/CLAUDE.md` → "3. Composer Pattern (DI Registration)"
5. **Scoping Pattern** (Unit of Work)
- See `/src/Umbraco.Core/CLAUDE.md` → "5. Scoping Pattern (Unit of Work)"
6. **Attempt Pattern** (operation results)
- `Attempt<TResult, TStatus>` instead of exceptions
- Strongly-typed operation status enums
### Key Design Patterns Used
- **Repository Pattern** - Data access abstraction
- **Unit of Work** - Scoping for transactions
- **Builder Pattern** - `ProblemDetailsBuilder` for API errors
- **Strategy Pattern** - OpenAPI handlers (schema ID, operation ID)
- **Options Pattern** - All configuration via `IOptions<T>`
- **Factory Pattern** - Content type factories
- **Mediator Pattern** - Notification aggregator
---
## 5. Project-Specific Notes
### Centralized Package Management
**All NuGet package versions** are centralized in `Directory.Packages.props`. Individual projects do NOT specify versions.
```xml
<!-- Individual projects reference WITHOUT version -->
<PackageReference Include="Swashbuckle.AspNetCore" />
<!-- Versions defined in Directory.Packages.props -->
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.5.0" />
```
### Build Configuration
- `Directory.Build.props` - Shared properties (target framework, company, copyright)
- `.editorconfig` - Code style rules
- `.globalconfig` - Roslyn analyzer rules
### Persistence Layer - NPoco and EF Core
The repository contains BOTH (actively supported):
- **Current**: NPoco-based persistence (`Umbraco.Cms.Persistence.Sqlite`, `Umbraco.Cms.Persistence.SqlServer`) - widely used and fully supported
- **Future**: EF Core-based persistence (`Umbraco.Cms.Persistence.EFCore.*`) - migration in progress
**Note**: The codebase is actively migrating to EF Core, but NPoco remains the primary persistence layer and is not deprecated. Both are fully supported.
### Authentication: OpenIddict
All APIs use **OpenIddict** (OAuth 2.0/OpenID Connect):
- Reference tokens (not JWT) for better security
- **Secure cookie-based token storage** (v17+) - tokens stored in HTTP-only cookies with `__Host-` prefix
- Tokens are redacted from client-side responses and passed via secure cookies only
- ASP.NET Core Data Protection for token encryption
- Configured in `Umbraco.Cms.Api.Common`
- API requests must include credentials (`credentials: include` for fetch)
**Load Balancing Requirement**: All servers must share the same Data Protection key ring.
### Content Caching Strategy
**HybridCache** (`Umbraco.PublishedCache.HybridCache`):
- In-memory cache + distributed cache support
- Published content only (not draft)
- Invalidated via notifications and cache refreshers
### API Versioning
APIs use `Asp.Versioning.Mvc`:
- Management API: `/umbraco/management/api/v{version}/*`
- Delivery API: `/umbraco/delivery/api/v{version}/*`
- OpenAPI/Swagger docs per version
### Known Limitations
1. **Circular Dependencies**: Avoided via `Lazy<T>` or event notifications
2. **Multi-Server**: Requires shared Data Protection key ring and synchronized clocks (NTP)
3. **Database Support**: SQL Server, SQLite
---
## Quick Reference
### Essential Commands
```bash
# Build solution
dotnet build
# Run all tests
dotnet test
# Run specific test category
dotnet test --filter "Category=Integration"
# Format code
dotnet format
# Pack all projects
dotnet pack -c Release
```
### Key Projects
| Project | Type | Description |
|---------|------|-------------|
| **Umbraco.Core** | Library | Interface contracts and domain models |
| **Umbraco.Infrastructure** | Library | Service implementations and data access |
| **Umbraco.Web.UI** | Application | Main web application (Razor/MVC) |
| **Umbraco.Cms.Api.Management** | Library | Management API (backoffice) |
| **Umbraco.Cms.Api.Delivery** | Library | Delivery API (headless CMS) |
| **Umbraco.Cms.Api.Common** | Library | Shared API infrastructure |
| **Umbraco.PublishedCache.HybridCache** | Library | Published content caching |
| **Umbraco.Examine.Lucene** | Library | Full-text search indexing |
### Important Files
- **Solution**: `umbraco.sln`
- **Build Config**: `Directory.Build.props`, `Directory.Packages.props`
- **Code Style**: `.editorconfig`, `.globalconfig`
- **Documentation**: `/CLAUDE.md`, `/src/Umbraco.Core/CLAUDE.md`, `/src/Umbraco.Cms.Api.Common/CLAUDE.md`
### Project-Specific Documentation
For detailed information about individual projects, see their CLAUDE.md files:
- **Core Architecture**: `/src/Umbraco.Core/CLAUDE.md` - Service contracts, notification patterns
- **API Infrastructure**: `/src/Umbraco.Cms.Api.Common/CLAUDE.md` - OpenAPI, authentication, serialization
### Getting Help
- **Official Docs**: https://docs.umbraco.com/
- **Contributing Guide**: `.github/CONTRIBUTING.md`
- **Issues**: https://github.com/umbraco/Umbraco-CMS/issues
- **Community**: https://forum.umbraco.com/
- **Releases**: https://releases.umbraco.com/
---
**This repository follows a layered architecture with strict dependency rules. The Core defines contracts, Infrastructure implements them, and Web/APIs consume them. Each layer can be understood independently, but dependencies always flow inward toward Core.**
+3 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Company>Umbraco HQ</Company>
<Authors>Umbraco</Authors>
<Copyright>Copyright © Umbraco $([System.DateTime]::Today.ToString('yyyy'))</Copyright>
@@ -20,6 +20,7 @@
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
</PropertyGroup>
<PropertyGroup>
<!--
TODO: Fix and remove overrides:
@@ -40,7 +41,7 @@
<PropertyGroup>
<GenerateCompatibilitySuppressionFile>false</GenerateCompatibilitySuppressionFile>
<EnablePackageValidation>true</EnablePackageValidation>
<PackageValidationBaselineVersion>15.0.0</PackageValidationBaselineVersion>
<PackageValidationBaselineVersion>17.0.0</PackageValidationBaselineVersion>
<EnableStrictModeForCompatibleFrameworksInPackage>true</EnableStrictModeForCompatibleFrameworksInPackage>
<EnableStrictModeForCompatibleTfms>true</EnableStrictModeForCompatibleTfms>
</PropertyGroup>
+50 -62
View File
@@ -2,43 +2,43 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<!-- Global packages (private, build-time packages for all projects) -->
<ItemGroup>
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.146" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.9.50" />
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
<GlobalPackageReference Include="Umbraco.Code" Version="2.2.0" />
<GlobalPackageReference Include="Umbraco.Code" Version="2.4.0" />
<GlobalPackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.2.0" />
</ItemGroup>
<!-- Microsoft packages -->
<ItemGroup>
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="9.0.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.2" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.2" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.2" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.10" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Physical" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Caching.Hybrid" Version="9.0.0-preview.9.24556.5" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="10.0.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="10.0.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Physical" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.Caching.Hybrid" Version="10.1.0" />
<PackageVersion Include="System.Linq.Async" Version="7.0.0" />
</ItemGroup>
<!-- Umbraco packages -->
<ItemGroup>
<PackageVersion Include="Umbraco.JsonSchema.Extensions" Version="0.3.0" />
<PackageVersion Include="Umbraco.CSharpTest.Net.Collections" Version="15.0.0" />
</ItemGroup>
<!-- Third-party packages -->
<ItemGroup>
@@ -47,57 +47,45 @@
<PackageVersion Include="Dazinator.Extensions.FileProviders" Version="2.0.0" />
<PackageVersion Include="Examine" Version="3.7.1" />
<PackageVersion Include="Examine.Core" Version="3.7.1" />
<PackageVersion Include="HtmlAgilityPack" Version="1.11.74" />
<PackageVersion Include="JsonPatch.Net" Version="3.1.1" />
<PackageVersion Include="HtmlAgilityPack" Version="1.12.4" />
<PackageVersion Include="JsonPatch.Net" Version="3.3.0" />
<PackageVersion Include="K4os.Compression.LZ4" Version="1.3.8" />
<PackageVersion Include="MailKit" Version="4.10.0" />
<PackageVersion Include="MailKit" Version="4.14.1" />
<PackageVersion Include="Markdig" Version="0.44.0" />
<PackageVersion Include="Markdown" Version="2.2.1" />
<PackageVersion Include="MessagePack" Version="2.5.192" />
<PackageVersion Include="MiniProfiler.AspNetCore.Mvc" Version="4.3.8" />
<PackageVersion Include="MessagePack" Version="3.1.4" />
<PackageVersion Include="MiniProfiler.AspNetCore.Mvc" Version="4.5.4" />
<PackageVersion Include="MiniProfiler.Shared" Version="4.5.4" />
<PackageVersion Include="ncrontab" Version="3.3.3" />
<PackageVersion Include="NPoco" Version="5.7.1" />
<PackageVersion Include="NPoco.SqlServer" Version="5.7.1" />
<PackageVersion Include="OpenIddict.Abstractions" Version="6.1.1" />
<PackageVersion Include="OpenIddict.AspNetCore" Version="6.1.1" />
<PackageVersion Include="OpenIddict.EntityFrameworkCore" Version="6.1.1" />
<PackageVersion Include="Serilog" Version="4.2.0" />
<PackageVersion Include="Serilog.AspNetCore" Version="8.0.3" />
<PackageVersion Include="ncrontab" Version="3.4.0" />
<PackageVersion Include="NPoco" Version="6.1.0" />
<PackageVersion Include="NPoco.SqlServer" Version="6.1.0" />
<PackageVersion Include="OpenIddict.Abstractions" Version="7.2.0" />
<PackageVersion Include="OpenIddict.AspNetCore" Version="7.2.0" />
<PackageVersion Include="OpenIddict.EntityFrameworkCore" Version="7.2.0" />
<PackageVersion Include="Serilog" Version="4.3.0" />
<PackageVersion Include="Serilog.AspNetCore" Version="9.0.0" />
<PackageVersion Include="Serilog.Enrichers.Process" Version="3.0.0" />
<PackageVersion Include="Serilog.Enrichers.Thread" Version="4.0.0" />
<PackageVersion Include="Serilog.Expressions" Version="5.0.0" />
<PackageVersion Include="Serilog.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Serilog.Extensions.Hosting" Version="9.0.0" />
<PackageVersion Include="Serilog.Formatting.Compact" Version="3.0.0" />
<PackageVersion Include="Serilog.Formatting.Compact.Reader" Version="4.0.0" />
<PackageVersion Include="Serilog.Settings.Configuration" Version="8.0.4" />
<PackageVersion Include="Serilog.Settings.Configuration" Version="9.0.0" />
<PackageVersion Include="Serilog.Sinks.Async" Version="2.1.0" />
<PackageVersion Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageVersion Include="Serilog.Sinks.File" Version="7.0.0" />
<PackageVersion Include="Serilog.Sinks.Map" Version="2.0.0" />
<PackageVersion Include="SixLabors.ImageSharp" Version="3.1.7" />
<PackageVersion Include="SixLabors.ImageSharp.Web" Version="3.1.3" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="7.1.0" />
<PackageVersion Include="SixLabors.ImageSharp" Version="3.1.12" />
<PackageVersion Include="SixLabors.ImageSharp.Web" Version="3.2.0" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="10.0.1" />
</ItemGroup>
<!-- Transitive pinned versions (only required because our direct dependencies have vulnerable versions of transitive dependencies) -->
<ItemGroup>
<!-- Microsoft.EntityFrameworkCore.SqlServer and NPoco.SqlServer brings in a vulnerable version of Azure.Identity -->
<!-- Take top-level depedendency on Azure.Identity, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageVersion Include="Azure.Identity" Version="1.13.1" />
<!-- Microsoft.EntityFrameworkCore.SqlServer brings in a vulnerable version of System.Runtime.Caching -->
<PackageVersion Include="System.Runtime.Caching" Version="9.0.0" />
<!-- Dazinator.Extensions.FileProviders brings in a vulnerable version of System.Net.Http -->
<!-- Dazinator.Extensions.FileProviders references vulnerable versions of the following: -->
<!-- TODO (V18): Remove these pinned dependencies when the Dazinator.Extensions.FileProviders dependency is removed. -->
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
<!-- Examine brings in a vulnerable version of System.Security.Cryptography.Xml -->
<PackageVersion Include="System.Security.Cryptography.Xml" Version="9.0.0" />
<!-- Dazinator.Extensions.FileProviders and MiniProfiler.AspNetCore.Mvc brings in a vulnerable version of System.Text.RegularExpressions -->
<PackageVersion Include="System.Private.Uri" Version="4.3.2" />
<!-- Markdown references vulnerable version of the following: -->
<!-- TODO (V19): Remove these pinned dependencies when the Markdown dependency is removed. -->
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
<!-- OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer brings in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens -->
<!-- Take top-level depedendency on Microsoft.IdentityModel.JsonWebTokens, because OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.2.1" />
<!-- Azure.Identity, Microsoft.EntityFrameworkCore.SqlServer and Dazinator.Extensions.FileProviders brings in a legacy version of System.Text.Encodings.Web -->
<PackageVersion Include="System.Text.Encodings.Web" Version="9.0.0" />
<!-- NPoco.SqlServer brings in a vulnerable version of Microsoft.Data.SqlClient -->
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.2" />
<!-- Examine.Lucene brings in a vulnerable version of Lucene.Net.Replicator -->
<PackageVersion Include="Lucene.Net.Replicator" Version="4.8.0-beta00017" />
</ItemGroup>
</Project>
+541
View File
@@ -0,0 +1,541 @@
Third-Party Notices
===================
This file contains notices and attributions for third-party software used in the Umbraco CMS project.
Third-party software may contain dependencies that are not explicitly listed here.
This notice is not a license and does not grant any rights to use the third-party software.
Umbraco CMS is licensed under the MIT License, which can be found in the LICENSE file.
---
@openid/AppAuth-JS: An OpenID Connect and OAuth 2.0 client library for JavaScript
URL: https://github.com/openid/AppAuth-JS
License: Apache License, Version 2.0
Copyright: 2017 Google Inc.
---
AutoFixture: Write maintainable unit tests, faster
URL: https://github.com/AutoFixture/AutoFixture
License: MIT License
Copyright: 2013 Mark Seemann
---
Asp.Versioning.Mvc: A library for ASP.NET Core versioning
URL: https://github.com/dotnet/aspnet-api-versioning
License: MIT License
Copyright: .NET Foundation and contributors
---
Babel: A JavaScript compiler
URL: https://babeljs.io/
License: MIT License
Copyright: 2014-present Sebastian McKenzie and other contributors
---
BenchmarkDotNet: Powerful .NET library for benchmarking
URL: https://github.com/dotnet/BenchmarkDotNet
License: MIT License
Copyright: .NET Foundation and Contributors
---
Bogus: A simple and sane data generator for populating objects that supports different locales.
URL: https://github.com/bchavez/Bogus
License: MIT License
Copyright: 2015 Brian Chavez
---
CommandLineParser: Terse syntax C# command line parser for .NET
URL: https://github.com/commandlineparser/commandline
License: MIT License
Copyright: 2005-2015 Giacomo Stelluti Scala & Contributors
---
cross-env: A CLI tool to set environment variables across platforms
URL: https://github.com/kentcdodds/cross-env
License: MIT License
Copyright: 2017 Kent C. Dodds
---
Dazinator.Extensions.FileProviders: A library for file provider extensions
URL: https://github.com/dazinator/Dazinator.Extensions.FileProviders
License: MIT License
Copyright: 2016 Darrell
---
DOMPurify: A DOM-only XSS sanitizer for HTML, MathML and SVG
URL: https://github.com/cure53/DOMPurify
License: Apache License, Version 2.0
Copyright: 2025 Dr.-Ing. Mario Heiderich, Cure53
---
Element Internals Polyfill: A polyfill for the Element Internals API
URL: https://github.com/calebdwilliams/element-internals-polyfill
License: MIT License
Copyright: 2021 Caleb Williams
---
Eslint: A tool for identifying and reporting on patterns in JavaScript
URL: https://eslint.org/
License: MIT License
Copyright: OpenJS Foundation and other contributors
---
Examine: A search and indexing library for .NET
URL: https://github.com/Shazwazza/Examine
License: Microsoft Public License (Ms-PL)
Copyright: 2023 Shannon Deminick
---
Globals: A library for managing global variables in JavaScript
URL: https://github.com/sindresorhus/globals
License: MIT License
Copyright: Sindre Sorhus
---
Html Agility Pack: An HTML parser for .NET
URL: https://html-agility-pack.net/
License: MIT License
Copyright: ZZZ Projects Inc.
---
ImageSharp: A cross-platform library for processing images in .NET
URL: https://github.com/SixLabors/ImageSharp
License: Apache License, Version 2.0 under the Six Labors Split License
Copyright: Six Labors
---
jsdiff: A JavaScript text differencing implementation
URL: https://github.com/kpdecker/jsdiff
License: BSD 3-Clause License
Copyright: 2009-2015 Kevin Decker <kpdecker@gmail.com>
---
JsonPatch.Net: A library for JSON Patch (RFC 6902) in .NET
URL: https://github.com/json-everything/json-everything
License: MIT License
Copyright: .NET Foundation and Contributors
---
K4os.Compression.LZ4: A fast LZ4 compression library for .NET
URL: https://github.com/MiloszKrajewski/K4os.Compression.LZ4
License: MIT License
Copyright: 2017 Milosz Krajewski
---
Lit: A simple library for building fast, lightweight web components
URL: https://lit.dev
License: BSD 3-Clause License
Copyright: 2020 Google LLC. All rights reserved.
---
Lucide: Beautiful & consistent icons for the web
URL: https://lucide.dev/
License: ISC License
Copyright: 2013-2022 Cole Bemis
Copyright: 2022 Lucide Contributors
---
Madge: A dependency graph generator for JavaScript
URL: https://github.com/pahen/madge
License: MIT License
Copyright: 2017 Patrik Henningsson
---
MailKit: A library for sending email in .NET
URL: https://github.com/jstedfast/MailKit
License: MIT License
Copyright: 2013-2024 .NET Foundation and Contributors
---
Markdig: A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET
URL: https://github.com/xoofx/markdig
License: BSD-2-Clause license
Copyright: 2018+, Alexandre Mutel. All rights reserved.
---
Markdown: A library for parsing and compiling Markdown
URL: https://github.com/hey-red/Markdown
License: MIT License
Copyright: 2018 red
---
marked: A markdown parser and compiler
URL: https://marked.js.org/
License: MIT License
Copyright: 2011-2018, Christopher Jeffrey (https://github.com/chjj/)
Copyright: 2018+, MarkedJS (https://github.com/markedjs/)
---
Message Pack: The extremely fast MessagePack serializer for C#
URL: https://github.com/MessagePack-CSharp/MessagePack-CSharp
License: MIT License
Copyright: 2017 Yoshifumi Kawai and contributors
---
Miniprofiler: A mini profiler for .NET
URL: https://github.com/MiniProfiler/dotnet
License: MIT License
Copyright: .NET MiniProfiler Contributors
---
Monaco Editor: A browser-based code editor
URL: https://microsoft.github.io/monaco-editor/
License: MIT License
Copyright: 2016-present Microsoft Corporation
---
Moq: A mocking library for .NET
URL: https://github.com/moq/moq
License: BSD 3-Clause License
Copyright: 2007 Clarius Consulting, Manas Technology Solutions, InSTEDD, and Contributors.
---
Mock Service Worker (MSW): A library for mocking API requests in JavaScript
URL: https://mswjs.io/
License: MIT License
Copyright: 2018present Artem Zakharchenko
---
NCrontab: A cron schedule parser for .NET
URL: https://github.com/atifaziz/NCrontab
License: Apache License, Version 2.0
Copyright: 2001 The OpenSymphony Group
Copyright: 2008 Atif Aziz
---
Nerdbank.GitVersioning: A library for versioning .NET projects
URL: https://github.com/dotnet/Nerdbank.GitVersioning
License: MIT License
Copyright: .NET Foundation and Contributors
---
NJsonSchema: A JSON schema validator for .NET
URL: https://github.com/RicoSuter/NJsonSchema
License: MIT License
Copyright: 2022 Rico Suter
---
NPoco: A micro ORM for .NET
URL: https://github.com/schotime/NPoco
License: Apache License, Version 2.0
Copyright: Schotime
---
NUnit: A unit testing framework for .NET
URL: https://github.com/nunit/nunit
License: MIT License
Copyright: Charlie Poole, Rob Prouse and Contributors
---
Open Web Components: A set of standards and libraries for building web components
URL: https://open-wc.org/
License: MIT License
Copyright: 2018 open-wc
---
Openapi-ts: The OpenAPI to TypeScript codegen
URL: https://github.com/hey-api/openapi-ts
License: MIT License
Copyright: Hey API
---
OpenIddict: A simple and flexible OpenID Connect server for ASP.NET Core
URL: https://github.com/openiddict/openiddict-core
License: Apache License, Version 2.0
Copyright: Kévin Chalet
---
Playwright: A Node.js library to automate browser testing
URL: https://playwright.dev/
License: Apache License, Version 2.0
Copyright: 2025 Microsoft Corporation
---
Playwright-msw: A library to wrap Mock Service Worker with Playwright
URL: https://github.com/valendres/playwright-msw
License: MIT License
Copyright: 2022 Peter Weller
---
Prettier: An opinionated code formatter
URL: https://prettier.io/
License: MIT License
Copyright: James Long and contributors
---
Remark-gfm: A GitHub Flavored Markdown plugin for Remark
URL: https://github.com/remarkjs/remark-gfm
License: MIT License
Copyright: Titus Wormer
---
rxjs: Reactive Extensions for JavaScript
URL: https://rxjs.dev/
License: Apache License, Version 2.0
Copyright: 2015-present Ben Lesh <ben@benlesh.com>, Google, Inc., Netflix, Inc., Microsoft Corp., and contributors
---
Serilog: A diagnostic logging library for .NET
URL: https://github.com/serilog/serilog
License: Apache License, Version 2.0
Copyright: Serilog Contributors
---
Simple Icons: A set of SVG icons for popular brands
URL: https://simpleicons.org/
License: CC0 1.0 Universal License
Copyright: Simple Icons Contributors
---
Storybook: A UI component explorer for Web Components
URL: https://storybook.js.org/
License: MIT License
Copyright: 2024 Storybook
---
StyleCop.Analyzers: Analyzers for StyleCop
URL: https://github.com/DotNetAnalyzers/StyleCopAnalyzers
License: MIT License
Copyright: Tunnel Vision Laboratories, LLC
---
SVGO: A tool for optimizing SVG files
URL: https://svgo.dev/
License: MIT License
Copyright: Kir Belevich
---
Swashbuckle.AspNetCore: A library for generating Swagger documentation for ASP.NET Core APIs
URL: https://github.com/domaindrivendev/Swashbuckle.AspNetCore
License: MIT License
Copyright: 2016 Richard Morris
---
Tiny Glob: A tiny globbing library for Node.js
URL: https://github.com/terkelg/tiny-glob
License: MIT License
Copyright: 2018 Terkel
---
Tiptap: A renderless rich-text editor for the web
URL: https://tiptap.dev/
License: MIT License
Copyright: 2025 Tiptap GmbH
---
Tsc-alias: A TypeScript compiler plugin for aliasing module paths
URL: https://github.com/justkey007/tsc-alias
License: MIT License
Copyright: 2018 Justkey
---
Typedoc: A documentation generator for TypeScript projects
URL: https://typedoc.org/
License: Apache License, Version 2.0
Copyright: Gerrit Birkeland and Contributors
---
Typescript: A typed superset of JavaScript that compiles to plain JavaScript
URL: https://www.typescriptlang.org/
License: Apache License, Version 2.0
Copyright: 2012-present Microsoft Corporation
---
Typescript-eslint: A set of tools for linting TypeScript code
URL: https://github.com/typescript-eslint/typescript-eslint
License: MIT License
Copyright: 2019 typescript-eslint and other contributors
---
Typescript-json-schema: A library for generating JSON schema from TypeScript types
URL: https://github.com/YousefED/typescript-json-schema
License: BSD 3-Clause License
Copyright: 2016 typescript-json-schema contributors
---
Umbraco.Code: Provides code-level tools for Umbraco
URL: https://github.com/umbraco/Umbraco-Code
License: MIT License
Copyright: 2005-present Umbraco A/S
---
Umbraco.GitVersioning.Extensions: Utilities for Nerdbank.GitVersioning
URL: https://github.com/umbraco/Umbraco.GitVersioning.Extensions
License: MIT License
Copyright: 2005-present Umbraco A/S
---
Umbraco.JsonSchema.Extensions: Utilities for JSON schema generation
URL: https://github.com/umbraco/Umbraco.JsonSchema.Extensions
License: MIT License
Copyright: 2005-present Umbraco A/S
---
Umbraco UI Library: A set of UI components for building web applications
URL: https://uui.umbraco.com/
License: MIT License
Copyright: 2005-present Umbraco A/S
---
uuid: A library for generating unique identifiers
URL: https://github.com/uuidjs/uuid
License: MIT License
Copyright: 2010-2020 Robert Kieffer and other contributors
---
Vite: A fast build tool and development server for modern web projects
URL: https://vite.dev/
License: MIT License
Copyright: 2019-present VoidZero Inc. and Vite contributors
---
Vite-plugin-static-copy: A Vite plugin for copying static files
URL: https://github.com/sapphi-red/vite-plugin-static-copy
License: MIT License
Copyright: 2021 sapphi-red
---
Vite-tsconfig-paths: A Vite plugin for resolving TypeScript paths
URL: https://github.com/aleclarson/vite-tsconfig-paths
License: MIT License
Copyright: Alec Larson
---
Web Component Analyzer: A tool for analyzing web components
URL: https://github.com/runem/web-component-analyzer
License: MIT License
Copyright: 2019 Rune Mehlsen
+189 -257
View File
@@ -34,6 +34,10 @@ parameters:
displayName: Upload API docs
type: boolean
default: false
- name: uploadDependencyTrack
displayName: Upload BOMs to Dependency Track
type: boolean
default: false
- name: forceReleaseTestFilter
displayName: Force to use the release test filters
type: boolean
@@ -103,6 +107,15 @@ stages:
command: build
projects: $(solution)
arguments: "--configuration $(buildConfiguration) --no-restore --property:ContinuousIntegrationBuild=true --property:GeneratePackageOnBuild=true --property:PackageOutputPath=$(Build.ArtifactStagingDirectory)/nupkg"
- powershell: |
dotnet tool install --global CycloneDX
dotnet-CycloneDX $(solution) --output $(Build.ArtifactStagingDirectory)/bom --filename bom-dotnet.xml
displayName: 'Generate Backend BOM'
- powershell: |
npm install --global @cyclonedx/cyclonedx-npm
cyclonedx-npm -o $(Build.ArtifactStagingDirectory)\bom\bom-login.xml --ignore-npm-errors --verbose
displayName: Generate Login UI BOM
workingDirectory: src/Umbraco.Web.UI.Login
- task: PublishPipelineArtifact@1
displayName: Publish nupkg
inputs:
@@ -113,6 +126,11 @@ stages:
inputs:
targetPath: $(Build.SourcesDirectory)
artifactName: build_output
- task: PublishPipelineArtifact@1
displayName: Publish Backend BOM
inputs:
targetPath: $(Build.ArtifactStagingDirectory)/bom
artifactName: bom-backend
- job: B
displayName: Build Bellissima Package
@@ -124,6 +142,11 @@ stages:
lfs: false,
fetchDepth: 500
- template: templates/backoffice-install.yml
- powershell: |
npm install --global @cyclonedx/cyclonedx-npm
cyclonedx-npm -o $(Build.ArtifactStagingDirectory)/bom/bom-backoffice.xml --ignore-npm-errors --verbose
displayName: Generate Backoffice UI BOM
workingDirectory: src/Umbraco.Web.UI.Client
- script: npm run build:for:npm
displayName: Run build:for:npm
workingDirectory: src/Umbraco.Web.UI.Client
@@ -140,6 +163,35 @@ stages:
inputs:
targetPath: $(Build.ArtifactStagingDirectory)/npm
artifactName: npm
- publish: $(Build.ArtifactStagingDirectory)/bom
artifact: bom-frontend
displayName: 'Publish Frontend BOM'
- stage: E2E_BOM
displayName: E2E Tests BOM Generation
dependsOn: []
jobs:
- job:
displayName: E2E Generate BOM
pool:
vmImage: "ubuntu-latest"
steps:
- checkout: self
submodules: false
lfs: false,
fetchDepth: 500
- template: templates/e2e-install.yml
parameters:
nodeVersion: ${{ variables.nodeVersion }}
npm_config_cache: ${{ variables.npm_config_cache }}
- powershell: |
npm install --global @cyclonedx/cyclonedx-npm
cyclonedx-npm -o $(Build.ArtifactStagingDirectory)/bom/bom-e2e.xml --ignore-npm-errors --verbose
displayName: Generate E2E Tests BOM
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
- publish: $(Build.ArtifactStagingDirectory)/bom
artifact: bom-e2e
displayName: 'Publish E2E BOM'
- stage: Build_Docs
condition: and(succeeded(), or(eq(dependencies.Build.outputs['A.build.NBGV_PublicRelease'], 'True'), ${{parameters.buildApiDocs}}))
@@ -163,7 +215,7 @@ stages:
inputs:
targetType: inline
script: |
choco install docfx --version=2.59.4 -y
dotnet tool install -g docfx
if ($lastexitcode -ne 0){
throw ("Error installing DocFX")
}
@@ -313,8 +365,8 @@ stages:
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure.Service)"
LinuxPart3Of3:
vmImage: "ubuntu-latest"
# Filter tests that are not part of the Umbraco.Infrastructure namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure)"
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace. So this will run all tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
macOSPart1Of3:
vmImage: "macOS-latest"
# Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
@@ -325,8 +377,8 @@ stages:
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure.Service)"
macOSPart3Of3:
vmImage: "macOS-latest"
# Filter tests that are not part of the Umbraco.Infrastructure namespace.
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure)"
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace. So this will run all tests that are not part of the Umbraco.Infrastructure and the ManagementApi namespace
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
pool:
vmImage: $(vmImage)
variables:
@@ -389,8 +441,8 @@ stages:
vmImage: "windows-latest"
Tests__Database__DatabaseType: LocalDb
Tests__Database__SQLServerMasterConnectionString: N/A
# Filter tests that are not part of the Umbraco.Infrastructure namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure)"
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace. So this will run all tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
LinuxPart1Of3:
vmImage: "ubuntu-latest"
SA_PASSWORD: UmbracoIntegration123!
@@ -410,8 +462,8 @@ stages:
SA_PASSWORD: UmbracoIntegration123!
Tests__Database__DatabaseType: SqlServer
Tests__Database__SQLServerMasterConnectionString: "Server=(local);User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
# Filter tests that are not part of the Umbraco.Infrastructure namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure)"
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace. So this will run all tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
pool:
vmImage: $(vmImage)
steps:
@@ -432,6 +484,33 @@ stages:
displayName: Start SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- powershell: |
$maxAttempts = 12
$attempt = 0
$status = ""
while (($status -ne 'running') -and ($attempt -lt $maxAttempts)) {
Start-Sleep -Seconds 5
# We use the docker inspect command to check the status of the container. If the container is not running, we wait 5 seconds and try again. And if reaches 12 attempts, we fail the build.
$status = docker inspect -f '{{.State.Status}}' mssql
if ($status -ne 'running') {
Write-Host "Waiting for SQL Server to be ready... Attempt $($attempt + 1)"
$attempt++
}
}
if ($status -eq 'running') {
Write-Host "SQL Server container is running"
docker ps -a
} else {
Write-Host "SQL Server did not become ready in time. Last known status: $status"
docker logs mssql
exit 1
}
displayName: Wait for SQL Server to be ready (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- pwsh: SqlLocalDB start MSSQLLocalDB
displayName: Start SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
@@ -486,336 +565,188 @@ stages:
UMBRACO__CMS__WEBROUTING__UMBRACOAPPLICATIONURL: https://localhost:44331/
ASPNETCORE_URLS: https://localhost:44331
jobs:
# E2E Tests
# E2E Smoke Tests
- job:
displayName: E2E Tests (SQLite)
displayName: E2E Smoke Tests (SQLite)
# currently disabled due to DB locks randomly occuring.
condition: eq(${{parameters.sqliteAcceptanceTests}}, True)
variables:
# Connection string
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=Umbraco;Mode=Memory;Cache=Shared;Foreign Keys=True;Pooling=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.Sqlite
DatabaseType: SQLite
additionalEnvironmentVariables: false
strategy:
matrix:
LinuxPart1Of3:
vmImage: "ubuntu-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
LinuxPart2Of3:
vmImage: "ubuntu-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
LinuxPart3Of3:
vmImage: "ubuntu-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
WindowsPart1Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
# Setup test environment
- task: DownloadPipelineArtifact@2
displayName: Download NuGet artifacts
inputs:
artifact: nupkg
path: $(Agent.BuildDirectory)/app/nupkg
- task: NodeTool@0
displayName: Use Node.js $(nodeVersion)
retryCountOnTaskFailure: 3
inputs:
versionSpec: $(nodeVersion)
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
# Setup test environment Template
- template: nightly-E2E-setup-template.yml
parameters:
nodeVersion: ${{ variables.nodeVersion }}
PlaywrightUserEmail: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL }}
PlaywrightPassword: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD }}
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
npm_config_cache: ${{ variables.npm_config_cache }}
- pwsh: |
"UMBRACO_USER_LOGIN=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL)
UMBRACO_USER_PASSWORD=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
URL=$(ASPNETCORE_URLS)
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
# Cache and restore NPM packages
- task: Cache@2
displayName: Cache NPM packages
inputs:
key: 'npm_e2e | "$(Agent.OS)" | $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/package-lock.json'
restoreKeys: |
npm_e2e | "$(Agent.OS)"
npm_e2e
path: $(npm_config_cache)
- script: npm ci --no-fund --no-audit --prefer-offline
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
displayName: Restore NPM packages
# Build application
- pwsh: |
$cmsVersion = "$(Build.BuildNumber)" -replace "\+",".g"
dotnet new nugetconfig
dotnet nuget add source ./nupkg --name Local
dotnet new install Umbraco.Templates::$cmsVersion
dotnet new umbraco --name UmbracoProject --version $cmsVersion --exclude-gitignore --no-restore --no-update-check
dotnet restore UmbracoProject
cp $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest.UmbracoProject/*.cs UmbracoProject
dotnet build UmbracoProject --configuration $(buildConfiguration) --no-restore
displayName: Restore project
workingDirectory: $(Agent.BuildDirectory)/app
- pwsh: |
dotnet build UmbracoProject --configuration ${{ variables.buildConfiguration }} --no-restore
dotnet dev-certs https
displayName: Build application
workingDirectory: $(Agent.BuildDirectory)/app
condition: succeeded()
# Run application
- bash: |
nohup dotnet run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1 &
echo "##vso[task.setvariable variable=AcceptanceTestProcessId]$!"
displayName: Run application (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
workingDirectory: $(Agent.BuildDirectory)/app
# Run application Template
- template: nightly-E2E-run-application-template.yml
parameters:
DatabaseType: ${{ variables.DatabaseType }}
buildConfiguration: ${{ variables.buildConfiguration }}
additionalEnvironmentVariables: ${{ variables.additionalEnvironmentVariables }}
- pwsh: |
$process = Start-Process dotnet "run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile 2>&1" -PassThru -NoNewWindow -RedirectStandardOutput $(Build.ArtifactStagingDirectory)/playwright.log
Write-Host "##vso[task.setvariable variable=AcceptanceTestProcessId]$($process.Id)"
displayName: Run application (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
workingDirectory: $(Agent.BuildDirectory)/app
# Wait for application to start responding to requests
- pwsh: npx wait-on -v --interval 1000 --timeout 120000 $(ASPNETCORE_URLS)
displayName: Wait for application
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install chromium
displayName: Install Playwright only with Chromium browser
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- pwsh: $(testCommand)
displayName: Run Playwright tests
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
CommitId: $(Build.SourceVersion)
AgentOs: $(Agent.OS)
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
displayName: Stop application (Windows)
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
# Copy artifacts
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
}
displayName: Copy Playwright results
condition: succeededOrFailed()
# Publish test artifacts
- task: PublishPipelineArtifact@1
displayName: Publish test artifacts
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
# Publish test results
- task: PublishTestResults@2
displayName: "Publish test results"
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '*.xml'
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
testRunTitle: "$(Agent.JobName)"
# Run tests Template
- template: nightly-E2E-run-tests-template.yml
parameters:
testCommand: $(testCommand)
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
DatabaseType: ${{ variables.DatabaseType }}
- job:
displayName: E2E Tests (SQL Server)
displayName: E2E Smoke Tests (SQL Server)
variables:
# Connection string
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Umbraco.mdf;Integrated Security=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
DatabaseType: SQLServer
additionalEnvironmentVariables: false
strategy:
matrix:
${{ if eq(parameters.sqlServerLinuxAcceptanceTests, True) }}:
LinuxPart1Of3:
testCommand: "npm run smokeTest -- --shard=1/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
testFolder: "DefaultConfig"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
LinuxPart2Of3:
testCommand: "npm run smokeTest -- --shard=2/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
testFolder: "DefaultConfig"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
LinuxPart3Of3:
testCommand: "npm run smokeTest -- --shard=3/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
testFolder: "DefaultConfig"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
WindowsPart1Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTest -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTest -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTest -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
# Setup test environment
- task: DownloadPipelineArtifact@2
displayName: Download NuGet artifacts
inputs:
artifact: nupkg
path: $(Agent.BuildDirectory)/app/nupkg
- task: NodeTool@0
displayName: Use Node.js $(nodeVersion)
inputs:
versionSpec: $(nodeVersion)
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
# Setup test environment Template
- template: nightly-E2E-setup-template.yml
parameters:
nodeVersion: ${{ variables.nodeVersion }}
PlaywrightUserEmail: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL }}
PlaywrightPassword: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD }}
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
npm_config_cache: ${{ variables.npm_config_cache }}
- pwsh: |
"UMBRACO_USER_LOGIN=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL)
UMBRACO_USER_PASSWORD=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
URL=$(ASPNETCORE_URLS)
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
# Cache and restore NPM packages
- task: Cache@2
displayName: Cache NPM packages
inputs:
key: 'npm_e2e | "$(Agent.OS)" | $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/package-lock.json'
restoreKeys: |
npm_e2e | "$(Agent.OS)"
npm_e2e
path: $(npm_config_cache)
- script: npm ci --no-fund --no-audit --prefer-offline
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
displayName: Restore NPM packages
# Build application
- pwsh: |
$cmsVersion = "$(Build.BuildNumber)" -replace "\+",".g"
dotnet new nugetconfig
dotnet nuget add source ./nupkg --name Local
dotnet new install Umbraco.Templates::$cmsVersion
dotnet new umbraco --name UmbracoProject --version $cmsVersion --exclude-gitignore --no-restore --no-update-check
dotnet restore UmbracoProject
cp $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest.UmbracoProject/*.cs UmbracoProject
dotnet build UmbracoProject --configuration $(buildConfiguration) --no-restore
displayName: Restore project
workingDirectory: $(Agent.BuildDirectory)/app
- pwsh: |
dotnet build UmbracoProject --configuration ${{ variables.buildConfiguration }} --no-restore
dotnet dev-certs https
displayName: Build application
workingDirectory: $(Agent.BuildDirectory)/app
condition: succeeded()
# Start SQL Server
- powershell: docker run --name mssql -d -p 1433:1433 -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$(SA_PASSWORD)" mcr.microsoft.com/mssql/server:2022-latest
displayName: Start SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
# Run application Template
- template: nightly-E2E-run-application-template.yml
parameters:
SA_PASSWORD: ${{ variables.SA_PASSWORD }}
buildConfiguration: ${{ variables.buildConfiguration }}
DatabaseType: ${{ variables.DatabaseType }}
additionalEnvironmentVariables: ${{ variables.additionalEnvironmentVariables }}
- pwsh: SqlLocalDB start MSSQLLocalDB
displayName: Start SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
# Run tests Template
- template: nightly-E2E-run-tests-template.yml
parameters:
testCommand: $(testCommand)
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
DatabaseType: ${{ variables.DatabaseType }}
# Run application
- bash: |
nohup dotnet run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1 &
echo "##vso[task.setvariable variable=AcceptanceTestProcessId]$!"
displayName: Run application (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
workingDirectory: $(Agent.BuildDirectory)/app
- pwsh: |
$process = Start-Process dotnet "run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile 2>&1" -PassThru -NoNewWindow -RedirectStandardOutput $(Build.ArtifactStagingDirectory)/playwright.log
Write-Host "##vso[task.setvariable variable=AcceptanceTestProcessId]$($process.Id)"
displayName: Run application (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
workingDirectory: $(Agent.BuildDirectory)/app
# Wait for application to start responding to requests
- pwsh: npx wait-on -v --interval 1000 --timeout 120000 $(ASPNETCORE_URLS)
displayName: Wait for application
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install chromium
displayName: Install Playwright only with Chromium browser
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- pwsh: $(testCommand)
displayName: Run Playwright tests
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
CommitId: $(Build.SourceVersion)
AgentOs: $(Agent.OS)
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
displayName: Stop application (Windows)
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
# Stop SQL Server
- pwsh: docker stop mssql
displayName: Stop SQL Server Docker image (Linux)
condition: eq(variables['Agent.OS'], 'Linux')
- pwsh: SqlLocalDB stop MSSQLLocalDB
displayName: Stop SQL Server LocalDB (Windows)
condition: eq(variables['Agent.OS'], 'Windows_NT')
# Copy artifacts
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
}
displayName: Copy Playwright results
condition: succeededOrFailed()
# Publish test artifacts
- task: PublishPipelineArtifact@1
displayName: Publish test artifacts
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
# Publish test results
- task: PublishTestResults@2
displayName: "Publish test results"
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '*.xml'
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
testRunTitle: "$(Agent.JobName)"
- stage: Dependency_Track
displayName: Dependency Track
dependsOn:
- Build
- E2E_BOM
condition: and(succeeded(), or(eq(dependencies.Build.outputs['A.build.NBGV_PublicRelease'], 'True'), ${{parameters.uploadDependencyTrack}}))
variables:
# Determine Umbraco version based on whether it's a public release or not. If public release, use major version, else use full NuGet package version.
umbracoVersion: $[ iif(eq(stageDependencies.Build.A.outputs['build.NBGV_PublicRelease'], 'True'), stageDependencies.Build.A.outputs['build.NBGV_VersionMajor'], stageDependencies.Build.A.outputs['build.NBGV_NuGetPackageVersion']) ]
jobs:
- template: templates/dependency-track.yml
parameters:
projectName: "Umbraco-CMS"
umbracoVersion: $(umbracoVersion)
projects:
- name: "Backend"
artifact: "bom-backend"
bomFilePath: "bom-dotnet.xml"
- name: "Login"
artifact: "bom-backend"
bomFilePath: "bom-login.xml"
- name: "Backoffice"
artifact: "bom-frontend"
bomFilePath: "bom-backoffice.xml"
- name: "E2E"
artifact: "bom-e2e"
bomFilePath: "bom-e2e.xml"
###############################################
## Release
@@ -1023,3 +954,4 @@ stages:
ContainerName: "$web"
BlobPrefix: v$(umbracoMajorVersion)/ui-api
CleanTargetBeforeCopy: true
+74
View File
@@ -0,0 +1,74 @@
parameters:
- name: testFolder
type: string
default: ''
- name: buildConfiguration
type: string
default: ''
- name: additionalEnvironmentVariables
type: string
default: 'false'
steps:
- pwsh: |
dotnet restore UmbracoProject
cp $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest.UmbracoProject/*.cs UmbracoProject
displayName: Restore project
workingDirectory: $(Agent.BuildDirectory)/app
# Update application to use necessary app settings
- pwsh: |
$sourcePath = "$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/tests/${{ parameters.testFolder }}/AdditionalSetup"
$destinationPath = "UmbracoProject"
$jsonFiles = Get-ChildItem -Path $sourcePath -Filter "*.json"
if ($jsonFiles) {
$jsonFiles | ForEach-Object {
Write-Host "Copying: $($_.FullName)"
Copy-Item -Path $_.FullName -Destination $destinationPath -Force
}
} else {
Write-Host "No JSON files found."
}
displayName: Update application to use necessary app settings
workingDirectory: $(Agent.BuildDirectory)/app
# Update application to use necessary App_Plugins
- pwsh: |
$sourcePath = "$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/tests/${{ parameters.testFolder }}/AdditionalSetup"
$destinationPath = "UmbracoProject"
$appPluginsFolders = Get-ChildItem -Path $sourcePath -Directory -Filter "App_Plugins"
if ($appPluginsFolders) {
foreach ($folder in $appPluginsFolders) {
Write-Host "Copying folder: $($folder.FullName)"
Copy-Item -Path $folder.FullName -Destination $destinationPath -Recurse -Force
}
} else {
Write-Host "No App_Plugins found."
}
displayName: Update application to use necessary app plugins
workingDirectory: $(Agent.BuildDirectory)/app
# Update application to use necessary classes
- pwsh: |
$sourcePath = "$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/tests/${{ parameters.testFolder }}/AdditionalSetup"
$destinationPath = "UmbracoProject"
$csharpFiles = Get-ChildItem -Path $sourcePath -Filter "*.cs"
if ($csharpFiles) {
$csharpFiles | ForEach-Object {
Write-Host "Copying: $($_.FullName)"
Copy-Item -Path $_.FullName -Destination $destinationPath -Force
}
} else {
Write-Host "No C# files found."
}
displayName: Update application to use necessary classes
workingDirectory: $(Agent.BuildDirectory)/app
- pwsh: |
dotnet build UmbracoProject --configuration ${{ parameters.buildConfiguration }} --no-restore
dotnet dev-certs https
displayName: Build application
workingDirectory: $(Agent.BuildDirectory)/app
condition: and(succeeded(), eq(variables['additionalEnvironmentVariables'], 'false'))
@@ -0,0 +1,45 @@
parameters:
- name: SA_PASSWORD
type: string
default: ''
- name: buildConfiguration
type: string
default: ''
- name: additionalEnvironmentVariables
type: string
default: 'false'
- name: DatabaseType
type: string
default: ''
steps:
# Skips the SQLServer setup if the databaseType does not match
- ${{ if eq(parameters.DatabaseType, 'SQLServer') }}:
# Start SQL Server Linux
- powershell: docker run --name mssql -d -p 1433:1433 -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=${{ parameters.SA_PASSWORD }}" mcr.microsoft.com/mssql/server:2022-latest
displayName: Start SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
# Start SQL Server LocalDB Windows
- pwsh: SqlLocalDB start MSSQLLocalDB
displayName: Start SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
# Run application for Linux
- bash: |
nohup dotnet run --project UmbracoProject --configuration ${{ parameters.buildConfiguration }} --no-build --no-launch-profile > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1 &
echo "##vso[task.setvariable variable=AcceptanceTestProcessId]$!"
displayName: Run application (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'), eq(variables['additionalEnvironmentVariables'], 'false'))
workingDirectory: $(Agent.BuildDirectory)/app
# Run application for Windows
- pwsh: |
$process = Start-Process dotnet "run --project UmbracoProject --configuration ${{ parameters.buildConfiguration }} --no-build --no-launch-profile 2>&1" -PassThru -NoNewWindow -RedirectStandardOutput $(Build.ArtifactStagingDirectory)/playwright.log
Write-Host "##vso[task.setvariable variable=AcceptanceTestProcessId]$($process.Id)"
displayName: Run application (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['additionalEnvironmentVariables'], 'false'))
workingDirectory: $(Agent.BuildDirectory)/app
+105
View File
@@ -0,0 +1,105 @@
parameters:
- name: ASPNETCORE_URLS
type: string
default: ''
- name: testCommand
type: string
default: ''
- name: port
type: string
default: ''
- name: AZUREB2CTESTUSEREMAIL
type: string
default: ''
- name: AZUREB2CTESTUSERPASSWORD
type: string
default: ''
- name: DatabaseType
type: string
default: ''
steps:
# Ensures we have the package wait-on installed
- pwsh: npm install wait-on
displayName: Install wait-on package
# Wait for either the port of the aspnetcore url
- pwsh: |
$Port = "${{ parameters.port }}"
$Url = "${{ parameters.ASPNETCORE_URLS }}"
if ($Port -ne "") {
Write-Host "Waiting on TCP port $Port"
npx wait-on -v --interval 1000 --timeout 120000 "tcp:$Port"
} else {
Write-Host "Waiting on URL $Url"
npx wait-on -v --interval 1000 --timeout 120000 "$Url"
}
displayName: Wait for application
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install chromium
displayName: Install Playwright only with Chromium browser
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- pwsh: ${{ parameters.testCommand }}
displayName: Run Playwright tests
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
CommitId: $(Build.SourceVersion)
AgentOs: $(Agent.OS)
AZUREADB2CTESTUSEREMAIL: ${{ parameters.AZUREB2CTESTUSEREMAIL }}
AZUREADB2CTESTUSERPASSWORD: ${{ parameters.AZUREB2CTESTUSERPASSWORD }}
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(succeededOrFailed(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
displayName: Stop application (Windows)
condition: and(succeededOrFailed(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
- ${{ if eq(parameters.DatabaseType, 'SQLServer') }}:
# Stop SQL Server
- pwsh: docker stop mssql
displayName: Stop SQL Server Docker image (Linux)
condition: and(succeededOrFailed(), eq(variables['Agent.OS'], 'Linux'))
- pwsh: SqlLocalDB stop MSSQLLocalDB
displayName: Stop SQL Server LocalDB (Windows)
condition: and(succeededOrFailed(), eq(variables['Agent.OS'], 'Windows_NT'))
# Copy artifacts
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
}
displayName: Copy Playwright results
condition: succeededOrFailed()
# Publish
- task: PublishPipelineArtifact@1
displayName: Publish test artifacts
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
# Publish test results
- task: PublishTestResults@2
displayName: "Publish test results"
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '*.xml'
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
testRunTitle: "$(Agent.JobName)"
+50
View File
@@ -0,0 +1,50 @@
parameters:
- name: nodeVersion
type: string
default: ''
- name: PlaywrightUserEmail
type: string
default: ''
- name: PlaywrightPassword
type: string
default: ''
- name: ASPNETCORE_URLS
type: string
default: ''
- name: npm_config_cache
type: string
default: ''
steps:
- task: DownloadPipelineArtifact@2
displayName: Download NuGet artifacts
inputs:
artifact: nupkg
path: $(Agent.BuildDirectory)/app/nupkg
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
- template: templates/e2e-install.yml
parameters:
nodeVersion: ${{ parameters.nodeVersion }}
npm_config_cache: ${{ parameters.npm_config_cache }}
PlaywrightUserEmail: ${{ parameters.PlaywrightUserEmail }}
PlaywrightPassword: ${{ parameters.PlaywrightPassword }}
ASPNETCORE_URLS: ${{ parameters.ASPNETCORE_URLS }}
# Install Template
- pwsh: |
$cmsVersion = "$(Build.BuildNumber)" -replace "\+",".g"
dotnet new nugetconfig
dotnet nuget add source ./nupkg --name Local
dotnet new install Umbraco.Templates::$cmsVersion
dotnet new umbraco --name UmbracoProject --version $cmsVersion --exclude-gitignore --no-restore --no-update-check
displayName: Install Template
workingDirectory: $(Agent.BuildDirectory)/app
+603 -271
View File
@@ -8,8 +8,31 @@ schedules:
displayName: Daily midnight build
branches:
include:
- v14/dev
- v15/dev
- v16/dev
- main
parameters:
- name: skipIntegrationTests
displayName: Skip integration tests
type: boolean
default: false
- name: skipDifferentAppSettingsAcceptanceTests
displayName: Skip acceptance tests with different app settings
type: boolean
default: false
- name: skipDefaultConfigAcceptanceTests
displayName: Skip tests with DefaultConfig
type: boolean
default: false
# Can we slow our tests down when running on SQLite? That way we might be able to avoid DB locks
- name: skipSqliteAcceptanceTests
displayName: Skip SQLite acceptance tests
type: boolean
default: true
variables:
nodeVersion: 20
@@ -32,25 +55,17 @@ stages:
- job: A
displayName: Build Umbraco CMS
pool:
vmImage: 'ubuntu-latest'
vmImage: "windows-latest"
steps:
- checkout: self
fetchDepth: 0
submodules: true
submodules: false
lfs: false,
fetchDepth: 500
- template: templates/backoffice-install.yml
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
- template: templates/backoffice-install.yml
- script: npm run build:for:cms
displayName: Run build (Bellissima)
workingDirectory: src/Umbraco.Web.UI.Client
- script: npm ci --no-fund --no-audit --prefer-offline
displayName: Run npm ci (Login)
workingDirectory: src/Umbraco.Web.UI.Login
- script: npm run build
displayName: Run npm build (Login)
workingDirectory: src/Umbraco.Web.UI.Login
- task: DotNetCoreCLI@2
displayName: Run dotnet restore
inputs:
@@ -62,7 +77,7 @@ stages:
inputs:
command: build
projects: $(solution)
arguments: '--configuration $(buildConfiguration) --no-restore --property:ContinuousIntegrationBuild=true --property:GeneratePackageOnBuild=true --property:PackageOutputPath=$(Build.ArtifactStagingDirectory)/nupkg'
arguments: "--configuration $(buildConfiguration) --no-restore --property:ContinuousIntegrationBuild=true --property:GeneratePackageOnBuild=true --property:PackageOutputPath=$(Build.ArtifactStagingDirectory)/nupkg"
- task: PublishPipelineArtifact@1
displayName: Publish nupkg
inputs:
@@ -74,8 +89,238 @@ stages:
targetPath: $(Build.SourcesDirectory)
artifactName: build_output
- stage: E2E
displayName: E2E Tests
- job: B
displayName: Build Bellissima Package
pool:
vmImage: "ubuntu-latest"
steps:
- checkout: self
submodules: false
lfs: false,
fetchDepth: 500
- template: templates/backoffice-install.yml
- script: npm run build:for:npm
displayName: Run build:for:npm
workingDirectory: src/Umbraco.Web.UI.Client
- bash: |
echo "##[command]Running npm pack"
echo "##[debug]Output directory: $(Build.ArtifactStagingDirectory)"
mkdir $(Build.ArtifactStagingDirectory)/npm
npm pack --pack-destination $(Build.ArtifactStagingDirectory)/npm
mv .npmrc $(Build.ArtifactStagingDirectory)/npm/
displayName: Run npm pack
workingDirectory: src/Umbraco.Web.UI.Client
- task: PublishPipelineArtifact@1
displayName: Publish Bellissima npm artifact
inputs:
targetPath: $(Build.ArtifactStagingDirectory)/npm
artifactName: npm
- stage: Integration
displayName: Integration Tests
dependsOn: Build
condition: ${{ eq(parameters.skipIntegrationTests, false) }}
jobs:
# Integration Tests (SQLite)
- job:
timeoutInMinutes: 180
displayName: Integration Tests (SQLite)
strategy:
matrix:
# Windows:
# vmImage: 'windows-latest'
# We split the tests into 4 parts for each OS to reduce the time it takes to run them on the pipeline
LinuxPart1Of4:
vmImage: "ubuntu-latest"
# Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)"
LinuxPart2Of4:
vmImage: "ubuntu-latest"
# Filter tests that are part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure.Service)"
LinuxPart3Of4:
vmImage: "ubuntu-latest"
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
LinuxPart4Of4:
vmImage: "ubuntu-latest"
# Filter tests that are part of the ManagementApi namespace
testFilter: "(FullyQualifiedName~ManagementApi)"
macOSPart1Of4:
vmImage: "macOS-latest"
# Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)"
macOSPart2Of4:
vmImage: "macOS-latest"
# Filter tests that are part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure.Service)"
macOSPart3Of4:
vmImage: "macOS-latest"
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace.
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
macOSPart4Of4:
vmImage: "macOS-latest"
# Filter tests that are part of the ManagementApi namespace.
testFilter: "(FullyQualifiedName~ManagementApi)"
pool:
vmImage: $(vmImage)
variables:
Tests__Database__DatabaseType: "Sqlite"
steps:
- checkout: self
submodules: false
lfs: false,
fetchDepth: 1
fetchFilter: tree:0
# Setup test environment
- task: DownloadPipelineArtifact@2
displayName: Download build artifacts
inputs:
artifact: build_output
path: $(Build.SourcesDirectory)
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
# Test
- task: DotNetCoreCLI@2
displayName: Run dotnet test
inputs:
command: test
projects: "tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj"
testRunTitle: Integration Tests SQLite - $(Agent.OS)
arguments: '--filter "$(testFilter)" --configuration $(buildConfiguration) --no-build'
# Integration Tests (SQL Server)
- job:
timeoutInMinutes: 180
displayName: Integration Tests (SQL Server)
variables:
SA_PASSWORD: UmbracoAcceptance123!
strategy:
matrix:
# We split the tests into 4 parts for each OS to reduce the time it takes to run them on the pipeline
WindowsPart1Of4:
vmImage: "windows-latest"
Tests__Database__DatabaseType: LocalDb
Tests__Database__SQLServerMasterConnectionString: N/A
# Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)"
WindowsPart2Of4:
vmImage: "windows-latest"
Tests__Database__DatabaseType: LocalDb
Tests__Database__SQLServerMasterConnectionString: N/A
# Filter tests that are part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure.Service)"
WindowsPart3Of4:
vmImage: "windows-latest"
Tests__Database__DatabaseType: LocalDb
Tests__Database__SQLServerMasterConnectionString: N/A
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace.
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
WindowsPart4Of4:
vmImage: "windows-latest"
Tests__Database__DatabaseType: LocalDb
Tests__Database__SQLServerMasterConnectionString: N/A
# Filter tests that are part of the ManagementApi namespace.
testFilter: "(FullyQualifiedName~ManagementApi)"
LinuxPart1Of4:
vmImage: "ubuntu-latest"
Tests__Database__DatabaseType: SqlServer
Tests__Database__SQLServerMasterConnectionString: "Server=(local);User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
# Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)"
LinuxPart2Of4:
vmImage: "ubuntu-latest"
Tests__Database__DatabaseType: SqlServer
Tests__Database__SQLServerMasterConnectionString: "Server=(local);User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
# Filter tests that are part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure.Service)"
LinuxPart3Of4:
vmImage: "ubuntu-latest"
Tests__Database__DatabaseType: SqlServer
Tests__Database__SQLServerMasterConnectionString: "Server=(local);User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace.
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
LinuxPart4Of4:
vmImage: "ubuntu-latest"
Tests__Database__DatabaseType: SqlServer
Tests__Database__SQLServerMasterConnectionString: "Server=(local);User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
# Filter tests that are part of the ManagementApi namespace.
testFilter: "(FullyQualifiedName~ManagementApi)"
pool:
vmImage: $(vmImage)
steps:
# Setup test environment
- task: DownloadPipelineArtifact@2
displayName: Download build artifacts
inputs:
artifact: build_output
path: $(Build.SourcesDirectory)
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
# Start SQL Server
- powershell: docker run --name mssql -d -p 1433:1433 -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$(SA_PASSWORD)" mcr.microsoft.com/mssql/server:2022-latest
displayName: Start SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- powershell: |
$maxAttempts = 12
$attempt = 0
$status = ""
while (($status -ne 'running') -and ($attempt -lt $maxAttempts)) {
Start-Sleep -Seconds 5
# We use the docker inspect command to check the status of the container. If the container is not running, we wait 5 seconds and try again. And if reaches 12 attempts, we fail the build.
$status = docker inspect -f '{{.State.Status}}' mssql
if ($status -ne 'running') {
Write-Host "Waiting for SQL Server to be ready... Attempt $($attempt + 1)"
$attempt++
}
}
if ($status -eq 'running') {
Write-Host "SQL Server container is running"
docker ps -a
} else {
Write-Host "SQL Server did not become ready in time. Last known status: $status"
docker logs mssql
exit 1
}
displayName: Wait for SQL Server to be ready (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- pwsh: SqlLocalDB start MSSQLLocalDB
displayName: Start SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
# Test
- task: DotNetCoreCLI@2
displayName: Run dotnet test
inputs:
command: test
projects: "tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj"
testRunTitle: Integration Tests SQL Server - $(Agent.OS)
arguments: '--filter "$(testFilter)" --configuration $(buildConfiguration) --no-build'
# Stop SQL Server
- pwsh: docker stop mssql
displayName: Stop SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- pwsh: SqlLocalDB stop MSSQLLocalDB
displayName: Stop SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
- stage: DefaultConfigE2E
displayName: Default Config E2E Tests
dependsOn: Build
variables:
npm_config_cache: $(Pipeline.Workspace)/.npm_e2e
@@ -103,338 +348,425 @@ stages:
- job:
displayName: E2E Tests (SQLite)
timeoutInMinutes: 180
condition: ${{ and(eq(parameters.skipDefaultConfigAcceptanceTests, false), eq(parameters.skipSqliteAcceptanceTests, false)) }}
variables:
# Connection string
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=Umbraco;Mode=Memory;Cache=Shared;Foreign Keys=True;Pooling=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.Sqlite
DatabaseType: SQLite
additionalEnvironmentVariables: false
strategy:
matrix:
LinuxPart1Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run test -- --shard=1/3"
testFolder: "DefaultConfig"
testCommand: "npm run testSqlite -- --shard=1/3"
LinuxPart2Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run test -- --shard=2/3"
testFolder: "DefaultConfig"
testCommand: "npm run testSqlite -- --shard=2/3"
LinuxPart3Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run test -- --shard=3/3"
testFolder: "DefaultConfig"
testCommand: "npm run testSqlite -- --shard=3/3"
WindowsPart1Of3:
vmImage: "windows-latest"
testCommand: "npm run test -- --shard=1/3"
testFolder: "DefaultConfig"
testCommand: "npm run testSqlite -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testCommand: "npm run test -- --shard=2/3"
testFolder: "DefaultConfig"
testCommand: "npm run testSqlite -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testCommand: "npm run test -- --shard=3/3"
testFolder: "DefaultConfig"
testCommand: "npm run testSqlite -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
# Setup test environment
- task: DownloadPipelineArtifact@2
displayName: Download NuGet artifacts
inputs:
artifact: nupkg
path: $(Agent.BuildDirectory)/app/nupkg
- task: NodeTool@0
displayName: Use Node.js $(nodeVersion)
retryCountOnTaskFailure: 3
inputs:
versionSpec: $(nodeVersion)
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
# Setup test environment Template
- template: nightly-E2E-setup-template.yml
parameters:
nodeVersion: ${{ variables.nodeVersion }}
PlaywrightUserEmail: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL }}
PlaywrightPassword: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD }}
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
npm_config_cache: ${{ variables.npm_config_cache }}
- pwsh: |
"UMBRACO_USER_LOGIN=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL)
UMBRACO_USER_PASSWORD=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
URL=$(ASPNETCORE_URLS)
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
# Cache and restore NPM packages
- task: Cache@2
displayName: Cache NPM packages
inputs:
key: 'npm_e2e | "$(Agent.OS)" | $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/package-lock.json'
restoreKeys: |
npm_e2e | "$(Agent.OS)"
npm_e2e
path: $(npm_config_cache)
- script: npm ci --no-fund --no-audit --prefer-offline
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
displayName: Restore NPM packages
# Build application
- pwsh: |
$cmsVersion = "$(Build.BuildNumber)" -replace "\+",".g"
dotnet new nugetconfig
dotnet nuget add source ./nupkg --name Local
dotnet new install Umbraco.Templates::$cmsVersion
dotnet new umbraco --name UmbracoProject --version $cmsVersion --exclude-gitignore --no-restore --no-update-check
dotnet restore UmbracoProject
cp $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest.UmbracoProject/*.cs UmbracoProject
dotnet build UmbracoProject --configuration $(buildConfiguration) --no-restore
displayName: Restore project
workingDirectory: $(Agent.BuildDirectory)/app
- pwsh: |
dotnet build UmbracoProject --configuration ${{ variables.buildConfiguration }} --no-restore
dotnet dev-certs https
displayName: Build application
workingDirectory: $(Agent.BuildDirectory)/app
condition: succeeded()
# Run application
- bash: |
nohup dotnet run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1 &
echo "##vso[task.setvariable variable=AcceptanceTestProcessId]$!"
displayName: Run application (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
workingDirectory: $(Agent.BuildDirectory)/app
# Run application Template
- template: nightly-E2E-run-application-template.yml
parameters:
DatabaseType: ${{ variables.DatabaseType }}
buildConfiguration: ${{ variables.buildConfiguration }}
additionalEnvironmentVariables: ${{ variables.additionalEnvironmentVariables }}
- pwsh: |
$process = Start-Process dotnet "run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile 2>&1" -PassThru -NoNewWindow -RedirectStandardOutput $(Build.ArtifactStagingDirectory)/playwright.log
Write-Host "##vso[task.setvariable variable=AcceptanceTestProcessId]$($process.Id)"
displayName: Run application (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
workingDirectory: $(Agent.BuildDirectory)/app
# Ensures we have the package wait-on installed
- pwsh: npm install wait-on
displayName: Install wait-on package
# Wait for application to start responding to requests
- pwsh: npx wait-on -v --interval 1000 --timeout 120000 $(ASPNETCORE_URLS)
displayName: Wait for application
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install --with-deps
displayName: Install Playwright
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- pwsh: $(testCommand)
displayName: Run Playwright tests
continueOnError: true
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
CommitId: $(Build.SourceVersion)
AgentOs: $(Agent.OS)
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
displayName: Stop application (Windows)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
# Copy artifacts
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
}
displayName: Copy Playwright results
condition: succeededOrFailed()
# Publish
- task: PublishPipelineArtifact@1
displayName: Publish test artifacts
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
# Publish test results
- task: PublishTestResults@2
displayName: "Publish test results"
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '*.xml'
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
testRunTitle: "$(Agent.JobName)"
# Run tests Template
- template: nightly-E2E-run-tests-template.yml
parameters:
testCommand: $(testCommand)
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
DatabaseType: ${{ variables.DatabaseType }}
- job:
displayName: E2E Tests (SQL Server)
timeoutInMinutes: 180
condition: ${{ eq(parameters.skipDefaultConfigAcceptanceTests, false) }}
variables:
# Connection string
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Umbraco.mdf;Integrated Security=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
DatabaseType: SQLServer
SA_PASSWORD: UmbracoAcceptance123!
additionalEnvironmentVariables: false
strategy:
matrix:
LinuxPart1Of3:
testCommand: "npm run testSqlite -- --shard=1/3"
testCommand: "npm run test -- --shard=1/3"
testFolder: "DefaultConfig"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
LinuxPart2Of3:
testCommand: "npm run testSqlite -- --shard=2/3"
testCommand: "npm run test -- --shard=2/3"
testFolder: "DefaultConfig"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
LinuxPart3Of3:
testCommand: "npm run testSqlite -- --shard=3/3"
testCommand: "npm run test -- --shard=3/3"
testFolder: "DefaultConfig"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
WindowsPart1Of3:
testCommand: "npm run testWindows -- --shard=1/3"
testFolder: "DefaultConfig"
vmImage: "windows-latest"
testCommand: "npm run testSqlite -- --shard=1/3"
WindowsPart2Of3:
testCommand: "npm run testWindows -- --shard=2/3"
testFolder: "DefaultConfig"
vmImage: "windows-latest"
testCommand: "npm run testSqlite -- --shard=2/3"
WindowsPart3Of3:
testCommand: "npm run testWindows -- --shard=3/3"
testFolder: "DefaultConfig"
vmImage: "windows-latest"
testCommand: "npm run testSqlite -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
# Setup test environment
- task: DownloadPipelineArtifact@2
displayName: Download NuGet artifacts
inputs:
artifact: nupkg
path: $(Agent.BuildDirectory)/app/nupkg
- task: NodeTool@0
displayName: Use Node.js $(nodeVersion)
inputs:
versionSpec: $(nodeVersion)
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
# Setup test environment Template
- template: nightly-E2E-setup-template.yml
parameters:
nodeVersion: ${{ variables.nodeVersion }}
PlaywrightUserEmail: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL }}
PlaywrightPassword: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD }}
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
npm_config_cache: ${{ variables.npm_config_cache }}
- pwsh: |
"UMBRACO_USER_LOGIN=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL)
UMBRACO_USER_PASSWORD=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
URL=$(ASPNETCORE_URLS)
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
# Cache and restore NPM packages
- task: Cache@2
displayName: Cache NPM packages
inputs:
key: 'npm_e2e | "$(Agent.OS)" | $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/package-lock.json'
restoreKeys: |
npm_e2e | "$(Agent.OS)"
npm_e2e
path: $(npm_config_cache)
- script: npm ci --no-fund --no-audit --prefer-offline
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
displayName: Restore NPM packages
# Build application
- pwsh: |
$cmsVersion = "$(Build.BuildNumber)" -replace "\+",".g"
dotnet new nugetconfig
dotnet nuget add source ./nupkg --name Local
dotnet new install Umbraco.Templates::$cmsVersion
dotnet new umbraco --name UmbracoProject --version $cmsVersion --exclude-gitignore --no-restore --no-update-check
dotnet restore UmbracoProject
cp $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest.UmbracoProject/*.cs UmbracoProject
dotnet build UmbracoProject --configuration $(buildConfiguration) --no-restore
displayName: Restore project
workingDirectory: $(Agent.BuildDirectory)/app
- pwsh: |
dotnet build UmbracoProject --configuration ${{ variables.buildConfiguration }} --no-restore
dotnet dev-certs https
displayName: Build application
workingDirectory: $(Agent.BuildDirectory)/app
condition: succeeded()
# Start SQL Server
- powershell: docker run --name mssql -d -p 1433:1433 -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$(SA_PASSWORD)" mcr.microsoft.com/mssql/server:2022-latest
displayName: Start SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
# Run application Template
- template: nightly-E2E-run-application-template.yml
parameters:
SA_PASSWORD: ${{ variables.SA_PASSWORD }}
buildConfiguration: ${{ variables.buildConfiguration }}
DatabaseType: ${{ variables.DatabaseType }}
additionalEnvironmentVariables: ${{ variables.additionalEnvironmentVariables }}
- pwsh: SqlLocalDB start MSSQLLocalDB
displayName: Start SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
# Run tests Template
- template: nightly-E2E-run-tests-template.yml
parameters:
testCommand: $(testCommand)
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
DatabaseType: ${{ variables.DatabaseType }}
# Run application
- stage: AdditionalConfigE2E
displayName: Additional Config E2E Tests
dependsOn: Build
variables:
npm_config_cache: $(Pipeline.Workspace)/.npm_e2e
ASPNETCORE_URLS: https://localhost:44331
PlaywrightPassword: UmbracoAcceptance123!
PlaywrightUserEmail: playwright@umbraco.com
jobs:
- job:
displayName: E2E Tests with Different App settings (SQL Server)
condition: ${{ eq(parameters.skipDifferentAppSettingsAcceptanceTests, false) }}
timeoutInMinutes: 180
variables:
SA_PASSWORD: UmbracoAcceptance123!
DatabaseType: SQLServer
strategy:
matrix:
# UnattendedInstallConfig
WindowsUnattendedInstallConfig:
vmImage: "windows-latest"
testFolder: "UnattendedInstallConfig"
testCommand: "npx playwright test --project=unattendedInstallConfig --grep=InstallSQLServer"
port: 44331
additionalEnvironmentVariables: false
# DeliveryApiConfig
WindowsDeliveryApiConfig:
vmImage: "windows-latest"
testFolder: "DeliveryApi"
port: ''
testCommand: "npx playwright test --project=deliveryApi"
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Umbraco.mdf;Integrated Security=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
additionalEnvironmentVariables: false
LinuxDeliveryApiConfig:
vmImage: "ubuntu-latest"
testFolder: "DeliveryApi"
port: ''
testCommand: "npx playwright test --project=deliveryApi"
CONNECTIONSTRINGS__UMBRACODBDSN: Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
additionalEnvironmentVariables: false
# ExternalLogin AzureADB2C
WindowsExternalLoginAzureADB2C:
vmImage: "windows-latest"
testFolder: "ExternalLogin\\AzureADB2C"
testCommand: "npx playwright test --project=externalLoginAzureADB2C"
port: 44331
packageName: "Microsoft.AspNetCore.Authentication.OpenIdConnect"
packageVersion: "9.0.8"
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Umbraco.mdf;Integrated Security=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
additionalEnvironmentVariables: true
# ExtensionRegistry
WindowsExtensionRegistry:
vmImage: "windows-latest"
testFolder: "ExtensionRegistry"
port: ''
testCommand: "npx playwright test --project=extensionRegistry"
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Umbraco.mdf;Integrated Security=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
additionalEnvironmentVariables: false
LinuxExtensionRegistry:
vmImage: "ubuntu-latest"
testFolder: "ExtensionRegistry"
port: ''
testCommand: "npx playwright test --project=extensionRegistry"
CONNECTIONSTRINGS__UMBRACODBDSN: Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
additionalEnvironmentVariables: false
# EntityDataPicker
WindowsEntityDataPicker:
vmImage: "windows-latest"
testFolder: "EntityDataPicker"
port: ''
testCommand: "npx playwright test --project=entityDataPicker"
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Umbraco.mdf;Integrated Security=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
additionalEnvironmentVariables: false
LinuxEntityDataPicker:
vmImage: "ubuntu-latest"
testFolder: "EntityDataPicker"
port: ''
testCommand: "npx playwright test --project=entityDataPicker"
CONNECTIONSTRINGS__UMBRACODBDSN: Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
additionalEnvironmentVariables: false
# ContentSettingConfig
WindowsContentSettingsConfig:
vmImage: "windows-latest"
testFolder: "ContentSettingConfig"
port: ''
testCommand: "npx playwright test --project=contentSettingConfig"
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Umbraco.mdf;Integrated Security=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
additionalEnvironmentVariables: false
LinuxContentSettingsConfig:
vmImage: "ubuntu-latest"
testFolder: "ContentSettingConfig"
port: ''
testCommand: "npx playwright test --project=contentSettingConfig"
CONNECTIONSTRINGS__UMBRACODBDSN: Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
additionalEnvironmentVariables: false
# SMTP
LinuxSMTP:
vmImage: "ubuntu-latest"
testFolder: "SMTP"
port: ''
testCommand: "npx playwright test --project=smtp"
CONNECTIONSTRINGS__UMBRACODBDSN: Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
additionalEnvironmentVariables: false
pool:
vmImage: $(vmImage)
steps:
# Setup test environment Template
- template: nightly-E2E-setup-template.yml
parameters:
nodeVersion: ${{ variables.nodeVersion }}
PlaywrightUserEmail: ${{ variables.PlaywrightUserEmail }}
PlaywrightPassword: ${{ variables.PlaywrightPassword }}
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
npm_config_cache: ${{ variables.npm_config_cache }}
# Install NuGet package if specified in the matrix
- pwsh: |
Write-Host "Installing package $(packageName) version $(packageVersion)"
dotnet add package $(packageName) --version $(packageVersion)
displayName: "Install NuGet package: $(packageName)"
workingDirectory: $(Agent.BuildDirectory)/app/UmbracoProject
condition: and(succeeded(), ne(variables['packageName'], ''), ne(variables['packageVersion'], ''))
# Build application Template
- template: nightly-E2E-build-template.yml
parameters:
testFolder: $(testFolder)
buildConfiguration: ${{ variables.buildConfiguration }}
additionalEnvironmentVariables: $(additionalEnvironmentVariables)
# Build application for AzureADB2C
- pwsh: |
dotnet build UmbracoProject --configuration ${{ variables.buildConfiguration }} --no-restore
dotnet dev-certs https
displayName: Build application for AzureADB2C
workingDirectory: $(Agent.BuildDirectory)/app
env:
AZUREADB2CDOMAIN: $(AZUREB2CDOMAIN)
AZUREADB2CTENANT: $(AZUREB2CTENANT)
AZUREADB2CPOLICY: $(AZUREB2CPOLICY)
AZUREADB2CCLIENTID: $(AZUREB2CCLIENTID)
AZUREADB2CCLIENTSECRET: $(AZUREB2CCLIENTSECRET)
condition: and(succeeded(), eq(variables['testFolder'], 'ExternalLogin\AzureADB2C'))
# Run application Template
- template: nightly-E2E-run-application-template.yml
parameters:
SA_PASSWORD: ${{ variables.SA_PASSWORD }}
additionalEnvironmentVariables: $(additionalEnvironmentVariables)
buildConfiguration: ${{ variables.buildConfiguration }}
DatabaseType: ${{ variables.DatabaseType }}
# Run application for Linux with additional Environment Variables for Azure AD
- bash: |
nohup dotnet run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1 &
nohup dotnet run --project UmbracoProject --configuration ${{ variables.buildConfiguration }} --no-build --no-launch-profile > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1 &
echo "##vso[task.setvariable variable=AcceptanceTestProcessId]$!"
displayName: Run application (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'), eq(variables['testFolder'], 'ExternalLogin\AzureADB2C'))
workingDirectory: $(Agent.BuildDirectory)/app
env:
AZUREADB2CDOMAIN: $(AZUREB2CDOMAIN)
AZUREADB2CTENANT: $(AZUREB2CTENANT)
AZUREADB2CPOLICY: $(AZUREB2CPOLICY)
AZUREADB2CCLIENTID: $(AZUREB2CCLIENTID)
AZUREADB2CCLIENTSECRET: $(AZUREB2CCLIENTSECRET)
# Run application for Windows with additional Environment Variables for Azure AD
- pwsh: |
$process = Start-Process dotnet "run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile 2>&1" -PassThru -NoNewWindow -RedirectStandardOutput $(Build.ArtifactStagingDirectory)/playwright.log
$process = Start-Process dotnet "run --project UmbracoProject --configuration ${{ variables.buildConfiguration }} --no-build --no-launch-profile 2>&1" -PassThru -NoNewWindow -RedirectStandardOutput $(Build.ArtifactStagingDirectory)/playwright.log
Write-Host "##vso[task.setvariable variable=AcceptanceTestProcessId]$($process.Id)"
displayName: Run application (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['testFolder'], 'ExternalLogin\AzureADB2C'))
workingDirectory: $(Agent.BuildDirectory)/app
# Ensures we have the package wait-on installed
- pwsh: npm install wait-on
displayName: Install wait-on package
# Wait for application to start responding to requests
- pwsh: npx wait-on -v --interval 1000 --timeout 120000 $(ASPNETCORE_URLS)
displayName: Wait for application
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install --with-deps
displayName: Install Playwright
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- pwsh: $(testCommand)
displayName: Run Playwright tests
continueOnError: true
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
CommitId: $(Build.SourceVersion)
AgentOs: $(Agent.OS)
AZUREADB2CDOMAIN: $(AZUREB2CDOMAIN)
AZUREADB2CTENANT: $(AZUREB2CTENANT)
AZUREADB2CPOLICY: $(AZUREB2CPOLICY)
AZUREADB2CCLIENTID: $(AZUREB2CCLIENTID)
AZUREADB2CCLIENTSECRET: $(AZUREB2CCLIENTSECRET)
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
# Start SMTP4dev via Docker for SMTP tests
- bash: |
echo "Starting SMTP4dev container..."
docker run -d --name smtp4dev -p 5000:80 -p 25:25 rnwood/smtp4dev
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
displayName: Stop application (Windows)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
echo "Waiting for SMTP4dev to be ready..."
for i in {1..30}; do
if curl -s http://localhost:5000/api/messages > /dev/null; then
echo "SMTP4dev is ready"
break
fi
echo "Attempt $i: Waiting for SMTP4dev..."
sleep 2
done
displayName: Start SMTP4dev Docker container (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'), contains(variables['testFolder'], 'SMTP'))
# Stop SQL Server
- pwsh: docker stop mssql
displayName: Stop SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
# Run tests Template
- template: nightly-E2E-run-tests-template.yml
parameters:
testCommand: $(testCommand)
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
port: $(port)
AZUREB2CTESTUSEREMAIL: $(AZUREB2CTESTUSEREMAIL)
AZUREB2CTESTUSERPASSWORD: $(AZUREB2CTESTUSERPASSWORD)
DatabaseType: ${{ variables.DatabaseType }}
- pwsh: SqlLocalDB stop MSSQLLocalDB
displayName: Stop SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
# Stop SMTP4dev container
- bash: |
echo "Stopping SMTP4dev container..."
docker stop smtp4dev
docker rm smtp4dev
displayName: Stop SMTP4dev Docker container
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'), contains(variables['testFolder'], 'SMTP'))
# Copy artifacts
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
}
displayName: Copy Playwright results
condition: succeededOrFailed()
- stage: NotifySlackBot
displayName: Notify Slack on Failure
dependsOn: DefaultConfigE2E
# This stage will only run if the E2E tests fail or succeed with issues
condition: or(eq(dependencies.DefaultConfigE2E.result, 'failed'), eq(dependencies.DefaultConfigE2E.result, 'succeededWithIssues'))
jobs:
- job: PostToSlack
displayName: Send Slack Notification
pool:
vmImage: 'ubuntu-latest'
steps:
# We send a payload to the Slack webhook URL, which will post a message to a specific channel
- bash: |
PROJECT_NAME_ENCODED=$(echo -n "$SYSTEM_TEAMPROJECT" | jq -s -R -r @uri)
PIPELINE_URL="${SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${PROJECT_NAME_ENCODED}/_build/results?buildId=${BUILD_BUILDID}&view=ms.vss-test-web.build-test-results-tab"
# Publish
- task: PublishPipelineArtifact@1
displayName: Publish test artifacts
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
# Publish test results
- task: PublishTestResults@2
displayName: "Publish test results"
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '*.xml'
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
testRunTitle: "$(Agent.JobName)"
PAYLOAD="{
\"attachments\": [
{
\"color\": \"#ff0000\",
\"pretext\": \"Nightly E2E pipeline *${BUILD_DEFINITIONNAME}* (#${BUILD_BUILDNUMBER}) failed!\",
\"title\": \"View Failed E2E Test Results\",
\"title_link\": \"$PIPELINE_URL\",
\"fields\": [
{
\"title\": \"Pipeline\",
\"value\": \"${BUILD_DEFINITIONNAME}\",
\"short\": true
},
{
\"title\": \"Build ID\",
\"value\": \"${BUILD_BUILDID}\",
\"short\": true
}
]
}
]
}"
echo "Sending Slack message to: $PIPELINE_URL"
curl -X POST -H 'Content-type: application/json' \
--data "$PAYLOAD" \
"$SLACK_WEBHOOK_URL"
env:
SLACK_WEBHOOK_URL: $(E2ESLACKWEBHOOKURL)
+1 -3
View File
@@ -8,11 +8,9 @@ schedules:
displayName: Daily midnight build
branches:
include:
- v10/dev
- v13/dev
- v14/dev
- v15/dev
- v16/dev
- main
steps:
- checkout: none
+55
View File
@@ -0,0 +1,55 @@
parameters:
- name: projectName
type: string
- name: umbracoVersion
type: string
- name: projects
type: object
jobs:
- job: Create_DT_Project
displayName: Create Dependency Track Project
steps:
- checkout: none
- bash: |
project_id=$(curl --no-progress-meter -H "X-Api-Key: $(DT_API_KEY)" "$(DT_API_URI)/api/v1/project/lookup?name=${{ parameters.projectName }}&version=${{ parameters.umbracoVersion }}" | jq -r '.uuid')
if [ "$project_id" != "null" ] && [ -n "$project_id" ]; then
echo "Project '${{ parameters.projectName }}' with version '${{ parameters.umbracoVersion }}' already exists (ID: $project_id)."
else
project_id=$(curl --no-progress-meter \
-X PUT "$(DT_API_URI)/api/v1/project" \
-H "X-Api-Key: $(DT_API_KEY)" \
-H "Content-Type: application/json" \
-d '{"name": "${{ parameters.projectName }}", "version": "${{ parameters.umbracoVersion }}", "collectionLogic": "AGGREGATE_DIRECT_CHILDREN"}' \
| jq -r '.uuid')
if [ -z "$project_id" ] || [ "$project_id" == "null" ]; then
echo "Failed to create project '${{ parameters.projectName }}' version '${{ parameters.umbracoVersion }}'."
exit 1
fi
echo "Created project '${{ parameters.projectName }}' with version '${{ parameters.umbracoVersion }}' (ID: $project_id)."
fi
displayName: Ensure main project exists in Dependency Track
- ${{ each project in parameters.projects }}:
- job:
displayName: Upload ${{ project.name }} BOM
dependsOn: Create_DT_Project
steps:
- checkout: none
- download: current
artifact: ${{ project.artifact }}
displayName: Download ${{ project.artifact }} artifact
- task: upload-bom-dtrack@1
inputs:
dtrackURI: $(DT_API_URI)
dtrackAPIKey: $(DT_API_KEY)
dtrackProjAutoCreate: true
dtrackProjName: '${{ parameters.projectName }}-${{ project.name }}'
dtrackProjVersion: ${{ parameters.umbracoVersion }}
dtrackParentProjName: ${{ parameters.projectName }}
dtrackParentProjVersion: ${{ parameters.umbracoVersion }}
bomFilePath: '$(Pipeline.Workspace)/${{ project.artifact }}/${{ project.bomFilePath }}'
displayName: Upload ${{ project.name }} BOM to Dependency Track
+49
View File
@@ -0,0 +1,49 @@
parameters:
- name: nodeVersion
type: string
default: ''
- name: npm_config_cache
type: string
default: ''
- name: PlaywrightUserEmail
type: string
default: ''
- name: PlaywrightPassword
type: string
default: ''
- name: ASPNETCORE_URLS
type: string
default: ''
steps:
- task: NodeTool@0
displayName: Use Node.js $(nodeVersion)
inputs:
versionSpec: $(nodeVersion)
- pwsh: |
"UMBRACO_USER_LOGIN=${{ parameters.PlaywrightUserEmail }}
UMBRACO_USER_PASSWORD=${{ parameters.PlaywrightPassword }}
URL=${{ parameters.ASPNETCORE_URLS }}
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json
CONSOLE_ERRORS_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/console-errors.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
# Cache and restore NPM packages
- task: Cache@2
displayName: Cache NPM packages
inputs:
key: 'npm_e2e | "$(Agent.OS)" | $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/package-lock.json'
restoreKeys: |
npm_e2e | "$(Agent.OS)"
npm_e2e
path: ${{ parameters.npm_config_cache }}
- script: npm ci --no-fund --no-audit --prefer-offline
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
displayName: Restore NPM packages
+4
View File
@@ -0,0 +1,4 @@
{
"url": "https://context7.com/umbraco/umbraco-cms",
"public_key": "pk_GTIgsrGAQiHNxCirZBDIM"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.100",
"version": "10.0.100",
"rollForward": "latestFeature",
"allowPrerelease": false
}
@@ -0,0 +1,12 @@
using Microsoft.AspNetCore.Http;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Common.Accessors;
public sealed class RequestContextOutputExpansionStrategyAccessor : RequestContextServiceAccessorBase<IOutputExpansionStrategy>, IOutputExpansionStrategyAccessor
{
public RequestContextOutputExpansionStrategyAccessor(IHttpContextAccessor httpContextAccessor)
: base(httpContextAccessor)
{
}
}
@@ -0,0 +1,20 @@
using System.Diagnostics.CodeAnalysis;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace Umbraco.Cms.Api.Common.Accessors;
public abstract class RequestContextServiceAccessorBase<T>
where T : class
{
private readonly IHttpContextAccessor _httpContextAccessor;
protected RequestContextServiceAccessorBase(IHttpContextAccessor httpContextAccessor)
=> _httpContextAccessor = httpContextAccessor;
public bool TryGetValue([NotNullWhen(true)] out T? requestStartNodeService)
{
requestStartNodeService = _httpContextAccessor.HttpContext?.RequestServices.GetService<T>();
return requestStartNodeService is not null;
}
}
+371
View File
@@ -0,0 +1,371 @@
# Umbraco.Cms.Api.Common
Shared infrastructure for Umbraco CMS REST APIs (Management and Delivery).
---
## 1. Architecture
**Type**: Class Library (NuGet Package)
**Target Framework**: .NET 10.0
**Purpose**: Common API infrastructure - OpenAPI/Swagger, JSON serialization, OpenIddict authentication, problem details
### Key Technologies
- **ASP.NET Core** - Web framework
- **Swashbuckle** - OpenAPI/Swagger documentation generation
- **OpenIddict** - OAuth 2.0/OpenID Connect authentication
- **Asp.Versioning** - API versioning
- **System.Text.Json** - Polymorphic JSON serialization
### Dependencies
- `Umbraco.Core` - Domain models and service contracts
- `Umbraco.Web.Common` - Web functionality
### Project Structure (46 files)
```
Umbraco.Cms.Api.Common/
├── OpenApi/ # Schema/Operation ID handlers for Swagger
│ ├── SchemaIdHandler.cs # Generates schema IDs (e.g., "PagedUserModel")
│ ├── OperationIdHandler.cs # Generates operation IDs
│ └── SubTypesHandler.cs # Polymorphism support
├── Serialization/ # JSON type resolution
│ └── UmbracoJsonTypeInfoResolver.cs
├── Configuration/ # Options configuration
│ ├── ConfigureUmbracoSwaggerGenOptions.cs
│ └── ConfigureOpenIddict.cs
├── DependencyInjection/ # Service registration
│ ├── UmbracoBuilderApiExtensions.cs
│ └── UmbracoBuilderAuthExtensions.cs
├── Builders/ # RFC 7807 problem details
│ └── ProblemDetailsBuilder.cs
├── ViewModels/Pagination/ # Common DTOs
└── Security/ # Auth paths and handlers
```
### Design Patterns
1. **Strategy Pattern** - `ISchemaIdHandler`, `IOperationIdHandler` (extensible via inheritance)
2. **Builder Pattern** - `ProblemDetailsBuilder` for fluent error responses
3. **Options Pattern** - All configuration via `IConfigureOptions<T>`
---
## 2. Commands
See "Quick Reference" section at bottom for common commands.
---
## 3. Key Patterns
### Virtual Handlers for Extensibility
Handlers are intentionally virtual to allow consuming APIs to override:
```csharp
// NOTE: Left unsealed on purpose, so it is extendable.
public class SchemaIdHandler : ISchemaIdHandler
{
public virtual bool CanHandle(Type type) { }
public virtual string Handle(Type type) { }
}
```
**Why**: Management and Delivery APIs can customize schema/operation ID generation.
### Schema ID Sanitization (OpenApi/SchemaIdHandler.cs:24-29, 32)
```csharp
// Add "Model" suffix to avoid TypeScript name clashes (lines 24-29)
if (name.EndsWith("Model") == false)
{
// because some models names clash with common classes in TypeScript (i.e. Document),
// we need to add a "Model" postfix to all models
name = $"{name}Model";
}
// Remove invalid characters to prevent OpenAPI generation errors (line 32)
return Regex.Replace(name, @"[^\w]", string.Empty);
```
### Polymorphic Deserialization (Serialization/UmbracoJsonTypeInfoResolver.cs:29-35)
```csharp
// IMPORTANT: do NOT return an empty enumerable here. it will cause nullability to fail on reference
// properties, because "$ref" does not mix and match well with "nullable" in OpenAPI.
if (type.IsInterface is false)
{
return new[] { type };
}
```
**Why**: Interfaces must return concrete types to avoid OpenAPI schema conflicts.
---
## 4. Testing
**Location**: No direct tests - tested via integration tests in consuming APIs
**How to test changes**:
```bash
# Run integration tests that exercise this library
dotnet test tests/Umbraco.Tests.Integration/
# Verify OpenAPI generation
# 1. Run Management API
# 2. Navigate to /umbraco/swagger/
# 3. Check schema IDs and operation IDs
```
**Focus areas when testing**:
- OpenAPI document generation (schema IDs, operation IDs)
- Polymorphic JSON serialization/deserialization
- OpenIddict authentication flow
- Problem details formatting
---
## 5. OpenIddict Authentication
### Key Configuration (DependencyInjection/UmbracoBuilderAuthExtensions.cs)
**Reference Tokens over JWT** (line 76-80):
```csharp
// Enable reference tokens
// - see https://documentation.openiddict.com/configuration/token-storage.html
options
.UseReferenceAccessTokens()
.UseReferenceRefreshTokens();
```
**Why**: More secure (revocable), better for load balancing, uses ASP.NET Core Data Protection.
**Token Lifetime** (line 88-91):
```csharp
// Make the access token lifetime 25% of the refresh token lifetime
options.SetAccessTokenLifetime(new TimeSpan(timeOut.Ticks / 4));
options.SetRefreshTokenLifetime(timeOut);
```
**PKCE Required** (line 59-63):
```csharp
// Enable authorization code flow with PKCE
options
.AllowAuthorizationCodeFlow()
.RequireProofKeyForCodeExchange()
.AllowRefreshTokenFlow();
```
**Endpoints**: Backoffice `/umbraco/management/api/v1/security/*`, Member `/umbraco/member/api/v1/security/*`
### Secure Cookie-Based Token Storage (v17+)
**Implementation** (DependencyInjection/HideBackOfficeTokensHandler.cs):
Back-office tokens are hidden from client-side JavaScript via HTTP-only cookies:
```csharp
private const string AccessTokenCookieKey = "__Host-umbAccessToken";
private const string RefreshTokenCookieKey = "__Host-umbRefreshToken";
// Tokens are encrypted via Data Protection and stored in cookies
SetCookie(httpContext, AccessTokenCookieKey, context.Response.AccessToken);
context.Response.AccessToken = "[redacted]"; // Client sees redacted value
```
**Key Security Features** (lines 143-165): `HttpOnly`, `IsEssential`, `Path="/"`, `Secure` (HTTPS), `__Host-` prefix
**Configuration**: `BackOfficeTokenCookieSettings.Enabled` (default: true in v17+)
**Implications**: Client-side cannot access tokens; encrypted with Data Protection; load balancing needs shared key ring; API requests need `credentials: include`
---
## 6. Common Issues & Edge Cases
### Polymorphic Deserialization Requires `$type`
**Issue**: Deserializing to an interface without `$type` discriminator fails.
**Handled in** (Json/NamedSystemTextJsonInputFormatter.cs:24-29):
```csharp
catch (NotSupportedException exception)
{
// This happens when trying to deserialize to an interface, without sending the $type as part of the request
context.ModelState.TryAddModelException(string.Empty, new InputFormatterException(exception.Message, exception));
return await InputFormatterResult.FailureAsync();
}
```
**Solution**: Clients must include `$type` property for interface types, or use concrete types.
### Schema ID Collisions with TypeScript
**Issue**: Type names like `Document` clash with TypeScript built-ins.
**Solution**: Add "Model" suffix (OpenApi/SchemaIdHandler.cs:24-29)
### Generic Type Handling
**Issue**: `PagedViewModel<T>` needs flattened schema name.
**Solution** (OpenApi/SchemaIdHandler.cs:41-50):
```csharp
private string HandleGenerics(string name, Type type)
{
if (!type.IsGenericType)
return name;
// use attribute custom name or append the generic type names
// turns "PagedViewModel<RelationItemViewModel>" into "PagedRelationItem"
return $"{name}{string.Join(string.Empty, type.GenericTypeArguments.Select(SanitizedTypeName))}";
}
```
---
## 7. Extending This Library
### Adding a Custom OpenAPI Handler
1. **Implement interface**:
```csharp
public class MySchemaIdHandler : SchemaIdHandler
{
public override bool CanHandle(Type type)
=> type.Namespace?.StartsWith("MyProject") is true;
public override string Handle(Type type)
=> $"My{base.Handle(type)}";
}
```
2. **Register in consuming API**:
```csharp
builder.Services.AddSingleton<ISchemaIdHandler, MySchemaIdHandler>();
```
**Note**: Handlers registered later take precedence in the selector.
### Customizing Problem Details
```csharp
var problemDetails = new ProblemDetailsBuilder()
.WithTitle("Validation Failed")
.WithDetail("The request contains errors")
.WithType("ValidationError")
.WithOperationStatus(MyOperationStatus.ValidationFailed)
.WithRequestModelErrors(errors)
.Build();
return BadRequest(problemDetails);
```
---
## 8. Project-Specific Notes
### Why Virtual Handlers?
**Decision**: Make `SchemaIdHandler`, `OperationIdHandler`, etc. virtual.
**Why**: Management API and Delivery API have different schema ID requirements. Virtual methods allow override without rewriting the entire handler.
**Example**: Management API might prefix all schemas with "Management", Delivery API with "Delivery".
### Performance: Subtype Caching
**Why**: Cache discovered subtypes (UmbracoJsonTypeInfoResolver.cs:14) to avoid expensive reflection calls
### Known Limitations
1. **Polymorphic Deserialization**:
- Requires `$type` discriminator in JSON for interfaces
- Only discovers types in Umbraco namespaces
- Not all .NET types are discoverable
2. **OpenAPI Schema Generation**:
- Generic types are flattened (e.g., `PagedViewModel<T>` → `PagedTModel`)
- Type names may need "Model" suffix to avoid clashes
3. **OpenIddict Multi-Server**:
- Requires shared Data Protection key ring
- All servers must have synchronized clocks (NTP)
- Reference tokens require database storage
### External Dependencies
**OpenIddict**:
- OAuth 2.0 / OpenID Connect provider
- Version: See `Directory.Packages.props`
- Uses ASP.NET Core Data Protection for token encryption
**Swashbuckle**:
- OpenAPI 3.0 document generation
- Custom filters: `EnumSchemaFilter`, `MimeTypeDocumentFilter`, `RemoveSecuritySchemesDocumentFilter`
**Asp.Versioning**:
- API versioning via `ApiVersion` attribute
- API explorer integration for multi-version Swagger docs
### Configuration
**HTTPS**: `DisableTransportSecurityRequirement` for local dev only (ConfigureOpenIddict.cs:14). **Warning**: Never disable in production.
### Usage Pattern
Consuming APIs call `builder.AddUmbracoApiOpenApiUI().AddUmbracoOpenIddict()`
---
## Quick Reference
### Essential Commands
```bash
# Build project
dotnet build src/Umbraco.Cms.Api.Common/Umbraco.Cms.Api.Common.csproj
# Pack for NuGet
dotnet pack src/Umbraco.Cms.Api.Common/Umbraco.Cms.Api.Common.csproj -c Release
# Test via integration tests
dotnet test tests/Umbraco.Tests.Integration/
# Check packages
dotnet list src/Umbraco.Cms.Api.Common/Umbraco.Cms.Api.Common.csproj package --outdated
dotnet list src/Umbraco.Cms.Api.Common/Umbraco.Cms.Api.Common.csproj package --vulnerable
```
### Key Classes
| Class | Purpose | File |
|-------|---------|------|
| `ProblemDetailsBuilder` | Build RFC 7807 error responses | Builders/ProblemDetailsBuilder.cs |
| `SchemaIdHandler` | Generate OpenAPI schema IDs | OpenApi/SchemaIdHandler.cs |
| `UmbracoJsonTypeInfoResolver` | Polymorphic JSON serialization | Serialization/UmbracoJsonTypeInfoResolver.cs |
| `UmbracoBuilderAuthExtensions` | Configure OpenIddict | DependencyInjection/UmbracoBuilderAuthExtensions.cs |
| `HideBackOfficeTokensHandler` | Secure cookie-based token storage | DependencyInjection/HideBackOfficeTokensHandler.cs |
| `PagedViewModel<T>` | Generic pagination model | ViewModels/Pagination/PagedViewModel.cs |
### Important Files
- `Umbraco.Cms.Api.Common.csproj` - Project dependencies
- `DependencyInjection/UmbracoBuilderApiExtensions.cs` - OpenAPI registration (line 12-31)
- `DependencyInjection/UmbracoBuilderAuthExtensions.cs` - OpenIddict setup (line 20-183)
- `Security/Paths.cs` - API endpoint path constants
### Getting Help
- **Root documentation**: `/CLAUDE.md` - Repository overview
- **Core patterns**: `/src/Umbraco.Core/CLAUDE.md` - Core contracts and patterns
- **Official docs**: https://docs.umbraco.com/
- **OpenIddict docs**: https://documentation.openiddict.com/
---
**This library is the foundation for all Umbraco CMS REST APIs. Focus on OpenAPI customization, authentication configuration, and polymorphic serialization when working here.**
@@ -4,7 +4,7 @@ using Umbraco.Cms.Core.Configuration.Models;
namespace Umbraco.Cms.Api.Common.Configuration;
internal class ConfigureOpenIddict : IConfigureOptions<OpenIddictServerAspNetCoreOptions>
internal sealed class ConfigureOpenIddict : IConfigureOptions<OpenIddictServerAspNetCoreOptions>
{
private readonly IOptions<GlobalSettings> _globalSettings;
@@ -1,14 +1,10 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Cms.Api.Common.OpenApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Common.Configuration;
@@ -17,22 +13,31 @@ public class ConfigureUmbracoSwaggerGenOptions : IConfigureOptions<SwaggerGenOpt
private readonly IOperationIdSelector _operationIdSelector;
private readonly ISchemaIdSelector _schemaIdSelector;
private readonly ISubTypesSelector _subTypesSelector;
[Obsolete("Use non-obsolete constructor. This will be removed in Umbraco 16.")]
public ConfigureUmbracoSwaggerGenOptions(
IOperationIdSelector operationIdSelector,
ISchemaIdSelector schemaIdSelector)
: this(operationIdSelector, schemaIdSelector, StaticServiceProvider.Instance.GetRequiredService<ISubTypesSelector>())
{ }
private readonly IDocumentInclusionSelector _documentInclusionSelector;
public ConfigureUmbracoSwaggerGenOptions(
IOperationIdSelector operationIdSelector,
ISchemaIdSelector schemaIdSelector,
ISubTypesSelector subTypesSelector)
ISubTypesSelector subTypesSelector,
IDocumentInclusionSelector documentInclusionSelector)
{
_operationIdSelector = operationIdSelector;
_schemaIdSelector = schemaIdSelector;
_subTypesSelector = subTypesSelector;
_documentInclusionSelector = documentInclusionSelector;
}
[Obsolete("Please use the constructor with all parameters. Scheduled for removal in Umbraco 19.")]
public ConfigureUmbracoSwaggerGenOptions(
IOperationIdSelector operationIdSelector,
ISchemaIdSelector schemaIdSelector,
ISubTypesSelector subTypesSelector)
: this(
operationIdSelector,
schemaIdSelector,
subTypesSelector,
StaticServiceProvider.Instance.GetRequiredService<IDocumentInclusionSelector>())
{
}
public void Configure(SwaggerGenOptions swaggerGenOptions)
@@ -47,19 +52,11 @@ public class ConfigureUmbracoSwaggerGenOptions : IConfigureOptions<SwaggerGenOpt
});
swaggerGenOptions.CustomOperationIds(description => _operationIdSelector.OperationId(description));
swaggerGenOptions.DocInclusionPredicate((name, api) =>
{
if (api.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor
&& controllerActionDescriptor.MethodInfo.HasMapToApiAttribute(name))
{
return true;
}
ApiVersionMetadata apiVersionMetadata = api.ActionDescriptor.GetApiVersionMetadata();
return apiVersionMetadata.Name == name
|| (string.IsNullOrEmpty(apiVersionMetadata.Name) && name == DefaultApiConfiguration.ApiName);
});
swaggerGenOptions.TagActionsBy(api => new[] { api.GroupName });
swaggerGenOptions.DocInclusionPredicate(_documentInclusionSelector.Include);
swaggerGenOptions.TagActionsBy(api =>
api.GroupName is null
? []
: new[] { api.GroupName });
swaggerGenOptions.OrderActionsBy(ActionOrderBy);
swaggerGenOptions.SchemaFilter<EnumSchemaFilter>();
swaggerGenOptions.CustomSchemaIds(_schemaIdSelector.SchemaId);
@@ -0,0 +1,246 @@
using System.Diagnostics.CodeAnalysis;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Options;
using OpenIddict.Server;
using OpenIddict.Validation;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Events;
using Umbraco.Cms.Core.Notifications;
using Umbraco.Cms.Web.Common.Security;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Common.DependencyInjection;
internal sealed class HideBackOfficeTokensHandler
: IOpenIddictServerHandler<OpenIddictServerEvents.ApplyTokenResponseContext>,
IOpenIddictServerHandler<OpenIddictServerEvents.ApplyAuthorizationResponseContext>,
IOpenIddictServerHandler<OpenIddictServerEvents.ExtractTokenRequestContext>,
IOpenIddictValidationHandler<OpenIddictValidationEvents.ProcessAuthenticationContext>,
INotificationHandler<UserLogoutSuccessNotification>
{
private const string RedactedTokenValue = "[redacted]";
// The __Host- prefix enforces secure cookies at browser level (requires Secure, Path=/, no Domain).
// For local development over HTTP, we use a simpler prefix to avoid browser rejection.
private const string SecureCookiePrefix = "__Host-";
private const string AccessTokenCookieName = "umbAccessToken";
private const string RefreshTokenCookieName = "umbRefreshToken";
private const string PkceCodeCookieName = "umbPkceCode";
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IDataProtectionProvider _dataProtectionProvider;
private readonly BackOfficeTokenCookieSettings _backOfficeTokenCookieSettings;
private readonly GlobalSettings _globalSettings;
public HideBackOfficeTokensHandler(
IHttpContextAccessor httpContextAccessor,
IDataProtectionProvider dataProtectionProvider,
IOptions<BackOfficeTokenCookieSettings> backOfficeTokenCookieSettings,
IOptions<GlobalSettings> globalSettings)
{
_httpContextAccessor = httpContextAccessor;
_dataProtectionProvider = dataProtectionProvider;
_backOfficeTokenCookieSettings = backOfficeTokenCookieSettings.Value;
_globalSettings = globalSettings.Value;
}
/// <summary>
/// This is invoked when tokens (access and refresh tokens) are issued to a client. For the back-office client,
/// we will intercept the response, write the tokens from the response into HTTP-only cookies, and redact the
/// tokens from the response, so they are not exposed to the client.
/// </summary>
public ValueTask HandleAsync(OpenIddictServerEvents.ApplyTokenResponseContext context)
{
if (context.Request?.ClientId is not Constants.OAuthClientIds.BackOffice)
{
// Only ever handle the back-office client.
return ValueTask.CompletedTask;
}
HttpContext httpContext = GetHttpContext();
if (context.Response.AccessToken is not null)
{
SetCookie(httpContext, AccessTokenCookieName, context.Response.AccessToken);
context.Response.AccessToken = RedactedTokenValue;
}
if (context.Response.RefreshToken is not null)
{
SetCookie(httpContext, RefreshTokenCookieName, context.Response.RefreshToken);
context.Response.RefreshToken = RedactedTokenValue;
}
return ValueTask.CompletedTask;
}
/// <summary>
/// This is invoked when a PKCE code is issued to the client. For the back-office client, we will intercept the
/// response, write the PKCE code from the response into a HTTP-only cookie, and redact the code from the response,
/// so it's not exposed to the client.
/// </summary>
public ValueTask HandleAsync(OpenIddictServerEvents.ApplyAuthorizationResponseContext context)
{
if (context.Request?.ClientId is not Constants.OAuthClientIds.BackOffice)
{
// Only ever handle the back-office client.
return ValueTask.CompletedTask;
}
if (context.Response.Code is not null)
{
SetCookie(GetHttpContext(), PkceCodeCookieName, context.Response.Code);
context.Response.Code = RedactedTokenValue;
}
return ValueTask.CompletedTask;
}
/// <summary>
/// This is invoked when requesting new tokens.
/// </summary>
public ValueTask HandleAsync(OpenIddictServerEvents.ExtractTokenRequestContext context)
{
if (context.Request?.ClientId != Constants.OAuthClientIds.BackOffice)
{
// Only ever handle the back-office client.
return ValueTask.CompletedTask;
}
HttpContext httpContext = GetHttpContext();
// Handle when the PKCE code is being exchanged for an access token.
if (context.Request.Code == RedactedTokenValue
&& TryGetCookie(httpContext, PkceCodeCookieName, out var code))
{
context.Request.Code = code;
// We won't need the PKCE cookie after this, let's remove it.
RemoveCookie(httpContext, PkceCodeCookieName);
}
else
{
// PCKE codes should always be redacted. If we got here, someone might be trying to pass another PKCE
// code. For security reasons, explicitly discard the code (if any) to be on the safe side.
context.Request.Code = null;
}
// Handle when a refresh token is being exchanged for a new access token.
if (context.Request.RefreshToken == RedactedTokenValue
&& TryGetCookie(httpContext, RefreshTokenCookieName, out var refreshToken))
{
context.Request.RefreshToken = refreshToken;
}
else
{
// If we got here, either the refresh token was not redacted, or nothing was found in the refresh token cookie.
// If OpenIddict found a refresh token, it could be an old token that is potentially still valid. For security
// reasons, we cannot accept that; at this point, we expect the refresh tokens to be explicitly redacted.
context.Request.RefreshToken = null;
}
return ValueTask.CompletedTask;
}
/// <summary>
/// This is invoked when extracting the auth context for a client request.
/// </summary>
public ValueTask HandleAsync(OpenIddictValidationEvents.ProcessAuthenticationContext context)
{
// For the back-office client, this only happens when an access token is sent to the API.
if (context.AccessToken != RedactedTokenValue)
{
return ValueTask.CompletedTask;
}
if (TryGetCookie(GetHttpContext(), AccessTokenCookieName, out var accessToken))
{
context.AccessToken = accessToken;
}
return ValueTask.CompletedTask;
}
public void Handle(UserLogoutSuccessNotification notification)
{
HttpContext? httpContext = _httpContextAccessor.HttpContext;
if (httpContext is null)
{
// For some reason there is no ambient HTTP context, so we can't clean up the cookies.
// This is OK, because the tokens in the cookies have already been revoked at user sign-out,
// so the cookie clean-up is mostly cosmetic.
return;
}
RemoveCookie(httpContext, AccessTokenCookieName);
RemoveCookie(httpContext, RefreshTokenCookieName);
}
private HttpContext GetHttpContext()
=> _httpContextAccessor.GetRequiredHttpContext();
private string GetCookieKey(HttpContext httpContext, string cookieName)
=> _globalSettings.UseHttps || httpContext.Request.IsHttps
? $"{SecureCookiePrefix}{cookieName}"
: cookieName;
private void SetCookie(HttpContext httpContext, string cookieName, string value)
{
var key = GetCookieKey(httpContext, cookieName);
var cookieValue = EncryptionHelper.Encrypt(value, _dataProtectionProvider);
RemoveCookie(httpContext, cookieName);
httpContext.Response.Cookies.Append(key, cookieValue, GetCookieOptions(httpContext));
}
private void RemoveCookie(HttpContext httpContext, string cookieName)
{
var key = GetCookieKey(httpContext, cookieName);
httpContext.Response.Cookies.Delete(key, GetCookieOptions(httpContext));
}
private CookieOptions GetCookieOptions(HttpContext httpContext) =>
new()
{
// Prevent the client-side scripts from accessing the cookie.
HttpOnly = true,
// Mark the cookie as essential to the application, to enforce it despite any
// data collection consent options. This aligns with how ASP.NET Core Identity
// does when writing cookies for cookie authentication.
IsEssential = true,
// Cookie path must be root for optimal security.
Path = "/",
// For optimal security, the cooke must be secure. However, Umbraco allows for running development
// environments over HTTP, so we need to take that into account here.
// Thus, we will make the cookie secure if:
// - HTTPS is explicitly enabled by config (default for production environments), or
// - The current request is over HTTPS (meaning the environment supports it regardless of config).
Secure = _globalSettings.UseHttps || httpContext.Request.IsHttps,
// SameSite is configurable (see BackOfficeTokenCookieSettings for defaults):
SameSite = ParseSameSiteMode(_backOfficeTokenCookieSettings.SameSite),
};
private bool TryGetCookie(HttpContext httpContext, string cookieName, [NotNullWhen(true)] out string? value)
{
var key = GetCookieKey(httpContext, cookieName);
if (httpContext.Request.Cookies.TryGetValue(key, out var cookieValue))
{
value = EncryptionHelper.Decrypt(cookieValue, _dataProtectionProvider);
return true;
}
value = null;
return false;
}
private static SameSiteMode ParseSameSiteMode(string sameSiteMode) =>
Enum.TryParse(sameSiteMode, ignoreCase: true, out SameSiteMode result)
? result
: throw new ArgumentException($"The provided {nameof(sameSiteMode)} value could not be parsed into as SameSiteMode value.", nameof(sameSiteMode));
}
@@ -18,7 +18,7 @@ public class ProcessRequestContextHandler
var backOfficePathSegment = Constants.System.DefaultUmbracoPath.TrimStart(Constants.CharArrays.Tilde)
.EnsureStartsWith('/')
.EnsureEndsWith('/');
_pathsToHandle = [backOfficePathSegment, "/.well-known/openid-configuration"];
_pathsToHandle = [backOfficePathSegment, "/.well-known/openid-configuration", "/.well-known/jwks"];
}
public ValueTask HandleAsync(OpenIddictServerEvents.ProcessRequestContext context)
@@ -25,6 +25,7 @@ public static class UmbracoBuilderApiExtensions
builder.Services.AddSingleton<ISchemaIdHandler, SchemaIdHandler>();
builder.Services.AddSingleton<ISubTypesSelector, SubTypesSelector>();
builder.Services.AddSingleton<ISubTypesHandler, SubTypesHandler>();
builder.Services.AddSingleton<IDocumentInclusionSelector, DocumentInclusionSelector>();
builder.Services.Configure<UmbracoPipelineOptions>(options => options.AddFilter(new SwaggerRouteTemplatePipelineFilter("UmbracoApiCommon")));
return builder;
@@ -9,8 +9,9 @@ using Umbraco.Cms.Api.Common.Security;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Infrastructure.BackgroundJobs.Jobs;
using Umbraco.Extensions;
using Umbraco.Cms.Infrastructure.BackgroundJobs;
using Umbraco.Cms.Infrastructure.BackgroundJobs.Jobs.DistributedJobs;
using Umbraco.Cms.Core.Notifications;
namespace Umbraco.Cms.Api.Common.DependencyInjection;
@@ -113,6 +114,25 @@ public static class UmbracoBuilderAuthExtensions
{
configuration.UseSingletonHandler<ProcessRequestContextHandler>().SetOrder(OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers.ResolveRequestUri.Descriptor.Order - 1);
});
options.AddEventHandler<OpenIddictServerEvents.ApplyTokenResponseContext>(configuration =>
{
configuration
.UseSingletonHandler<HideBackOfficeTokensHandler>()
.SetOrder(OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers.ProcessJsonResponse<OpenIddictServerEvents.ApplyTokenResponseContext>.Descriptor.Order - 1);
});
options.AddEventHandler<OpenIddictServerEvents.ApplyAuthorizationResponseContext>(configuration =>
{
configuration
.UseSingletonHandler<HideBackOfficeTokensHandler>()
.SetOrder(OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers.Authentication.ProcessQueryResponse.Descriptor.Order - 1);
});
options.AddEventHandler<OpenIddictServerEvents.ExtractTokenRequestContext>(configuration =>
{
configuration
.UseSingletonHandler<HideBackOfficeTokensHandler>()
.SetOrder(OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers.ExtractPostRequest<OpenIddictServerEvents.ExtractTokenRequestContext>.Descriptor.Order + 1);
});
})
// Register the OpenIddict validation components.
@@ -137,9 +157,19 @@ public static class UmbracoBuilderAuthExtensions
{
configuration.UseSingletonHandler<ProcessRequestContextHandler>().SetOrder(OpenIddict.Validation.AspNetCore.OpenIddictValidationAspNetCoreHandlers.ResolveRequestUri.Descriptor.Order - 1);
});
options.AddEventHandler<OpenIddictValidationEvents.ProcessAuthenticationContext>(configuration =>
{
configuration
.UseSingletonHandler<HideBackOfficeTokensHandler>()
// IMPORTANT: the handler must be AFTER the built-in query string handler, because the client-side SignalR library sometimes appends access tokens to the query string.
.SetOrder(OpenIddict.Validation.AspNetCore.OpenIddictValidationAspNetCoreHandlers.ExtractAccessTokenFromQueryString.Descriptor.Order + 1);
});
});
builder.Services.AddRecurringBackgroundJob<OpenIddictCleanupJob>();
builder.Services.AddSingleton<IDistributedBackgroundJob, OpenIddictCleanupJob>();
builder.Services.ConfigureOptions<ConfigureOpenIddict>();
builder.AddNotificationHandler<UserLogoutSuccessNotification, HideBackOfficeTokensHandler>();
}
}
@@ -0,0 +1,36 @@
using Microsoft.AspNetCore.Mvc.Abstractions;
using Umbraco.Cms.Api.Common.Attributes;
using Umbraco.Cms.Api.Common.Configuration;
namespace Umbraco.Extensions;
/// <summary>
/// Provides extension methods for <see cref="ActionDescriptor"/> to work with <see cref="MapToApiAttribute"/>.
/// </summary>
public static class ActionDescriptorApiCommonExtensions
{
/// <summary>
/// Determines whether the <see cref="ActionDescriptor"/> has a <see cref="MapToApiAttribute"/> with the specified API name.
/// The check is made in runtime to support attributes added in runtime.
/// </summary>
/// <param name="actionDescriptor">The action descriptor to inspect.</param>
/// <param name="apiName">The API name to check for.</param>
/// <returns>
/// <c>true</c> if the <see cref="MapToApiAttribute"/> is present and matches the specified API name,
/// or if the attribute is not present and the API name matches the default API name; otherwise, <c>false</c>.
/// </returns>
public static bool HasMapToApiAttribute(this ActionDescriptor actionDescriptor, string apiName)
{
var value = actionDescriptor.GetMapToApiAttributeValue();
return value == apiName
|| (value is null && apiName == DefaultApiConfiguration.ApiName);
}
private static string? GetMapToApiAttributeValue(this ActionDescriptor actionDescriptor)
{
IEnumerable<MapToApiAttribute> mapToApiAttributes = actionDescriptor?.EndpointMetadata?.OfType<MapToApiAttribute>() ?? [];
return mapToApiAttributes.SingleOrDefault()?.ApiName;
}
}
@@ -8,11 +8,11 @@ namespace Umbraco.Extensions;
public static class MethodInfoApiCommonExtensions
{
public static string? GetMapToApiVersionAttributeValue(this MethodInfo methodInfo)
public static string GetMapToApiVersionAttributeValue(this MethodInfo methodInfo)
{
MapToApiVersionAttribute[] mapToApis = methodInfo.GetCustomAttributes(typeof(MapToApiVersionAttribute), inherit: true).Cast<MapToApiVersionAttribute>().ToArray();
return string.Join("|", mapToApis.SelectMany(x=>x.Versions));
return string.Join("|", mapToApis.SelectMany(x => x.Versions));
}
public static string? GetMapToApiAttributeValue(this MethodInfo methodInfo)
@@ -4,7 +4,7 @@ using Microsoft.Extensions.Logging;
namespace Umbraco.Cms.Api.Common.Json;
internal class NamedSystemTextJsonInputFormatter : SystemTextJsonInputFormatter
internal sealed class NamedSystemTextJsonInputFormatter : SystemTextJsonInputFormatter
{
private readonly string _jsonOptionsName;
@@ -3,8 +3,7 @@ using Microsoft.AspNetCore.Mvc.Formatters;
namespace Umbraco.Cms.Api.Common.Json;
internal class NamedSystemTextJsonOutputFormatter : SystemTextJsonOutputFormatter
internal sealed class NamedSystemTextJsonOutputFormatter : SystemTextJsonOutputFormatter
{
private readonly string _jsonOptionsName;
@@ -0,0 +1,30 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Controllers;
using Umbraco.Cms.Api.Common.Configuration;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Common.OpenApi;
/// <summary>
/// Determines whether an API description should be included in a specific documentation set based on the document name
/// and API metadata.
/// </summary>
public class DocumentInclusionSelector : IDocumentInclusionSelector
{
/// <inheritdoc/>
public bool Include(string documentName, ApiDescription apiDescription)
{
if (apiDescription.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor
&& controllerActionDescriptor.HasMapToApiAttribute(documentName))
{
return true;
}
ApiVersionMetadata apiVersionMetadata = apiDescription.ActionDescriptor.GetApiVersionMetadata();
return apiVersionMetadata.Name == documentName
|| (string.IsNullOrEmpty(apiVersionMetadata.Name) && documentName == DefaultApiConfiguration.ApiName);
}
}
@@ -1,25 +1,27 @@
using System.Reflection;
using System.Runtime.Serialization;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;
using System.Text.Json.Nodes;
using Microsoft.OpenApi;
using Swashbuckle.AspNetCore.SwaggerGen;
namespace Umbraco.Cms.Api.Common.OpenApi;
public class EnumSchemaFilter : ISchemaFilter
{
public void Apply(OpenApiSchema model, SchemaFilterContext context)
public void Apply(IOpenApiSchema model, SchemaFilterContext context)
{
if (context.Type.IsEnum)
if (model is not OpenApiSchema schema || context.Type.IsEnum is false)
{
model.Type = "string";
model.Format = null;
model.Enum.Clear();
foreach (var name in Enum.GetNames(context.Type))
{
var actualName = context.Type.GetField(name)?.GetCustomAttribute<EnumMemberAttribute>()?.Value ?? name;
model.Enum.Add(new OpenApiString(actualName));
}
return;
}
schema.Type = JsonSchemaType.String;
schema.Format = null;
schema.Enum = new List<JsonNode>();
foreach (var name in Enum.GetNames(context.Type))
{
var actualName = context.Type.GetField(name)?.GetCustomAttribute<EnumMemberAttribute>()?.Value ?? name;
schema.Enum.Add(actualName);
}
}
}
@@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Mvc.ApiExplorer;
namespace Umbraco.Cms.Api.Common.OpenApi;
/// <summary>
/// Defines a method that determines whether a given API description should be included in a specific documentation
/// document.
/// </summary>
public interface IDocumentInclusionSelector
{
/// <summary>
/// Determines whether the specified API description should be included in the generated documentation for the given
/// document name.
/// </summary>
/// <param name="documentName">The name of the documentation document being generated.</param>
/// <param name="apiDescription">The API description to evaluate for inclusion.</param>
/// <returns>true if the API description should be included in the documentation; otherwise, false.</returns>
bool Include(string documentName, ApiDescription apiDescription);
}
@@ -5,8 +5,5 @@ namespace Umbraco.Cms.Api.Common.OpenApi;
public interface IOperationIdSelector
{
[Obsolete("Use overload that only takes ApiDescription instead. This will be removed in Umbraco 15.")]
string? OperationId(ApiDescription apiDescription, ApiVersioningOptions apiVersioningOptions);
string? OperationId(ApiDescription apiDescription);
}
@@ -1,4 +1,4 @@
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Extensions;
@@ -21,25 +21,32 @@ public class MimeTypeDocumentFilter : IDocumentFilter
}
OpenApiOperation[] operations = swaggerDoc.Paths
.SelectMany(path => path.Value.Operations.Values)
.SelectMany(path => path.Value.Operations?.Values ?? Enumerable.Empty<OpenApiOperation>())
.ToArray();
void RemoveUnwantedMimeTypes(IDictionary<string, OpenApiMediaType> content)
void RemoveUnwantedMimeTypes(IDictionary<string, OpenApiMediaType>? content)
{
if (content.ContainsKey("application/json"))
if (content is null || content.ContainsKey("application/json") is false)
{
content.RemoveAll(r => r.Key != "application/json");
return;
}
content.RemoveAll(r => r.Key != "application/json");
}
OpenApiRequestBody[] requestBodies = operations.Select(operation => operation.RequestBody).WhereNotNull().ToArray();
OpenApiRequestBody[] requestBodies = operations
.Select(operation => operation.RequestBody)
.OfType<OpenApiRequestBody>()
.ToArray();
foreach (OpenApiRequestBody requestBody in requestBodies)
{
RemoveUnwantedMimeTypes(requestBody.Content);
}
OpenApiResponse[] responses = operations.SelectMany(operation => operation.Responses.Values).WhereNotNull().ToArray();
OpenApiResponse[] responses = operations
.SelectMany(operation => operation.Responses?.Values ?? Enumerable.Empty<IOpenApiResponse>())
.OfType<OpenApiResponse>()
.ToArray();
foreach (OpenApiResponse response in responses)
{
RemoveUnwantedMimeTypes(response.Content);
@@ -16,9 +16,6 @@ public class OperationIdSelector : IOperationIdSelector
public OperationIdSelector(IEnumerable<IOperationIdHandler> operationIdHandlers)
=> _operationIdHandlers = operationIdHandlers;
[Obsolete("Use overload that only takes ApiDescription instead. This will be removed in Umbraco 15.")]
public virtual string? OperationId(ApiDescription apiDescription, ApiVersioningOptions apiVersioningOptions) => OperationId(apiDescription);
public virtual string? OperationId(ApiDescription apiDescription)
{
IOperationIdHandler? handler = _operationIdHandlers.FirstOrDefault(h => h.CanHandle(apiDescription));
@@ -1,4 +1,4 @@
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi;
using Swashbuckle.AspNetCore.SwaggerGen;
namespace Umbraco.Cms.Api.Common.OpenApi;
@@ -20,6 +20,6 @@ public class RemoveSecuritySchemesDocumentFilter : IDocumentFilter
return;
}
swaggerDoc.Components.SecuritySchemes.Clear();
swaggerDoc.Components?.SecuritySchemes?.Clear();
}
}
@@ -10,20 +10,17 @@ namespace Umbraco.Cms.Api.Common.OpenApi;
public class SubTypesSelector : ISubTypesSelector
{
private readonly IOptions<GlobalSettings> _settings;
private readonly IHostingEnvironment _hostingEnvironment;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IEnumerable<ISubTypesHandler> _subTypeHandlers;
private readonly IUmbracoJsonTypeInfoResolver _umbracoJsonTypeInfoResolver;
public SubTypesSelector(
IOptions<GlobalSettings> settings,
IHostingEnvironment hostingEnvironment,
IHttpContextAccessor httpContextAccessor,
IEnumerable<ISubTypesHandler> subTypeHandlers,
IUmbracoJsonTypeInfoResolver umbracoJsonTypeInfoResolver)
{
_settings = settings;
_hostingEnvironment = hostingEnvironment;
_httpContextAccessor = httpContextAccessor;
_subTypeHandlers = subTypeHandlers;
@@ -32,7 +29,7 @@ public class SubTypesSelector : ISubTypesSelector
public IEnumerable<Type> SubTypes(Type type)
{
var backOfficePath = _settings.Value.GetBackOfficePath(_hostingEnvironment);
var backOfficePath = _hostingEnvironment.GetBackOfficePath();
var swaggerPath = $"{backOfficePath}/swagger";
if (_httpContextAccessor.HttpContext?.Request.Path.StartsWithSegments(swaggerPath) ?? false)
@@ -3,13 +3,12 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi;
using Swashbuckle.AspNetCore.SwaggerGen;
using Swashbuckle.AspNetCore.SwaggerUI;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Hosting;
using Umbraco.Cms.Web.Common.ApplicationBuilder;
using Umbraco.Extensions;
using IHostingEnvironment = Umbraco.Cms.Core.Hosting.IHostingEnvironment;
namespace Umbraco.Cms.Api.Common.OpenApi;
@@ -30,24 +29,21 @@ public class SwaggerRouteTemplatePipelineFilter : UmbracoPipelineFilter
IOptions<SwaggerGenOptions> swaggerGenOptions = applicationBuilder.ApplicationServices.GetRequiredService<IOptions<SwaggerGenOptions>>();
applicationBuilder.UseSwagger(swaggerOptions =>
{
swaggerOptions.RouteTemplate = SwaggerRouteTemplate(applicationBuilder);
});
{
swaggerOptions.RouteTemplate = SwaggerRouteTemplate(applicationBuilder);
});
applicationBuilder.UseSwaggerUI(swaggerUiOptions => SwaggerUiConfiguration(swaggerUiOptions, swaggerGenOptions.Value, applicationBuilder));
}
protected virtual bool SwaggerIsEnabled(IApplicationBuilder applicationBuilder)
{
IWebHostEnvironment webHostEnvironment = applicationBuilder.ApplicationServices.GetRequiredService<IWebHostEnvironment>();
return webHostEnvironment.IsProduction() is false;
}
=> applicationBuilder.ApplicationServices.GetRequiredService<IWebHostEnvironment>().IsProduction() is false;
protected virtual string SwaggerRouteTemplate(IApplicationBuilder applicationBuilder)
=> $"{GetUmbracoPath(applicationBuilder).TrimStart(Constants.CharArrays.ForwardSlash)}/swagger/{{documentName}}/swagger.json";
=> $"{GetBackOfficePath(applicationBuilder).TrimStart(Constants.CharArrays.ForwardSlash)}/swagger/{{documentName}}/swagger.json";
protected virtual string SwaggerUiRoutePrefix(IApplicationBuilder applicationBuilder)
=> $"{GetUmbracoPath(applicationBuilder).TrimStart(Constants.CharArrays.ForwardSlash)}/swagger";
=> $"{GetBackOfficePath(applicationBuilder).TrimStart(Constants.CharArrays.ForwardSlash)}/swagger";
protected virtual void SwaggerUiConfiguration(
SwaggerUIOptions swaggerUiOptions,
@@ -56,8 +52,7 @@ public class SwaggerRouteTemplatePipelineFilter : UmbracoPipelineFilter
{
swaggerUiOptions.RoutePrefix = SwaggerUiRoutePrefix(applicationBuilder);
foreach ((var name, OpenApiInfo? apiInfo) in swaggerGenOptions.SwaggerGeneratorOptions.SwaggerDocs
.OrderBy(x => x.Value.Title))
foreach ((var name, OpenApiInfo? apiInfo) in swaggerGenOptions.SwaggerGeneratorOptions.SwaggerDocs.OrderBy(x => x.Value.Title))
{
swaggerUiOptions.SwaggerEndpoint($"{name}/swagger.json", $"{apiInfo.Title}");
}
@@ -70,11 +65,6 @@ public class SwaggerRouteTemplatePipelineFilter : UmbracoPipelineFilter
swaggerUiOptions.OAuthUsePkce();
}
private string GetUmbracoPath(IApplicationBuilder applicationBuilder)
{
GlobalSettings settings = applicationBuilder.ApplicationServices.GetRequiredService<IOptions<GlobalSettings>>().Value;
IHostingEnvironment hostingEnvironment = applicationBuilder.ApplicationServices.GetRequiredService<IHostingEnvironment>();
return settings.GetBackOfficePath(hostingEnvironment);
}
private string GetBackOfficePath(IApplicationBuilder applicationBuilder)
=> applicationBuilder.ApplicationServices.GetRequiredService<IHostingEnvironment>().GetBackOfficePath();
}
@@ -0,0 +1,148 @@
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Common.Rendering;
public class ElementOnlyOutputExpansionStrategy : IOutputExpansionStrategy
{
protected const string All = "$all";
protected const string None = "";
protected const string ExpandParameterName = "expand";
protected const string FieldsParameterName = "fields";
private readonly IApiPropertyRenderer _propertyRenderer;
protected Stack<Node?> ExpandProperties { get; } = new();
protected Stack<Node?> IncludeProperties { get; } = new();
public ElementOnlyOutputExpansionStrategy(
IApiPropertyRenderer propertyRenderer)
{
_propertyRenderer = propertyRenderer;
}
public virtual IDictionary<string, object?> MapContentProperties(IPublishedContent content)
=> content.ItemType == PublishedItemType.Content
? MapProperties(content.Properties)
: throw new ArgumentException($"Invalid item type. This method can only be used with item type {nameof(PublishedItemType.Content)}, got: {content.ItemType}");
public virtual IDictionary<string, object?> MapMediaProperties(IPublishedContent media, bool skipUmbracoProperties = true)
{
if (media.ItemType != PublishedItemType.Media)
{
throw new ArgumentException($"Invalid item type. This method can only be used with item type {PublishedItemType.Media}, got: {media.ItemType}");
}
IPublishedProperty[] properties = media
.Properties
.Where(p => skipUmbracoProperties is false || p.Alias.StartsWith("umbraco") is false)
.ToArray();
return properties.Any()
? MapProperties(properties)
: new Dictionary<string, object?>();
}
public virtual IDictionary<string, object?> MapElementProperties(IPublishedElement element)
=> MapProperties(element.Properties, true);
private IDictionary<string, object?> MapProperties(IEnumerable<IPublishedProperty> properties, bool forceExpandProperties = false)
{
Node? currentExpandProperties = ExpandProperties.Count > 0 ? ExpandProperties.Peek() : null;
if (ExpandProperties.Count > 1 && currentExpandProperties is null && forceExpandProperties is false)
{
return new Dictionary<string, object?>();
}
Node? currentIncludeProperties = IncludeProperties.Count > 0 ? IncludeProperties.Peek() : null;
var result = new Dictionary<string, object?>();
foreach (IPublishedProperty property in properties)
{
Node? nextIncludeProperties = GetNextProperties(currentIncludeProperties, property.Alias);
if (currentIncludeProperties is not null && currentIncludeProperties.Items.Any() && nextIncludeProperties is null)
{
continue;
}
Node? nextExpandProperties = GetNextProperties(currentExpandProperties, property.Alias);
IncludeProperties.Push(nextIncludeProperties);
ExpandProperties.Push(nextExpandProperties);
result[property.Alias] = GetPropertyValue(property);
ExpandProperties.Pop();
IncludeProperties.Pop();
}
return result;
}
private Node? GetNextProperties(Node? currentProperties, string propertyAlias)
=> currentProperties?.Items.FirstOrDefault(i => i.Key == All)
?? currentProperties?.Items.FirstOrDefault(i => i.Key == "properties")?.Items.FirstOrDefault(i => i.Key == All || i.Key == propertyAlias);
private object? GetPropertyValue(IPublishedProperty property)
=> _propertyRenderer.GetPropertyValue(property, ExpandProperties.Peek() is not null);
protected sealed class Node
{
public string Key { get; private set; } = string.Empty;
public List<Node> Items { get; } = new();
public static Node Parse(string value)
{
// verify that there are as many start brackets as there are end brackets
if (value.CountOccurrences("[") != value.CountOccurrences("]"))
{
throw new ArgumentException("Value did not contain an equal number of start and end brackets");
}
// verify that the value does not start with a start bracket
if (value.StartsWith("["))
{
throw new ArgumentException("Value cannot start with a bracket");
}
// verify that there are no empty brackets
if (value.Contains("[]"))
{
throw new ArgumentException("Value cannot contain empty brackets");
}
var stack = new Stack<Node>();
var root = new Node { Key = "root" };
stack.Push(root);
var currentNode = new Node();
root.Items.Add(currentNode);
foreach (char c in value)
{
switch (c)
{
case '[': // Start a new node, child of the current node
stack.Push(currentNode);
currentNode = new Node();
stack.Peek().Items.Add(currentNode);
break;
case ',': // Start a new node, but at the same level of the current node
currentNode = new Node();
stack.Peek().Items.Add(currentNode);
break;
case ']': // Back to parent of the current node
currentNode = stack.Pop();
break;
default: // Add char to current node key
currentNode.Key += c;
break;
}
}
return root;
}
}
}
@@ -0,0 +1,84 @@
using System.Security.Claims;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Options;
using OpenIddict.Server;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Extensions;
namespace Umbraco.Cms.Infrastructure.Security;
/// <summary>
/// Provides OpenIddict server event handlers to expose the backoffice authentication token via a custom authentication scheme.
/// </summary>
public class ExposeBackOfficeAuthenticationOpenIddictServerEventsHandler : IOpenIddictServerHandler<OpenIddictServerEvents.GenerateTokenContext>,
IOpenIddictServerHandler<OpenIddictServerEvents.ApplyRevocationResponseContext>
{
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly string[] _claimTypes;
private readonly TimeSpan _timeOut;
/// <summary>
/// Initializes a new instance of the <see cref="ExposeBackOfficeAuthenticationOpenIddictServerEventsHandler"/> class.
/// </summary>
public ExposeBackOfficeAuthenticationOpenIddictServerEventsHandler(
IHttpContextAccessor httpContextAccessor,
IOptions<GlobalSettings> globalSettings,
IOptions<BackOfficeIdentityOptions> backOfficeIdentityOptions)
{
_httpContextAccessor = httpContextAccessor;
_timeOut = globalSettings.Value.TimeOut;
// These are the type identifiers for the claims required by the principal
// for the custom authentication scheme.
// We make available the ID, user name and allowed applications (sections) claims.
_claimTypes =
[
backOfficeIdentityOptions.Value.ClaimsIdentity.UserIdClaimType,
backOfficeIdentityOptions.Value.ClaimsIdentity.UserNameClaimType,
Core.Constants.Security.AllowedApplicationsClaimType,
];
}
/// <inheritdoc/>
/// <remarks>
/// Event handler for when access tokens are generated (created or refreshed).
/// </remarks>
public async ValueTask HandleAsync(OpenIddictServerEvents.GenerateTokenContext context)
{
// Only proceed if this is a back-office sign-in.
if (context.Principal.Identity?.AuthenticationType != Core.Constants.Security.BackOfficeAuthenticationType)
{
return;
}
// Create a new principal with the claims from the authenticated principal.
var principal = new ClaimsPrincipal(
new ClaimsIdentity(
context.Principal.Claims.Where(claim => _claimTypes.Contains(claim.Type)),
Core.Constants.Security.BackOfficeExposedAuthenticationType));
// Sign-in the new principal for the custom authentication scheme.
await _httpContextAccessor
.GetRequiredHttpContext()
.SignInAsync(Core.Constants.Security.BackOfficeExposedAuthenticationType, principal, GetAuthenticationProperties());
}
/// <inheritdoc/>
/// <remarks>
/// Event handler for when access tokens are revoked.
/// </remarks>
public async ValueTask HandleAsync(OpenIddictServerEvents.ApplyRevocationResponseContext context)
=> await _httpContextAccessor
.GetRequiredHttpContext()
.SignOutAsync(Core.Constants.Security.BackOfficeExposedAuthenticationType, GetAuthenticationProperties());
private AuthenticationProperties GetAuthenticationProperties()
=> new()
{
IsPersistent = true,
IssuedUtc = DateTimeOffset.UtcNow,
ExpiresUtc = DateTimeOffset.UtcNow.Add(_timeOut)
};
}
@@ -4,6 +4,12 @@
<Description>Contains the bits and pieces that are shared between the Umbraco CMS APIs.</Description>
</PropertyGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.UnitTests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
@@ -16,11 +22,6 @@
<PackageReference Include="OpenIddict.AspNetCore" />
</ItemGroup>
<ItemGroup>
<!-- Take top-level depedendency on OpenIddict.AspNetCore depends on a vulnerable version -->
<PackageReference Include="Microsoft.Extensions.Caching.Memory" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
@@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
namespace Umbraco.Cms.Api.Common.ViewModels.Pagination;
public class SubsetViewModel<T>
{
[Required]
public long TotalBefore { get; set; }
[Required]
public long TotalAfter { get; set; }
[Required]
public IEnumerable<T> Items { get; set; } = Enumerable.Empty<T>();
public static SubsetViewModel<T> Empty() => new();
}
+382
View File
@@ -0,0 +1,382 @@
# Umbraco.Cms.Api.Delivery
Headless content delivery REST API for Umbraco CMS. Enables frontend applications to fetch published content, media, and member-protected resources.
---
## 1. Architecture
**Type**: Class Library (NuGet Package)
**Target Framework**: .NET 10.0
**Purpose**: Content Delivery API for headless CMS scenarios
### Key Technologies
- **ASP.NET Core** - Web framework
- **OpenIddict** - Member authentication (OAuth 2.0)
- **Asp.Versioning** - API versioning (V1, V2)
- **Output Caching** - Configurable response caching
- **Examine/Lucene** - Content querying
### Dependencies
- `Umbraco.Cms.Api.Common` - Shared API infrastructure (OpenAPI, auth)
- `Umbraco.Web.Common` - Web functionality
### Project Structure (86 files)
```
Umbraco.Cms.Api.Delivery/
├── Controllers/
│ ├── Content/ # Content endpoints (by ID, route, query)
│ ├── Media/ # Media endpoints (by ID, path, query)
│ └── Security/ # Member auth (authorize, token, signout)
├── Querying/
│ ├── Filters/ # ContentType, Name, CreateDate, UpdateDate
│ ├── Selectors/ # Ancestors, Children, Descendants
│ └── Sorts/ # Name, CreateDate, UpdateDate, Level, SortOrder
├── Indexing/ # Lucene index field handlers
├── Services/ # Business logic and query building
├── Caching/ # Output cache policies
├── Rendering/ # Output expansion strategies
├── Configuration/ # Swagger configuration
└── Filters/ # Action filters (access, validation)
```
### Design Patterns
1. **Strategy Pattern** - Query handlers (`ISelectorHandler`, `IFilterHandler`, `ISortHandler`)
2. **Factory Pattern** - `ApiContentQueryFactory` builds Examine queries
3. **Template Method** - `ContentApiControllerBase` for shared controller logic
4. **Options Pattern** - `DeliveryApiSettings` for all configuration
---
## 2. Commands
See "Quick Reference" section at bottom for common commands.
---
## 3. Key Patterns
### API Versioning (V1 vs V2)
**V1** (legacy) and **V2** (current) coexist. Key difference is output expansion:
```csharp
// DependencyInjection/UmbracoBuilderExtensions.cs:49-52
// V1 uses RequestContextOutputExpansionStrategy
// V2+ uses RequestContextOutputExpansionStrategyV2
return apiVersion.MajorVersion == 1
? provider.GetRequiredService<RequestContextOutputExpansionStrategy>()
: provider.GetRequiredService<RequestContextOutputExpansionStrategyV2>();
```
**Why V2**: Improved `expand` and `fields` query parameter parsing (tree-based).
### Query System Architecture
Content querying flows through handlers registered in DI:
1. **Selectors** (`fetch` parameter): `ancestors:id`, `children:id`, `descendants:id`
2. **Filters** (`filter[]` parameter): `contentType:alias`, `name:value`, `createDate>2024-01-01`
3. **Sorts** (`sort[]` parameter): `name:asc`, `createDate:desc`, `level:asc`
```csharp
// Services/ApiContentQueryService.cs:91-96
ISelectorHandler? selectorHandler = _selectorHandlers.FirstOrDefault(h => h.CanHandle(fetch));
return selectorHandler?.BuildSelectorOption(fetch);
```
### Path Decoding Workaround
ASP.NET Core doesn't decode forward slashes in route parameters:
```csharp
// Controllers/DeliveryApiControllerBase.cs:21-31
// OpenAPI clients URL-encode paths, but ASP.NET Core doesn't decode "/"
// See https://github.com/dotnet/aspnetcore/issues/11544
if (path.Contains("%2F", StringComparison.OrdinalIgnoreCase))
{
path = WebUtility.UrlDecode(path);
}
```
---
## 4. Testing
**Location**: No direct tests - tested via integration tests in test projects
```bash
dotnet test tests/Umbraco.Tests.Integration/ --filter "FullyQualifiedName~Delivery"
```
**Internals exposed to** (csproj lines 28-36):
- `Umbraco.Tests.UnitTests`
- `Umbraco.Tests.Integration`
- `DynamicProxyGenAssembly2` (for mocking)
**Focus areas**:
- Query parsing (selectors, filters, sorts)
- Member authentication flows
- Output caching behavior
- Protected content access
---
## 5. Security & Access Control
### Three Access Modes
```csharp
// Services/ApiAccessService.cs:21-27
public bool HasPublicAccess() => _deliveryApiSettings.PublicAccess || HasValidApiKey();
public bool HasPreviewAccess() => HasValidApiKey();
public bool HasMediaAccess() => _deliveryApiSettings is { PublicAccess: true, Media.PublicAccess: true } || HasValidApiKey();
```
**Access levels**:
1. **Public** - No authentication required (if enabled)
2. **API Key** - Via `Api-Key` header
3. **Preview** - Always requires API key
### Member Authentication
OpenIddict-based OAuth 2.0 for member-protected content:
**Flows supported** (Controllers/Security/MemberController.cs):
- Authorization Code + PKCE (line 53)
- Client Credentials (line 112)
- Refresh Token (line 98)
**Endpoints**:
- `GET /umbraco/delivery/api/v1/security/member/authorize`
- `POST /umbraco/delivery/api/v1/security/member/token`
- `GET /umbraco/delivery/api/v1/security/member/signout`
**Scopes**: Only `openid` and `offline_access` allowed for members (line 220-222)
### Protected Content
Member access checked via `ProtectedAccess` model:
```csharp
// Controllers/Content/QueryContentApiController.cs:56-57
ProtectedAccess protectedAccess = await _requestMemberAccessService.MemberAccessAsync();
Attempt<PagedModel<Guid>, ApiContentQueryOperationStatus> queryAttempt =
_apiContentQueryService.ExecuteQuery(fetch, filter, sort, protectedAccess, skip, take);
```
---
## 6. Output Caching
### Cache Policy Configuration
```csharp
// DependencyInjection/UmbracoBuilderExtensions.cs:120-136
// Content and Media have separate cache durations
options.AddPolicy(
Constants.DeliveryApi.OutputCache.ContentCachePolicy,
new DeliveryApiOutputCachePolicy(
outputCacheSettings.ContentDuration,
new StringValues([AcceptLanguage, AcceptSegment, StartItem])));
```
**Cache invalidation conditions** (Caching/DeliveryApiOutputCachePolicy.cs:31):
```csharp
// Never cache preview or non-public access
context.EnableOutputCaching = requestPreviewService.IsPreview() is false
&& apiAccessService.HasPublicAccess();
```
**Vary by headers**: `Accept-Language`, `Accept-Segment`, `Start-Item`
---
## 7. Edge Cases & Known Issues
### Technical Debt (TODOs in codebase)
1. **V1 Removal Pending** (4 locations):
- `DependencyInjection/UmbracoBuilderExtensions.cs:98` - FIXME: remove matcher policy
- `Routing/DeliveryApiItemsEndpointsMatcherPolicy.cs:11` - FIXME: remove class
- `Filters/SwaggerDocumentationFilterBase.cs:79,83` - FIXME: remove V1 swagger docs
2. **Obsolete Reference Warnings** (csproj:9-13):
- `ASP0019` - IHeaderDictionary.Append usage
- `CS0618/CS0612` - Obsolete member references
### Empty Query Results
Query service returns empty results (not errors) for invalid options:
```csharp
// Services/ApiContentQueryService.cs:54-78
// Invalid selector/filter/sort returns fail status with empty result
return Attempt.FailWithStatus(ApiContentQueryOperationStatus.SelectorOptionNotFound, emptyResult);
```
### Start Item Fallback
When no `fetch` parameter provided, uses start item or all content:
```csharp
// Services/ApiContentQueryService.cs:99-112
if (_requestStartItemProviderAccessor.TryGetValue(out IRequestStartItemProvider? requestStartItemProvider))
{
IPublishedContent? startItem = requestStartItemProvider.GetStartItem();
// Use descendants of start item
}
return _apiContentQueryProvider.AllContentSelectorOption(); // Fallback to all
```
---
## 8. Project-Specific Notes
### V1 vs V2 Differences
| Feature | V1 | V2 |
|---------|----|----|
| Output expansion | Basic | Tree-based parsing |
| `expand` parameter | Flat list | Nested syntax |
| `fields` parameter | Limited | Full property selection |
| Default expansion strategy | `RequestContextOutputExpansionStrategy` | `RequestContextOutputExpansionStrategyV2` |
**Migration note**: V1 is deprecated; plan removal when V17+ drops V1 support.
### JSON Configuration
Delivery API has its own JSON options (distinct from Management API):
```csharp
// DependencyInjection/UmbracoBuilderExtensions.cs:82-88
.AddJsonOptions(Constants.JsonOptionsNames.DeliveryApi, options =>
{
options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
options.JsonSerializerOptions.TypeInfoResolver = new DeliveryApiJsonTypeResolver();
options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
});
```
### Member Token Revocation
Tokens automatically revoked on member changes:
```csharp
// DependencyInjection/UmbracoBuilderExtensions.cs:93-96
builder.AddNotificationAsyncHandler<MemberSavedNotification, RevokeMemberAuthenticationTokensNotificationHandler>();
builder.AddNotificationAsyncHandler<MemberDeletedNotification, RevokeMemberAuthenticationTokensNotificationHandler>();
builder.AddNotificationAsyncHandler<AssignedMemberRolesNotification, RevokeMemberAuthenticationTokensNotificationHandler>();
builder.AddNotificationAsyncHandler<RemovedMemberRolesNotification, RevokeMemberAuthenticationTokensNotificationHandler>();
```
### External Dependencies
**Examine/Lucene** (via Core):
- Powers content querying
- Selector/Filter/Sort handlers build Lucene queries
**OpenIddict** (via Api.Common):
- Member OAuth 2.0 authentication
- Reference tokens (not JWT)
### Configuration (appsettings.json)
```json
{
"Umbraco": {
"CMS": {
"DeliveryApi": {
"Enabled": true,
"PublicAccess": true,
"ApiKey": "your-api-key",
"Media": {
"Enabled": true,
"PublicAccess": true
},
"MemberAuthorization": {
"AuthorizationCodeFlow": { "Enabled": true },
"ClientCredentialsFlow": { "Enabled": false }
},
"OutputCache": {
"Enabled": true,
"ContentDuration": "00:01:00",
"MediaDuration": "00:01:00"
}
}
}
}
}
```
### API Endpoints Summary
**Content** (`/umbraco/delivery/api/v2/content`):
- `GET /item/{id}` - Single content by GUID
- `GET /item/{path}` - Single content by route
- `GET /items` - Multiple by IDs
- `GET /` - Query with fetch/filter/sort
**Media** (`/umbraco/delivery/api/v2/media`):
- `GET /item/{id}` - Single media by GUID
- `GET /item/{path}` - Single media by path
- `GET /items` - Multiple by IDs
- `GET /` - Query media
**Security** (`/umbraco/delivery/api/v1/security/member`):
- `GET /authorize` - Start OAuth flow
- `POST /token` - Exchange code for token
- `GET /signout` - Revoke session
---
## Quick Reference
### Essential Commands
```bash
# Build project
dotnet build src/Umbraco.Cms.Api.Delivery/Umbraco.Cms.Api.Delivery.csproj
# Pack for NuGet
dotnet pack src/Umbraco.Cms.Api.Delivery/Umbraco.Cms.Api.Delivery.csproj -c Release
# Run integration tests
dotnet test tests/Umbraco.Tests.Integration/ --filter "FullyQualifiedName~Delivery"
# Check packages
dotnet list src/Umbraco.Cms.Api.Delivery/Umbraco.Cms.Api.Delivery.csproj package --outdated
```
### Key Classes
| Class | Purpose | File |
|-------|---------|------|
| `DeliveryApiControllerBase` | Base controller with path decoding | Controllers/DeliveryApiControllerBase.cs |
| `ApiContentQueryService` | Query orchestration | Services/ApiContentQueryService.cs |
| `ApiAccessService` | Access control logic | Services/ApiAccessService.cs |
| `DeliveryApiOutputCachePolicy` | Cache policy implementation | Caching/DeliveryApiOutputCachePolicy.cs |
| `MemberController` | OAuth endpoints | Controllers/Security/MemberController.cs |
| `RequestContextOutputExpansionStrategyV2` | V2 output expansion | Rendering/RequestContextOutputExpansionStrategyV2.cs |
### Important Files
- `Umbraco.Cms.Api.Delivery.csproj` - Project dependencies
- `DependencyInjection/UmbracoBuilderExtensions.cs` - DI registration (lines 33-141)
- `Configuration/DeliveryApiConfiguration.cs` - API constants
- `Services/ApiContentQueryService.cs` - Query execution
### Getting Help
- **Root documentation**: `/CLAUDE.md` - Repository overview
- **API Common patterns**: `/src/Umbraco.Cms.Api.Common/CLAUDE.md`
- **Official docs**: https://docs.umbraco.com/umbraco-cms/reference/content-delivery-api
- **Media docs**: https://docs.umbraco.com/umbraco-cms/reference/content-delivery-api/media-delivery-api
---
**This library exposes Umbraco content and media via REST for headless scenarios. Focus on query handlers, access control, and member authentication when working here.**
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.OutputCaching;
using Microsoft.AspNetCore.OutputCaching;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Primitives;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Caching;
@@ -7,9 +8,13 @@ namespace Umbraco.Cms.Api.Delivery.Caching;
internal sealed class DeliveryApiOutputCachePolicy : IOutputCachePolicy
{
private readonly TimeSpan _duration;
private readonly StringValues _varyByHeaderNames;
public DeliveryApiOutputCachePolicy(TimeSpan duration)
=> _duration = duration;
public DeliveryApiOutputCachePolicy(TimeSpan duration, StringValues varyByHeaderNames)
{
_duration = duration;
_varyByHeaderNames = varyByHeaderNames;
}
ValueTask IOutputCachePolicy.CacheRequestAsync(OutputCacheContext context, CancellationToken cancellationToken)
{
@@ -18,8 +23,14 @@ internal sealed class DeliveryApiOutputCachePolicy : IOutputCachePolicy
.RequestServices
.GetRequiredService<IRequestPreviewService>();
context.EnableOutputCaching = requestPreviewService.IsPreview() is false;
IApiAccessService apiAccessService = context
.HttpContext
.RequestServices
.GetRequiredService<IApiAccessService>();
context.EnableOutputCaching = requestPreviewService.IsPreview() is false && apiAccessService.HasPublicAccess();
context.ResponseExpirationTimeSpan = _duration;
context.CacheVaryByRules.HeaderNames = _varyByHeaderNames;
return ValueTask.CompletedTask;
}
@@ -1,6 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Cms.Api.Common.OpenApi;
using Umbraco.Cms.Api.Delivery.Filters;
@@ -1,6 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Cms.Api.Common.Security;
using Umbraco.Cms.Api.Delivery.Controllers.Content;
@@ -26,7 +26,7 @@ public class ConfigureUmbracoMemberAuthenticationDeliveryApiSwaggerGenOptions :
options.OperationFilter<DeliveryApiSecurityFilter>();
}
private class DeliveryApiSecurityFilter : SwaggerFilterBase<ContentApiControllerBase>, IOperationFilter, IDocumentFilter
private sealed class DeliveryApiSecurityFilter : SwaggerFilterBase<ContentApiControllerBase>, IOperationFilter, IDocumentFilter
{
public void Apply(OpenApiOperation operation, OperationFilterContext context)
{
@@ -35,23 +35,9 @@ public class ConfigureUmbracoMemberAuthenticationDeliveryApiSwaggerGenOptions :
return;
}
operation.Security = new List<OpenApiSecurityRequirement>
{
new OpenApiSecurityRequirement
{
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference
{
Type = ReferenceType.SecurityScheme,
Id = AuthSchemeName,
}
},
[]
}
}
};
var schemaRef = new OpenApiSecuritySchemeReference(AuthSchemeName, context.Document);
operation.Security ??= new List<OpenApiSecurityRequirement>();
operation.Security.Add(new OpenApiSecurityRequirement { [schemaRef] = [] });
}
public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)
@@ -61,7 +47,7 @@ public class ConfigureUmbracoMemberAuthenticationDeliveryApiSwaggerGenOptions :
return;
}
swaggerDoc.Components.SecuritySchemes.Add(
swaggerDoc.AddComponent(
AuthSchemeName,
new OpenApiSecurityScheme
{
@@ -74,9 +60,9 @@ public class ConfigureUmbracoMemberAuthenticationDeliveryApiSwaggerGenOptions :
AuthorizationCode = new OpenApiOAuthFlow
{
AuthorizationUrl = new Uri(Paths.MemberApi.AuthorizationEndpoint, UriKind.Relative),
TokenUrl = new Uri(Paths.MemberApi.TokenEndpoint, UriKind.Relative)
}
}
TokenUrl = new Uri(Paths.MemberApi.TokenEndpoint, UriKind.Relative),
},
},
});
}
}
@@ -1,4 +1,3 @@
using System.Diagnostics;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -8,7 +7,6 @@ using Umbraco.Cms.Core.Models.PublishedContent;
namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByIdContentApiController : ContentApiItemControllerBase
{
@@ -21,16 +19,6 @@ public class ByIdContentApiController : ContentApiItemControllerBase
: base(apiPublishedContentCache, apiContentResponseBuilder)
=> _requestMemberAccessService = requestMemberAccessService;
[HttpGet("item/{id:guid}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IApiContentResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> ById(Guid id)
=> await HandleRequest(id);
/// <summary>
/// Gets a content item by id.
/// </summary>
@@ -8,7 +8,6 @@ using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByIdsContentApiController : ContentApiItemControllerBase
{
@@ -21,15 +20,6 @@ public class ByIdsContentApiController : ContentApiItemControllerBase
: base(apiPublishedContentCache, apiContentResponseBuilder)
=> _requestMemberAccessService = requestMemberAccessService;
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<IApiContentResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> Item([FromQuery(Name = "id")] HashSet<Guid> ids)
=> await HandleRequest(ids);
/// <summary>
/// Gets content items by ids.
/// </summary>
@@ -58,6 +48,6 @@ public class ByIdsContentApiController : ContentApiItemControllerBase
.WhereNotNull()
.ToArray();
return await Task.FromResult(Ok(apiContentItems));
return Ok(apiContentItems);
}
}
@@ -1,17 +1,13 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByRouteContentApiController : ContentApiItemControllerBase
{
@@ -21,45 +17,6 @@ public class ByRouteContentApiController : ContentApiItemControllerBase
private readonly IRequestMemberAccessService _requestMemberAccessService;
private const string PreviewContentRequestPathPrefix = $"/{Constants.DeliveryApi.Routing.PreviewContentPathPrefix}";
[Obsolete($"Please use the constructor that accepts {nameof(IApiContentPathResolver)}. Will be removed in V15.")]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IRequestRoutingService requestRoutingService,
IRequestRedirectService requestRedirectService,
IRequestPreviewService requestPreviewService,
IRequestMemberAccessService requestMemberAccessService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
requestRedirectService,
requestPreviewService,
requestMemberAccessService,
StaticServiceProvider.Instance.GetRequiredService<IApiContentPathResolver>())
{
}
[Obsolete($"Please use the non-obsolete constructor. Will be removed in V15.")]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService,
IRequestRoutingService requestRoutingService,
IRequestRedirectService requestRedirectService,
IRequestPreviewService requestPreviewService,
IRequestMemberAccessService requestMemberAccessService,
IApiContentPathResolver apiContentPathResolver)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
requestRedirectService,
requestPreviewService,
requestMemberAccessService,
apiContentPathResolver)
{
}
[ActivatorUtilitiesConstructor]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
@@ -75,16 +32,6 @@ public class ByRouteContentApiController : ContentApiItemControllerBase
_apiContentPathResolver = apiContentPathResolver;
}
[HttpGet("item/{*path}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IApiContentResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> ByRoute(string path = "")
=> await HandleRequest(path);
/// <summary>
/// Gets a content item by route.
/// </summary>
@@ -117,7 +64,7 @@ public class ByRouteContentApiController : ContentApiItemControllerBase
return deniedAccessResult;
}
return await Task.FromResult(Ok(ApiContentResponseBuilder.Build(contentItem)));
return Ok(ApiContentResponseBuilder.Build(contentItem));
}
IApiContentRoute? redirectRoute = _requestRedirectService.GetRedirectRoute(path);
@@ -152,8 +99,8 @@ public class ByRouteContentApiController : ContentApiItemControllerBase
private IActionResult RedirectTo(IApiContentRoute redirectRoute)
{
Response.Headers.Add("Location-Start-Item-Path", redirectRoute.StartItem.Path);
Response.Headers.Add("Location-Start-Item-Id", redirectRoute.StartItem.Id.ToString("D"));
Response.Headers.Append("Location-Start-Item-Path", redirectRoute.StartItem.Path);
Response.Headers.Append("Location-Start-Item-Id", redirectRoute.StartItem.Id.ToString("D"));
return RedirectPermanent(redirectRoute.Path);
}
}
@@ -13,7 +13,7 @@ namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[DeliveryApiAccess]
[VersionedDeliveryApiRoute("content")]
[ApiExplorerSettings(GroupName = "Content")]
[LocalizeFromAcceptLanguageHeader]
[ContextualizeFromAcceptHeaders]
[ValidateStartItem]
[AddVaryHeader]
[OutputCache(PolicyName = Constants.DeliveryApi.OutputCache.ContentCachePolicy)]
@@ -12,7 +12,6 @@ using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class QueryContentApiController : ContentApiControllerBase
{
@@ -30,20 +29,6 @@ public class QueryContentApiController : ContentApiControllerBase
_requestMemberAccessService = requestMemberAccessService;
}
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<IApiContentResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> Query(
string? fetch,
[FromQuery] string[] filter,
[FromQuery] string[] sort,
int skip = 0,
int take = 10)
=> await HandleRequest(fetch, filter, sort, skip, take);
/// <summary>
/// Gets a paginated list of content item(s) from query.
/// </summary>
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models.DeliveryApi;
@@ -8,7 +8,6 @@ using Umbraco.Cms.Infrastructure.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Controllers.Media;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByIdMediaApiController : MediaApiControllerBase
{
@@ -19,14 +18,6 @@ public class ByIdMediaApiController : MediaApiControllerBase
{
}
[HttpGet("item/{id:guid}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IApiMediaWithCropsResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> ById(Guid id)
=> await HandleRequest(id);
/// <summary>
/// Gets a media item by id.
/// </summary>
@@ -36,16 +27,16 @@ public class ByIdMediaApiController : MediaApiControllerBase
[MapToApiVersion("2.0")]
[ProducesResponseType(typeof(IApiMediaWithCropsResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> ByIdV20(Guid id)
=> await HandleRequest(id);
public Task<IActionResult> ByIdV20(Guid id)
=> Task.FromResult(HandleRequest(id));
private async Task<IActionResult> HandleRequest(Guid id)
private IActionResult HandleRequest(Guid id)
{
IPublishedContent? media = PublishedMediaCache.GetById(id);
if (media is null)
{
return await Task.FromResult(NotFound());
return NotFound();
}
return Ok(BuildApiMediaWithCrops(media));
@@ -9,7 +9,6 @@ using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers.Media;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByIdsMediaApiController : MediaApiControllerBase
{
@@ -18,13 +17,6 @@ public class ByIdsMediaApiController : MediaApiControllerBase
{
}
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<IApiMediaWithCropsResponse>), StatusCodes.Status200OK)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> Item([FromQuery(Name = "id")] HashSet<Guid> ids)
=> await HandleRequest(ids);
/// <summary>
/// Gets media items by ids.
/// </summary>
@@ -33,10 +25,10 @@ public class ByIdsMediaApiController : MediaApiControllerBase
[HttpGet("items")]
[MapToApiVersion("2.0")]
[ProducesResponseType(typeof(IEnumerable<IApiMediaWithCropsResponse>), StatusCodes.Status200OK)]
public async Task<IActionResult> ItemsV20([FromQuery(Name = "id")] HashSet<Guid> ids)
=> await HandleRequest(ids);
public Task<IActionResult> ItemsV20([FromQuery(Name = "id")] HashSet<Guid> ids)
=> Task.FromResult(HandleRequest(ids));
private async Task<IActionResult> HandleRequest(HashSet<Guid> ids)
private IActionResult HandleRequest(HashSet<Guid> ids)
{
IPublishedContent[] mediaItems = ids
.Select(PublishedMediaCache.GetById)
@@ -47,6 +39,6 @@ public class ByIdsMediaApiController : MediaApiControllerBase
.Select(BuildApiMediaWithCrops)
.ToArray();
return await Task.FromResult(Ok(apiMediaItems));
return Ok(apiMediaItems);
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.DeliveryApi;
@@ -9,7 +9,6 @@ using Umbraco.Cms.Infrastructure.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Controllers.Media;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByPathMediaApiController : MediaApiControllerBase
{
@@ -22,14 +21,6 @@ public class ByPathMediaApiController : MediaApiControllerBase
: base(publishedMediaCache, apiMediaWithCropsResponseBuilder)
=> _apiMediaQueryService = apiMediaQueryService;
[HttpGet("item/{*path}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IApiMediaWithCropsResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> ByPath(string path)
=> await HandleRequest(path);
/// <summary>
/// Gets a media item by its path.
/// </summary>
@@ -39,17 +30,17 @@ public class ByPathMediaApiController : MediaApiControllerBase
[MapToApiVersion("2.0")]
[ProducesResponseType(typeof(IApiMediaWithCropsResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> ByPathV20(string path)
=> await HandleRequest(path);
public Task<IActionResult> ByPathV20(string path)
=> Task.FromResult(HandleRequest(path));
private async Task<IActionResult> HandleRequest(string path)
private IActionResult HandleRequest(string path)
{
path = DecodePath(path);
IPublishedContent? media = _apiMediaQueryService.GetByPath(path);
if (media is null)
{
return await Task.FromResult(NotFound());
return NotFound();
}
return Ok(BuildApiMediaWithCrops(media));
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -14,7 +14,6 @@ using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers.Media;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class QueryMediaApiController : MediaApiControllerBase
{
@@ -27,19 +26,6 @@ public class QueryMediaApiController : MediaApiControllerBase
: base(publishedMediaCache, apiMediaWithCropsResponseBuilder)
=> _apiMediaQueryService = apiMediaQueryService;
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<IApiMediaWithCropsResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> Query(
string? fetch,
[FromQuery] string[] filter,
[FromQuery] string[] sort,
int skip = 0,
int take = 10)
=> await HandleRequest(fetch, filter, sort, skip, take);
/// <summary>
/// Gets a paginated list of media item(s) from query.
/// </summary>
@@ -53,15 +39,15 @@ public class QueryMediaApiController : MediaApiControllerBase
[MapToApiVersion("2.0")]
[ProducesResponseType(typeof(PagedViewModel<IApiMediaWithCropsResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
public async Task<IActionResult> QueryV20(
public Task<IActionResult> QueryV20(
string? fetch,
[FromQuery] string[] filter,
[FromQuery] string[] sort,
int skip = 0,
int take = 10)
=> await HandleRequest(fetch, filter, sort, skip, take);
=> Task.FromResult(HandleRequest(fetch, filter, sort, skip, take));
private async Task<IActionResult> HandleRequest(string? fetch, string[] filter, string[] sort, int skip, int take)
private IActionResult HandleRequest(string? fetch, string[] filter, string[] sort, int skip, int take)
{
Attempt<PagedModel<Guid>, ApiMediaQueryOperationStatus> queryAttempt = _apiMediaQueryService.ExecuteQuery(fetch, filter, sort, skip, take);
@@ -79,6 +65,6 @@ public class QueryMediaApiController : MediaApiControllerBase
Items = mediaItems.Select(BuildApiMediaWithCrops)
};
return await Task.FromResult(Ok(model));
return Ok(model);
}
}
@@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using OpenIddict.Abstractions;
@@ -13,7 +12,6 @@ using OpenIddict.Server.AspNetCore;
using Umbraco.Cms.Api.Delivery.Routing;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Web.Common.Security;
using Umbraco.Extensions;
@@ -33,31 +31,6 @@ public class MemberController : DeliveryApiControllerBase
private readonly DeliveryApiSettings _deliveryApiSettings;
private readonly ILogger<MemberController> _logger;
[Obsolete("Please use the non-obsolete constructor. Will be removed in V16.")]
public MemberController(
IHttpContextAccessor httpContextAccessor,
IMemberSignInManager memberSignInManager,
IMemberManager memberManager,
IOptions<DeliveryApiSettings> deliveryApiSettings,
ILogger<MemberController> logger)
: this(memberSignInManager, memberManager, StaticServiceProvider.Instance.GetRequiredService<IMemberClientCredentialsManager>(), deliveryApiSettings, logger)
{
}
[Obsolete("Please use the non-obsolete constructor. Will be removed in V16.")]
public MemberController(
IHttpContextAccessor httpContextAccessor,
IMemberSignInManager memberSignInManager,
IMemberManager memberManager,
IMemberClientCredentialsManager memberClientCredentialsManager,
IOptions<DeliveryApiSettings> deliveryApiSettings,
ILogger<MemberController> logger)
: this(memberSignInManager, memberManager, memberClientCredentialsManager, deliveryApiSettings, logger)
{
}
[ActivatorUtilitiesConstructor]
public MemberController(
IMemberSignInManager memberSignInManager,
IMemberManager memberManager,
@@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Primitives;
using Umbraco.Cms.Api.Common.DependencyInjection;
using Umbraco.Cms.Api.Delivery.Accessors;
using Umbraco.Cms.Api.Delivery.Caching;
@@ -34,26 +35,35 @@ public static class UmbracoBuilderExtensions
builder.Services.AddScoped<IRequestStartItemProvider, RequestStartItemProvider>();
builder.Services.AddScoped<RequestContextOutputExpansionStrategy>();
builder.Services.AddScoped<RequestContextOutputExpansionStrategyV2>();
builder.Services.AddScoped<IOutputExpansionStrategy>(provider =>
{
HttpContext? httpContext = provider.GetRequiredService<IHttpContextAccessor>().HttpContext;
ApiVersion? apiVersion = httpContext?.GetRequestedApiVersion();
if (apiVersion is null)
{
return provider.GetRequiredService<RequestContextOutputExpansionStrategyV2>();
}
// V1 of the Delivery API uses a different expansion strategy than V2+
return apiVersion.MajorVersion == 1
? provider.GetRequiredService<RequestContextOutputExpansionStrategy>()
: provider.GetRequiredService<RequestContextOutputExpansionStrategyV2>();
});
builder.Services.AddUnique<IOutputExpansionStrategy>(
provider =>
{
HttpContext? httpContext = provider.GetRequiredService<IHttpContextAccessor>().HttpContext;
ApiVersion? apiVersion = httpContext?.GetRequestedApiVersion();
if (apiVersion is null)
{
return provider.GetRequiredService<RequestContextOutputExpansionStrategyV2>();
}
// V1 of the Delivery API uses a different expansion strategy than V2+
return apiVersion.MajorVersion == 1
? provider.GetRequiredService<RequestContextOutputExpansionStrategy>()
: provider.GetRequiredService<RequestContextOutputExpansionStrategyV2>();
},
ServiceLifetime.Scoped);
builder.Services.AddSingleton<IRequestCultureService, RequestCultureService>();
builder.Services.AddSingleton<IRequestSegmmentService, RequestSegmentService>();
builder.Services.AddSingleton<IRequestSegmentService, RequestSegmentService>();
builder.Services.AddSingleton<IRequestRoutingService, RequestRoutingService>();
builder.Services.AddSingleton<IRequestRedirectService, RequestRedirectService>();
builder.Services.AddSingleton<IRequestPreviewService, RequestPreviewService>();
builder.Services.AddSingleton<IOutputExpansionStrategyAccessor, RequestContextOutputExpansionStrategyAccessor>();
// Webooks register a more basic implementation, remove it.
builder.Services.AddUnique<IOutputExpansionStrategyAccessor, RequestContextOutputExpansionStrategyAccessor>(ServiceLifetime.Singleton);
builder.Services.AddSingleton<IRequestStartItemProviderAccessor, RequestContextRequestStartItemProviderAccessor>();
builder.Services.AddSingleton<IApiAccessService, ApiAccessService>();
builder.Services.AddSingleton<IApiContentQueryService, ApiContentQueryService>();
builder.Services.AddSingleton<IApiContentQueryProvider, ApiContentQueryProvider>();
@@ -62,7 +72,6 @@ public static class UmbracoBuilderExtensions
builder.Services.AddTransient<IMemberApplicationManager, MemberApplicationManager>();
builder.Services.AddTransient<IRequestMemberAccessService, RequestMemberAccessService>();
builder.Services.AddTransient<ICurrentMemberClaimsProvider, CurrentMemberClaimsProvider>();
builder.Services.AddScoped<IMemberClientCredentialsManager, MemberClientCredentialsManager>();
builder.Services.ConfigureOptions<ConfigureUmbracoDeliveryApiSwaggerGenOptions>();
builder.AddUmbracoApiOpenApiUI();
@@ -110,12 +119,20 @@ public static class UmbracoBuilderExtensions
if (outputCacheSettings.ContentDuration.TotalSeconds > 0)
{
options.AddPolicy(Constants.DeliveryApi.OutputCache.ContentCachePolicy, new DeliveryApiOutputCachePolicy(outputCacheSettings.ContentDuration));
options.AddPolicy(
Constants.DeliveryApi.OutputCache.ContentCachePolicy,
new DeliveryApiOutputCachePolicy(
outputCacheSettings.ContentDuration,
new StringValues([Constants.DeliveryApi.HeaderNames.AcceptLanguage, Constants.DeliveryApi.HeaderNames.AcceptSegment, Constants.DeliveryApi.HeaderNames.StartItem])));
}
if (outputCacheSettings.MediaDuration.TotalSeconds > 0)
{
options.AddPolicy(Constants.DeliveryApi.OutputCache.MediaCachePolicy, new DeliveryApiOutputCachePolicy(outputCacheSettings.MediaDuration));
options.AddPolicy(
Constants.DeliveryApi.OutputCache.MediaCachePolicy,
new DeliveryApiOutputCachePolicy(
outputCacheSettings.MediaDuration,
Constants.DeliveryApi.HeaderNames.StartItem));
}
});
@@ -4,7 +4,7 @@ namespace Umbraco.Cms.Api.Delivery.Filters;
public sealed class AddVaryHeaderAttribute : ActionFilterAttribute
{
private const string Vary = "Accept-Language, Preview, Start-Item";
private const string Vary = "Accept-Language, Accept-Segment, Preview, Start-Item";
public override void OnResultExecuting(ResultExecutingContext context)
=> context.HttpContext.Response.Headers.Vary = context.HttpContext.Response.Headers.Vary.Count > 0
@@ -0,0 +1,53 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Filters;
internal sealed class ContextualizeFromAcceptHeadersAttribute : TypeFilterAttribute
{
public ContextualizeFromAcceptHeadersAttribute()
: base(typeof(LocalizeFromAcceptLanguageHeaderAttributeFilter))
{
}
private sealed class LocalizeFromAcceptLanguageHeaderAttributeFilter : IActionFilter
{
private readonly IRequestCultureService _requestCultureService;
private readonly IRequestSegmentService _requestSegmentService;
private readonly IVariationContextAccessor _variationContextAccessor;
public LocalizeFromAcceptLanguageHeaderAttributeFilter(
IRequestCultureService requestCultureService,
IRequestSegmentService requestSegmentService,
IVariationContextAccessor variationContextAccessor)
{
_requestCultureService = requestCultureService;
_requestSegmentService = requestSegmentService;
_variationContextAccessor = variationContextAccessor;
}
public void OnActionExecuting(ActionExecutingContext context)
{
var requestedCulture = _requestCultureService.GetRequestedCulture().NullOrWhiteSpaceAsNull();
var requestedSegment = _requestSegmentService.GetRequestedSegment().NullOrWhiteSpaceAsNull();
if (requestedCulture.IsNullOrWhiteSpace() && requestedSegment.IsNullOrWhiteSpace())
{
return;
}
// contextualize the request
// NOTE: request culture or segment can be null here (but not both), so make sure to retain any existing
// context by means of fallback to current variation context (if available)
_variationContextAccessor.VariationContext = new VariationContext(
requestedCulture ?? _variationContextAccessor.VariationContext?.Culture,
requestedSegment ?? _variationContextAccessor.VariationContext?.Segment);
}
public void OnActionExecuted(ActionExecutedContext context)
{
}
}
}
@@ -11,7 +11,7 @@ internal sealed class DeliveryApiAccessAttribute : TypeFilterAttribute
{
}
private class DeliveryApiAccessFilter : IActionFilter
private sealed class DeliveryApiAccessFilter : IActionFilter
{
private readonly IApiAccessService _apiAccessService;
private readonly IRequestPreviewService _requestPreviewService;
@@ -11,7 +11,7 @@ internal sealed class DeliveryApiMediaAccessAttribute : TypeFilterAttribute
{
}
private class DeliveryApiMediaAccessFilter : IActionFilter
private sealed class DeliveryApiMediaAccessFilter : IActionFilter
{
private readonly IApiAccessService _apiAccessService;
@@ -1,37 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Filters;
internal sealed class LocalizeFromAcceptLanguageHeaderAttribute : TypeFilterAttribute
{
public LocalizeFromAcceptLanguageHeaderAttribute()
: base(typeof(LocalizeFromAcceptLanguageHeaderAttributeFilter))
{
}
private class LocalizeFromAcceptLanguageHeaderAttributeFilter : IActionFilter
{
private readonly IRequestCultureService _requestCultureService;
public LocalizeFromAcceptLanguageHeaderAttributeFilter(IRequestCultureService requestCultureService)
=> _requestCultureService = requestCultureService;
public void OnActionExecuting(ActionExecutingContext context)
{
var requestedCulture = _requestCultureService.GetRequestedCulture();
if (requestedCulture.IsNullOrWhiteSpace())
{
return;
}
_requestCultureService.SetRequestCulture(requestedCulture);
}
public void OnActionExecuted(ActionExecutedContext context)
{
}
}
}
@@ -1,9 +1,9 @@
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;
using System.Text.Json.Nodes;
using Microsoft.OpenApi;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Cms.Api.Delivery.Configuration;
using Umbraco.Cms.Api.Delivery.Controllers;
using Umbraco.Cms.Api.Delivery.Controllers.Content;
using Umbraco.Cms.Core;
namespace Umbraco.Cms.Api.Delivery.Filters;
@@ -13,7 +13,7 @@ internal sealed class SwaggerContentDocumentationFilter : SwaggerDocumentationFi
protected override void ApplyOperation(OpenApiOperation operation, OperationFilterContext context)
{
operation.Parameters ??= new List<OpenApiParameter>();
operation.Parameters ??= new List<IOpenApiParameter>();
AddExpand(operation, context);
@@ -21,36 +21,50 @@ internal sealed class SwaggerContentDocumentationFilter : SwaggerDocumentationFi
operation.Parameters.Add(new OpenApiParameter
{
Name = "Accept-Language",
Name = Constants.DeliveryApi.HeaderNames.AcceptLanguage,
In = ParameterLocation.Header,
Required = false,
Description = "Defines the language to return. Use this when querying language variant content items.",
Schema = new OpenApiSchema { Type = "string" },
Examples = new Dictionary<string, OpenApiExample>
Schema = new OpenApiSchema { Type = JsonSchemaType.String },
Examples = new Dictionary<string, IOpenApiExample>
{
{ "Default", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{ "English culture", new OpenApiExample { Value = new OpenApiString("en-us") } }
}
{ "Default", new OpenApiExample { Value = string.Empty } },
{ "English culture", new OpenApiExample { Value = "en-us" } },
},
});
operation.Parameters.Add(new OpenApiParameter
{
Name = Constants.DeliveryApi.HeaderNames.AcceptSegment,
In = ParameterLocation.Header,
Required = false,
Description = "Defines the segment to return. Use this when querying segment variant content items.",
Schema = new OpenApiSchema { Type = JsonSchemaType.String },
Examples = new Dictionary<string, IOpenApiExample>
{
{ "Default", new OpenApiExample { Value = string.Empty } },
{ "Segment One", new OpenApiExample { Value = "segment-one" } },
},
});
AddApiKey(operation);
operation.Parameters.Add(new OpenApiParameter
{
Name = "Preview",
Name = Constants.DeliveryApi.HeaderNames.Preview,
In = ParameterLocation.Header,
Required = false,
Description = "Whether to request draft content.",
Schema = new OpenApiSchema { Type = "boolean" }
Schema = new OpenApiSchema { Type = JsonSchemaType.Boolean },
});
operation.Parameters.Add(new OpenApiParameter
{
Name = "Start-Item",
Name = Constants.DeliveryApi.HeaderNames.StartItem,
In = ParameterLocation.Header,
Required = false,
Description = "URL segment or GUID of a root content item.",
Schema = new OpenApiSchema { Type = "string" }
Schema = new OpenApiSchema { Type = JsonSchemaType.String },
});
}
@@ -78,105 +92,36 @@ internal sealed class SwaggerContentDocumentationFilter : SwaggerDocumentationFi
}
}
private Dictionary<string, OpenApiExample> FetchQueryParameterExamples() =>
private Dictionary<string, IOpenApiExample> FetchQueryParameterExamples() =>
new()
{
{ "Select all", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{
"Select all ancestors of a node by id",
new OpenApiExample { Value = new OpenApiString("ancestors:id") }
},
{
"Select all ancestors of a node by path",
new OpenApiExample { Value = new OpenApiString("ancestors:path") }
},
{
"Select all children of a node by id",
new OpenApiExample { Value = new OpenApiString("children:id") }
},
{
"Select all children of a node by path",
new OpenApiExample { Value = new OpenApiString("children:path") }
},
{
"Select all descendants of a node by id",
new OpenApiExample { Value = new OpenApiString("descendants:id") }
},
{
"Select all descendants of a node by path",
new OpenApiExample { Value = new OpenApiString("descendants:path") }
}
{ "Select all", new OpenApiExample { Value = string.Empty } },
{ "Select all ancestors of a node by id", new OpenApiExample { Value = "ancestors:id" } },
{ "Select all ancestors of a node by path", new OpenApiExample { Value = "ancestors:path" } },
{ "Select all children of a node by id", new OpenApiExample { Value = "children:id" } },
{ "Select all children of a node by path", new OpenApiExample { Value = "children:path" } },
{ "Select all descendants of a node by id", new OpenApiExample { Value = "descendants:id" } },
{ "Select all descendants of a node by path", new OpenApiExample { Value = "descendants:path" } },
};
private Dictionary<string, OpenApiExample> FilterQueryParameterExamples() =>
private Dictionary<string, IOpenApiExample> FilterQueryParameterExamples() =>
new()
{
{ "Default filter", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{
"Filter by content type (equals)",
new OpenApiExample { Value = new OpenApiArray { new OpenApiString("contentType:alias1") } }
},
{
"Filter by name (contains)",
new OpenApiExample { Value = new OpenApiArray { new OpenApiString("name:nodeName") } }
},
{
"Filter by creation date (less than)",
new OpenApiExample { Value = new OpenApiArray { new OpenApiString("createDate<2024-01-01") } }
},
{
"Filter by update date (greater than or equal)",
new OpenApiExample { Value = new OpenApiArray { new OpenApiString("updateDate>:2023-01-01") } }
}
{ "Default filter", new OpenApiExample { Value = string.Empty } },
{ "Filter by content type (equals)", new OpenApiExample { Value = new JsonArray { "contentType:alias1" } } },
{ "Filter by name (contains)", new OpenApiExample { Value = new JsonArray { "name:nodeName" } } },
{ "Filter by creation date (less than)", new OpenApiExample { Value = new JsonArray { "createDate<2024-01-01" } } },
{ "Filter by update date (greater than or equal)", new OpenApiExample { Value = new JsonArray { "updateDate>:2023-01-01" } } },
};
private Dictionary<string, OpenApiExample> SortQueryParameterExamples() =>
private Dictionary<string, IOpenApiExample> SortQueryParameterExamples() =>
new()
{
{ "Default sort", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{
"Sort by create date",
new OpenApiExample
{
Value = new OpenApiArray
{
new OpenApiString("createDate:asc"), new OpenApiString("createDate:desc")
}
}
},
{
"Sort by level",
new OpenApiExample
{
Value = new OpenApiArray { new OpenApiString("level:asc"), new OpenApiString("level:desc") }
}
},
{
"Sort by name",
new OpenApiExample
{
Value = new OpenApiArray { new OpenApiString("name:asc"), new OpenApiString("name:desc") }
}
},
{
"Sort by sort order",
new OpenApiExample
{
Value = new OpenApiArray
{
new OpenApiString("sortOrder:asc"), new OpenApiString("sortOrder:desc")
}
}
},
{
"Sort by update date",
new OpenApiExample
{
Value = new OpenApiArray
{
new OpenApiString("updateDate:asc"), new OpenApiString("updateDate:desc")
}
}
}
{ "Default sort", new OpenApiExample { Value = string.Empty } },
{ "Sort by create date", new OpenApiExample { Value = new JsonArray { "createDate:asc", "createDate:desc" } } },
{ "Sort by level", new OpenApiExample { Value = new JsonArray { "level:asc", "level:desc" } } },
{ "Sort by name", new OpenApiExample { Value = new JsonArray { "name:asc", "name:desc" } } },
{ "Sort by sort order", new OpenApiExample { Value = new JsonArray { "sortOrder:asc", "sortOrder:desc" } } },
{ "Sort by update date", new OpenApiExample { Value = new JsonArray { "updateDate:asc", "updateDate:desc" } } },
};
}
@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.OpenApi;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Cms.Core;
namespace Umbraco.Cms.Api.Delivery.Filters;
@@ -9,6 +9,8 @@ internal abstract class SwaggerDocumentationFilterBase<TBaseController>
: SwaggerFilterBase<TBaseController>, IOperationFilter, IParameterFilter
where TBaseController : Controller
{
protected abstract string DocumentationLink { get; }
public void Apply(OpenApiOperation operation, OperationFilterContext context)
{
if (CanApply(context))
@@ -17,21 +19,19 @@ internal abstract class SwaggerDocumentationFilterBase<TBaseController>
}
}
public void Apply(OpenApiParameter parameter, ParameterFilterContext context)
public void Apply(IOpenApiParameter parameter, ParameterFilterContext context)
{
if (CanApply(context))
if (CanApply(context) && parameter is OpenApiParameter openApiParameter)
{
ApplyParameter(parameter, context);
ApplyParameter(openApiParameter, context);
}
}
protected abstract string DocumentationLink { get; }
protected abstract void ApplyOperation(OpenApiOperation operation, OperationFilterContext context);
protected abstract void ApplyParameter(OpenApiParameter parameter, ParameterFilterContext context);
protected void AddQueryParameterDocumentation(OpenApiParameter parameter, Dictionary<string, OpenApiExample> examples, string description)
protected void AddQueryParameterDocumentation(OpenApiParameter parameter, Dictionary<string, IOpenApiExample> examples, string description)
{
parameter.Description = QueryParameterDescription(description);
parameter.Examples = examples;
@@ -60,15 +60,19 @@ internal abstract class SwaggerDocumentationFilterBase<TBaseController>
AddFields(operation);
}
protected void AddApiKey(OpenApiOperation operation) =>
operation.Parameters.Add(new OpenApiParameter
{
Name = "Api-Key",
In = ParameterLocation.Header,
Required = false,
Description = "API key specified through configuration to authorize access to the API.",
Schema = new OpenApiSchema { Type = "string" }
});
protected void AddApiKey(OpenApiOperation operation)
{
operation.Parameters ??= new List<IOpenApiParameter>();
operation.Parameters.Add(
new OpenApiParameter
{
Name = Constants.DeliveryApi.HeaderNames.ApiKey,
In = ParameterLocation.Header,
Required = false,
Description = "API key specified through configuration to authorize access to the API.",
Schema = new OpenApiSchema { Type = JsonSchemaType.String },
});
}
protected string PaginationDescription(bool skip, string itemType)
=> $"Specifies the number of found {itemType} items to {(skip ? "skip" : "take")}. Use this to control pagination of the response.";
@@ -82,78 +86,70 @@ internal abstract class SwaggerDocumentationFilterBase<TBaseController>
// FIXME: remove this when Delivery API V1 has been removed (expectedly in V15)
private void AddExpandV1(OpenApiOperation operation)
=> operation.Parameters.Add(new OpenApiParameter
{
Name = "expand",
In = ParameterLocation.Query,
Required = false,
Description = QueryParameterDescription("Defines the properties that should be expanded in the response"),
Schema = new OpenApiSchema { Type = "string" },
Examples = new Dictionary<string, OpenApiExample>
{
operation.Parameters ??= new List<IOpenApiParameter>();
operation.Parameters.Add(
new OpenApiParameter
{
{ "Expand none", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{ "Expand all", new OpenApiExample { Value = new OpenApiString("all") } },
Name = "expand",
In = ParameterLocation.Query,
Required = false,
Description =
QueryParameterDescription("Defines the properties that should be expanded in the response"),
Schema = new OpenApiSchema { Type = JsonSchemaType.String },
Examples = new Dictionary<string, IOpenApiExample>
{
"Expand specific property",
new OpenApiExample { Value = new OpenApiString("property:alias1") }
{ "Expand none", new OpenApiExample { Value = string.Empty } },
{ "Expand all", new OpenApiExample { Value = "all" } },
{ "Expand specific property", new OpenApiExample { Value = "property:alias1" } },
{ "Expand specific properties", new OpenApiExample { Value = "property:alias1,alias2" } },
},
{
"Expand specific properties",
new OpenApiExample { Value = new OpenApiString("property:alias1,alias2") }
}
}
});
});
}
private void AddExpand(OpenApiOperation operation)
=> operation.Parameters.Add(new OpenApiParameter
{
Name = "expand",
In = ParameterLocation.Query,
Required = false,
Description = QueryParameterDescription("Defines the properties that should be expanded in the response"),
Schema = new OpenApiSchema { Type = "string" },
Examples = new Dictionary<string, OpenApiExample>
{
operation.Parameters ??= new List<IOpenApiParameter>();
operation.Parameters.Add(
new OpenApiParameter
{
{ "Expand none", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{ "Expand all properties", new OpenApiExample { Value = new OpenApiString("properties[$all]") } },
Name = "expand",
In = ParameterLocation.Query,
Required = false,
Description =
QueryParameterDescription("Defines the properties that should be expanded in the response"),
Schema = new OpenApiSchema { Type = JsonSchemaType.String },
Examples = new Dictionary<string, IOpenApiExample>
{
"Expand specific property",
new OpenApiExample { Value = new OpenApiString("properties[alias1]") }
{ "Expand none", new OpenApiExample { Value = string.Empty } },
{ "Expand all properties", new OpenApiExample { Value = "properties[$all]" } },
{ "Expand specific property", new OpenApiExample { Value = "properties[alias1]" } },
{ "Expand specific properties", new OpenApiExample { Value = "properties[alias1,alias2]" } },
{ "Expand nested properties", new OpenApiExample { Value = "properties[alias1[properties[nestedAlias1,nestedAlias2]]]" } },
},
{
"Expand specific properties",
new OpenApiExample { Value = new OpenApiString("properties[alias1,alias2]") }
},
{
"Expand nested properties",
new OpenApiExample { Value = new OpenApiString("properties[alias1[properties[nestedAlias1,nestedAlias2]]]") }
}
}
});
});
}
private void AddFields(OpenApiOperation operation)
=> operation.Parameters.Add(new OpenApiParameter
{
Name = "fields",
In = ParameterLocation.Query,
Required = false,
Description = QueryParameterDescription("Explicitly defines which properties should be included in the response (by default all properties are included)"),
Schema = new OpenApiSchema { Type = "string" },
Examples = new Dictionary<string, OpenApiExample>
{
operation.Parameters ??= new List<IOpenApiParameter>();
operation.Parameters.Add(
new OpenApiParameter
{
{ "Include all properties", new OpenApiExample { Value = new OpenApiString("properties[$all]") } },
Name = "fields",
In = ParameterLocation.Query,
Required = false,
Description =
QueryParameterDescription(
"Explicitly defines which properties should be included in the response (by default all properties are included)"),
Schema = new OpenApiSchema { Type = JsonSchemaType.String },
Examples = new Dictionary<string, IOpenApiExample>
{
"Include only specific property",
new OpenApiExample { Value = new OpenApiString("properties[alias1]") }
{ "Include all properties", new OpenApiExample { Value = "properties[$all]" } },
{ "Include only specific property", new OpenApiExample { Value = "properties[alias1]" } },
{ "Include only specific properties", new OpenApiExample { Value = "properties[alias1,alias2]" } },
{ "Include only specific nested properties", new OpenApiExample { Value = "properties[alias1[properties[nestedAlias1,nestedAlias2]]]" } },
},
{
"Include only specific properties",
new OpenApiExample { Value = new OpenApiString("properties[alias1,alias2]") }
},
{
"Include only specific nested properties",
new OpenApiExample { Value = new OpenApiString("properties[alias1[properties[nestedAlias1,nestedAlias2]]]") }
}
}
});
});
}
}
@@ -1,8 +1,7 @@
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;
using System.Text.Json.Nodes;
using Microsoft.OpenApi;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Cms.Api.Delivery.Configuration;
using Umbraco.Cms.Api.Delivery.Controllers;
using Umbraco.Cms.Api.Delivery.Controllers.Media;
namespace Umbraco.Cms.Api.Delivery.Filters;
@@ -13,7 +12,7 @@ internal sealed class SwaggerMediaDocumentationFilter : SwaggerDocumentationFilt
protected override void ApplyOperation(OpenApiOperation operation, OperationFilterContext context)
{
operation.Parameters ??= new List<OpenApiParameter>();
operation.Parameters ??= new List<IOpenApiParameter>();
AddExpand(operation, context);
@@ -46,77 +45,29 @@ internal sealed class SwaggerMediaDocumentationFilter : SwaggerDocumentationFilt
}
}
private Dictionary<string, OpenApiExample> FetchQueryParameterExamples() =>
private Dictionary<string, IOpenApiExample> FetchQueryParameterExamples() =>
new()
{
{
"Select all children at root level",
new OpenApiExample { Value = new OpenApiString("children:/") }
},
{
"Select all children of a media item by id",
new OpenApiExample { Value = new OpenApiString("children:id") }
},
{
"Select all children of a media item by path",
new OpenApiExample { Value = new OpenApiString("children:path") }
}
{ "Select all children at root level", new OpenApiExample { Value = "children:/" } },
{ "Select all children of a media item by id", new OpenApiExample { Value = "children:id" } },
{ "Select all children of a media item by path", new OpenApiExample { Value = "children:path" } },
};
private Dictionary<string, OpenApiExample> FilterQueryParameterExamples() =>
private Dictionary<string, IOpenApiExample> FilterQueryParameterExamples() =>
new()
{
{ "Default filter", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{
"Filter by media type",
new OpenApiExample { Value = new OpenApiArray { new OpenApiString("mediaType:alias1") } }
},
{
"Filter by name",
new OpenApiExample { Value = new OpenApiArray { new OpenApiString("name:nodeName") } }
}
{ "Default filter", new OpenApiExample { Value = string.Empty } },
{ "Filter by media type", new OpenApiExample { Value = new JsonArray { "mediaType:alias1" } } },
{ "Filter by name", new OpenApiExample { Value = new JsonArray { "name:nodeName" } } },
};
private Dictionary<string, OpenApiExample> SortQueryParameterExamples() =>
private Dictionary<string, IOpenApiExample> SortQueryParameterExamples() =>
new()
{
{ "Default sort", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{
"Sort by create date",
new OpenApiExample
{
Value = new OpenApiArray
{
new OpenApiString("createDate:asc"), new OpenApiString("createDate:desc")
}
}
},
{
"Sort by name",
new OpenApiExample
{
Value = new OpenApiArray { new OpenApiString("name:asc"), new OpenApiString("name:desc") }
}
},
{
"Sort by sort order",
new OpenApiExample
{
Value = new OpenApiArray
{
new OpenApiString("sortOrder:asc"), new OpenApiString("sortOrder:desc")
}
}
},
{
"Sort by update date",
new OpenApiExample
{
Value = new OpenApiArray
{
new OpenApiString("updateDate:asc"), new OpenApiString("updateDate:desc")
}
}
}
{ "Default sort", new OpenApiExample { Value = string.Empty } },
{ "Sort by create date", new OpenApiExample { Value = new JsonArray { "createDate:asc", "createDate:desc" } } },
{ "Sort by name", new OpenApiExample { Value = new JsonArray { "name:asc", "name:desc" } } },
{ "Sort by sort order", new OpenApiExample { Value = new JsonArray { "sortOrder:asc", "sortOrder:desc" } } },
{ "Sort by update date", new OpenApiExample { Value = new JsonArray { "updateDate:asc", "updateDate:desc" } } },
};
}
@@ -12,7 +12,7 @@ internal sealed class ValidateStartItemAttribute : TypeFilterAttribute
{
}
private class ValidateStartItemFilter : IActionFilter
private sealed class ValidateStartItemFilter : IActionFilter
{
private readonly IRequestStartItemProviderAccessor _requestStartItemProviderAccessor;
@@ -7,6 +7,7 @@ using Umbraco.Cms.Core.Events;
using Umbraco.Cms.Core.Notifications;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Sync;
using Umbraco.Cms.Infrastructure.Security;
namespace Umbraco.Cms.Api.Delivery.Handlers;
@@ -18,18 +19,24 @@ internal sealed class InitializeMemberApplicationNotificationHandler : INotifica
private readonly DeliveryApiSettings _deliveryApiSettings;
private readonly IServiceScopeFactory _serviceScopeFactory;
private readonly IMemberClientCredentialsManager _memberClientCredentialsManager;
private readonly IServerRoleAccessor _serverRoleAccessor;
private static readonly SemaphoreSlim _locker = new(1);
private static bool _isInitialized = false;
public InitializeMemberApplicationNotificationHandler(
IRuntimeState runtimeState,
IOptions<DeliveryApiSettings> deliveryApiSettings,
ILogger<InitializeMemberApplicationNotificationHandler> logger,
IServiceScopeFactory serviceScopeFactory,
IMemberClientCredentialsManager memberClientCredentialsManager)
IMemberClientCredentialsManager memberClientCredentialsManager,
IServerRoleAccessor serverRoleAccessor)
{
_runtimeState = runtimeState;
_logger = logger;
_serviceScopeFactory = serviceScopeFactory;
_memberClientCredentialsManager = memberClientCredentialsManager;
_serverRoleAccessor = serverRoleAccessor;
_deliveryApiSettings = deliveryApiSettings.Value;
}
@@ -40,13 +47,34 @@ internal sealed class InitializeMemberApplicationNotificationHandler : INotifica
return;
}
// we cannot inject the IMemberApplicationManager because it ultimately takes a dependency on the DbContext ... and during
// install that is not allowed (no connection string means no DbContext)
using IServiceScope scope = _serviceScopeFactory.CreateScope();
IMemberApplicationManager memberApplicationManager = scope.ServiceProvider.GetRequiredService<IMemberApplicationManager>();
if (_serverRoleAccessor.CurrentServerRole is ServerRole.Subscriber)
{
// subscriber instances should not alter the member application
return;
}
await HandleMemberApplication(memberApplicationManager, cancellationToken);
await HandleMemberClientCredentialsApplication(memberApplicationManager, cancellationToken);
try
{
await _locker.WaitAsync(cancellationToken);
if (_isInitialized)
{
return;
}
// we cannot inject the IMemberApplicationManager because it ultimately takes a dependency on the DbContext ... and during
// install that is not allowed (no connection string means no DbContext)
using IServiceScope scope = _serviceScopeFactory.CreateScope();
IMemberApplicationManager memberApplicationManager = scope.ServiceProvider.GetRequiredService<IMemberApplicationManager>();
await HandleMemberApplication(memberApplicationManager, cancellationToken);
await HandleMemberClientCredentialsApplication(memberApplicationManager, cancellationToken);
_isInitialized = true;
}
finally
{
_locker.Release();
}
}
private async Task HandleMemberApplication(IMemberApplicationManager memberApplicationManager, CancellationToken cancellationToken)
@@ -91,7 +119,7 @@ internal sealed class InitializeMemberApplicationNotificationHandler : INotifica
}
}
private bool ValidateRedirectUrls(Uri[] redirectUrls)
private bool ValidateRedirectUrls(IEnumerable<Uri> redirectUrls)
{
if (redirectUrls.Any() is false)
{
@@ -1,8 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Querying;
@@ -14,30 +11,6 @@ public abstract class QueryOptionBase
private readonly IApiDocumentUrlService _apiDocumentUrlService;
private readonly IVariationContextAccessor _variationContextAccessor;
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public QueryOptionBase(
IPublishedContentCache publishedContentCache,
IRequestRoutingService requestRoutingService)
: this(
requestRoutingService,
StaticServiceProvider.Instance.GetRequiredService<IRequestPreviewService>(),
StaticServiceProvider.Instance.GetRequiredService<IApiDocumentUrlService>(),
StaticServiceProvider.Instance.GetRequiredService<IVariationContextAccessor>())
{
}
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public QueryOptionBase(
IPublishedContentCache publishedContentCache,
IRequestRoutingService requestRoutingService,
IRequestPreviewService requestPreviewService,
IRequestCultureService requestCultureService,
IApiDocumentUrlService apiDocumentUrlService,
IVariationContextAccessor variationContextAccessor)
: this(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor)
{
}
public QueryOptionBase(
IRequestRoutingService requestRoutingService,
IRequestPreviewService requestPreviewService,
@@ -1,9 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Delivery.Indexing.Selectors;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Cms.Core.Services.Navigation;
namespace Umbraco.Cms.Api.Delivery.Querying.Selectors;
@@ -13,46 +10,6 @@ public sealed class AncestorsSelector : QueryOptionBase, ISelectorHandler
private readonly IDocumentNavigationQueryService _navigationQueryService;
private const string AncestorsSpecifier = "ancestors:";
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public AncestorsSelector(
IPublishedContentCache publishedContentCache,
IRequestRoutingService requestRoutingService,
IDocumentNavigationQueryService navigationQueryService,
IRequestPreviewService requestPreviewService)
: this(
requestRoutingService,
requestPreviewService,
StaticServiceProvider.Instance.GetRequiredService<IApiDocumentUrlService>(),
StaticServiceProvider.Instance.GetRequiredService<IVariationContextAccessor>(),
navigationQueryService)
{
}
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public AncestorsSelector(
IPublishedContentCache publishedContentCache,
IRequestRoutingService requestRoutingService,
IDocumentNavigationQueryService navigationQueryService)
: this(
requestRoutingService,
StaticServiceProvider.Instance.GetRequiredService<IRequestPreviewService>(),
StaticServiceProvider.Instance.GetRequiredService<IApiDocumentUrlService>(),
StaticServiceProvider.Instance.GetRequiredService<IVariationContextAccessor>(),
navigationQueryService)
{
}
[Obsolete("Use the constructor that takes all parameters. Scheduled for removal in V17.")]
public AncestorsSelector(IPublishedContentCache publishedContentCache, IRequestRoutingService requestRoutingService)
: this(
requestRoutingService,
StaticServiceProvider.Instance.GetRequiredService<IRequestPreviewService>(),
StaticServiceProvider.Instance.GetRequiredService<IApiDocumentUrlService>(),
StaticServiceProvider.Instance.GetRequiredService<IVariationContextAccessor>(),
StaticServiceProvider.Instance.GetRequiredService<IDocumentNavigationQueryService>())
{
}
public AncestorsSelector(
IRequestRoutingService requestRoutingService,
IRequestPreviewService requestPreviewService,
@@ -62,18 +19,6 @@ public sealed class AncestorsSelector : QueryOptionBase, ISelectorHandler
: base(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor)
=> _navigationQueryService = navigationQueryService;
[Obsolete("Use the constructor that takes all parameters. Scheduled for removal in V17.")]
public AncestorsSelector(
IRequestRoutingService requestRoutingService,
IPublishedContentCache publishedContentCache,
IRequestPreviewService requestPreviewService,
IApiDocumentUrlService apiDocumentUrlService,
IVariationContextAccessor variationContextAccessor,
IDocumentNavigationQueryService navigationQueryService)
: this(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor, navigationQueryService)
{
}
/// <inheritdoc />
public bool CanHandle(string query)
=> query.StartsWith(AncestorsSpecifier, StringComparison.OrdinalIgnoreCase);

Some files were not shown because too many files have changed in this diff Show More