Commit Graph

1802 Commits

Author SHA1 Message Date
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
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
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
Mads Rasmussen
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
Andreas Zerbst
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 Jacobsen
c61fc7419c Cherry picked #19540 to V16 (and fixed changed signatures) (#19592) 2025-06-26 09:16:49 +02:00
Laura Neto
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
Nhu Dinh
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
Nhu Dinh
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 Butland
da9c6e24ce Removed unnecessary compatibility suppressions file from integration tests. 2025-06-12 13:50:29 +02:00
Jacob Overgaard
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
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
Andreas Zerbst
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 Zerbst
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
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
Nhu Dinh
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
Andy Butland
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
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
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
Niels Lyngsø
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
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
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
Andreas Zerbst
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
Niels Lyngsø
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
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
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
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
Andy Butland
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
Andy Butland
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
Jacob Overgaard
135f0f63de Merge branch 'main' into v17/dev 2025-05-16 16:58:11 +02:00
Nhu Dinh
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
Andy Butland
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
Andreas Zerbst
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
Andreas Zerbst
b13eb8aaf8 V15 Added second level block acceptance tests (#19264) 2025-05-12 09:23:55 +00:00
Mads Rasmussen
3493d9fbc4 align label with other create options (#19210) 2025-05-09 10:41:29 +00:00
Niels Lyngsø
0e73c5472a implement label for entity actions bundle (#19242) 2025-05-09 10:00:45 +00:00
Nhu Dinh
5d9d94a0e8 V16 QA Added acceptance tests for publishing with descendants (#19262) 2025-05-09 07:27:02 +00:00
Andreas Zerbst
275478066e V15 QA complex block grid test (#18347) 2025-05-08 11:12:37 +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 Kelleher
2c58c701ed V16: Localization refinements (#19258) 2025-05-07 14:25:25 +00:00