Commit Graph

796 Commits

Author SHA1 Message Date
Nicklas Kramer
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
Nicklas Kramer
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
Nicklas Kramer
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
Andy Butland
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
cd00dfaa34 Merge branch 'main' into v17/dev 2025-08-20 11:57:01 +01:00
Andy Butland
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
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
Dirk Seefeld
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
Andy Butland
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 Butland
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
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
Andy Butland
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
Andy Butland
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
Andy Butland
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
Andy Butland
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
Andy Butland
73d2f207d0 Merge branch 'main' into v17/dev 2025-08-04 12:41:50 +02:00
Sven Geusens
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
Ivo van der Bruggen
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
Laura Neto
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
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
Laura Neto
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
Laura Neto
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
Andy Butland
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
Kevin Jump
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
Henrik
7f88013689 Make internal & private classes sealed where possible, to avoid code for virtual dispatch (#19719) 2025-07-21 08:32:54 +02:00
Laura Neto
2ce647738f Merge branch 'main' into v17/dev
# Conflicts:
#	version.json
2025-07-14 15:41:34 +02:00
Andy Butland
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
Andy Butland
0b1bd16b9d Merge branch 'main' into v17/dev 2025-07-08 09:26:54 +02:00
Mole
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 Butland
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
Laura Neto
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
Laura Neto
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
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
Peter
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
Andy Butland
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
Kenn Jacobsen
c61fc7419c Cherry picked #19540 to V16 (and fixed changed signatures) (#19592) 2025-06-26 09:16:49 +02:00
Andy Butland
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
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
Laura Neto
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
Jacob Overgaard
6cfba9b406 Merge branch 'release/16.0' 2025-06-04 10:01:45 +02:00
Andy Butland
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
Andy Butland
50f60249ba Merge commit from fork 2025-06-03 05:21:11 +02:00
Sven Geusens
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
Andy Butland
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
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
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
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
Karl-Johan Sjögren
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
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
Jacob Overgaard
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