* 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.
* 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>
* 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>
* 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
* 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>
* 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
* 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>
* 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>
* 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>
* 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
* Prevents the removal of all user groups from a user.
* Add additional user group when removing
---------
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
* 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 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
* 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>
* 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
* 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>
* 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>
* 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>
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.
* 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.
* 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.
* 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>
* 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)
* 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
* 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.
* 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>
* 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
* 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.
* 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