Commit Graph

801 Commits

Author SHA1 Message Date
dc44bebfcc refactor(core): delegate GetByLevel to QueryOperationService
ContentService.GetByLevel now delegates to QueryOperationService,
continuing Phase 2 query operation extraction.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-22 23:59:40 +00:00
fb20c480e3 refactor(core): delegate Count methods to QueryOperationService
ContentService now delegates Count, CountPublished, CountChildren,
CountDescendants to the new QueryOperationService.

This is Task 5 of Phase 2 - the first delegation task that converts
ContentService from direct repository calls to delegating to the
specialized query operation service.

All tests pass. Baseline tests confirm facade and direct service
return identical results. Full ContentService test suite passes
(excluding pre-existing benchmark regressions).

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-22 23:46:59 +00:00
cf8394b6fd feat(core): add ContentQueryOperationService implementation
Implements IContentQueryOperationService with Count, GetByLevel, and
GetPagedOfType operations. Follows Phase 1 patterns.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-22 23:03:36 +00:00
1d082e1ed6 test: add benchmark regression enforcement for Phase 1
Adds AssertNoRegression method to ContentServiceBenchmarkBase:
- Loads baseline from baseline-phase0.json
- Fails test if benchmark exceeds 20% of baseline
- Logs regression check status for visibility
- Supports environment variable overrides (BENCHMARK_REGRESSION_THRESHOLD, BENCHMARK_REQUIRE_BASELINE)

Updates 10 Phase 1 CRUD benchmarks to use regression assertions:
- Save_SingleItem, Save_BatchOf100, Save_BatchOf1000
- GetById_Single, GetByIds_BatchOf100
- Delete_SingleItem, Delete_WithDescendants
- GetAncestors_DeepHierarchy, GetPagedChildren_100Items, GetPagedDescendants_DeepTree

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-21 03:43:28 +00:00
9962df50ee feat(core): register IContentCrudService in DI container
Adds IContentCrudService registration to UmbracoBuilder alongside
IContentService. Both services are now resolvable from DI.

Includes integration test verifying successful resolution.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-21 03:31:23 +00:00
0ef17bb1fc test: add ContentServiceRefactoringBenchmarks for Phase 0 baseline
Adds 33 performance benchmarks organized by operation type:
- 7 CRUD operation benchmarks
- 6 query operation benchmarks
- 7 publish operation benchmarks
- 8 move operation benchmarks
- 4 version operation benchmarks
- 1 baseline comparison meta-benchmark

Benchmarks output JSON for automated comparison between phases.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-20 19:36:25 +00:00
3239a4534e test: add transaction boundary tests for ContentService refactoring
Adds 3 integration tests for transaction boundaries:
- Test 13: Nested operations in uncompleted scope roll back together
- Test 14: Completed scope commits all operations together
- Test 15: MoveToRecycleBin rolls back completely when scope not completed

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-20 18:51:34 +00:00
7e989c0f8c test: add permission tests for ContentService refactoring
Adds 4 integration tests for permission operations:
- Test 9: SetPermission assigns permission and GetPermissions retrieves it
- Test 10: Multiple SetPermission calls accumulate permissions
- Test 11: SetPermissions assigns complete permission set
- Test 12: SetPermission assigns to multiple user groups at once

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-20 18:43:51 +00:00
cf74f7850e test: add DeleteOfType tests for ContentService refactoring
Adds 3 integration tests for DeleteOfType operations:
- Test 6: DeleteOfType handles descendants correctly (moves different types to bin)
- Test 7: DeleteOfType only deletes specified type, preserves others
- Test 8: DeleteOfTypes deletes multiple content types at once

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-20 18:33:03 +00:00
86b0d3d803 test: add sort operation tests for ContentService refactoring
Adds 3 integration tests for Sort operations:
- Test 3: Sort(IEnumerable<IContent>) reorders children correctly
- Test 4: Sort(IEnumerable<int>) reorders children by ID correctly
- Test 5: Sort fires Sorting and Sorted notifications in sequence

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-20 18:23:05 +00:00
0c22afa3cf test: add notification ordering tests for MoveToRecycleBin
Adds 2 integration tests validating notification order:
- Test 1: Published content fires MovingToRecycleBin -> MovedToRecycleBin
- Test 2: Unpublished content fires only move notifications, no publish notifications

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-20 18:15:52 +00:00
0f408dd299 test: add ContentServiceRefactoringTests skeleton for Phase 0
Adds the test file skeleton with notification handler infrastructure
for tracking notification ordering during ContentService refactoring.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-20 17:21:18 +00:00
336adef2c2 test: add ContentServiceBenchmarkBase infrastructure class
Adds base class for ContentService performance benchmarks with:
- RecordBenchmark() for timing capture
- MeasureAndRecord() with warmup support for non-destructive ops
- MeasureAndRecord<T>() with warmup for read-only ops returning values
- JSON output wrapped in [BENCHMARK_JSON] markers for extraction
- skipWarmup parameter for destructive operations

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-20 17:18:33 +00:00
Andy Butland
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
Andy Butland
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
Andy Butland
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 Butland
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 Butland
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
Jacob Overgaard
8f2532a28a Merge remote-tracking branch 'origin/release/17.0' 2025-11-24 16:32:38 +01:00
Laura Neto
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
Ronald Barendse
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
Andy Butland
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
Lars-Erik Aabech
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
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 Butland
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
Nicklas Kramer
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
Andy Butland
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
NguyenThuyLan
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
Andy Butland
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
Andy Butland
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
Kenn Jacobsen
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
Kenn Jacobsen
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
Niels Lyngsø
837a56652f Merge branch 'release/17.0' into v17/dev
# Conflicts:
#	version.json
2025-10-29 20:04:40 +01:00
Andy Butland
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
Sebastiaan Janssen
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
c422a9ea6a Merge branch 'main' into v17/dev 2025-10-22 15:15:18 +02:00
Nicklas Kramer
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
Nicklas Kramer
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
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
Kenn Jacobsen
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
Mole
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 Butland
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 Butland
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 Neto
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
Kenn Jacobsen
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
de0503d90c Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyValueEditor.cs
2025-10-16 21:12:57 +02:00
Kenn Jacobsen
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
Kenn Jacobsen
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
Andy Butland
3830d75413 Obsolete GetAtRoot on DocumentCache (#20514)
Obsolete GetAtRoot on DocumentCache.
2025-10-16 08:23:20 +02:00