* Update to ImageSharp 2.1.0 and ImageSharp.Web 2.0.0-alpha.0.23
* Rename CachedNameLength to CacheHashLength and add CacheFolderDepth setting
* Replace PhysicalFileSystemProvider with WebRootImageProvider
* Support EXIF-orientation in image dimention extractor
* Remove virtual methods on FileProviderImageProvider
* Simplify FileInfoImageResolver
* Update to SixLabors.ImageSharp.Web 2.0.0-alpha.0.25 and remove custom providers
* Make CropWebProcessor EXIF orientation-aware
* Improve width/height sanitization
* Also use 'v' as cache buster value
* Add WebP to supported image file types
* Update to SixLabors.ImageSharp.Web 2.0.0-alpha.0.27 and fix test
* Fix rounding error and add test cases
* Update to newest and stable releases
* Move ImageSharpImageUrlGenerator to Umbraco.Web.Common
* Use IConfigureOptions to configure ImageSharp options
* Implement IEquatable on ImageUrlGenerationOptions classes
* Fix empty/null values in image URL generation and corresponding tests
* Use IsSupportedImageFormat extension method
* Remove unneeded reflection
* Add HMACSecretKey setting and add token when generating image URLs
* Ensure backoffice image URLs are generated by the server (and include a correct HMAC token)
* Abstract HMAC generation to IImageUrlTokenGenerator
* Change cache buster value to 'v' and use hexadecimal timestamp
* Update comments
* Fix backoffice thumbnail URL generation
* Update grid media thumbnail URL generation
* Remove breaking changes
* Strip unknown commands from image URL token
* Remove HMAC whitelisting possibility (not supported by ImageSharp)
* Update to SixLabors.ImageSharp 2.1.3
* Add comment to internal constructor
* Fix to support absolute image URLs
* Update to SixLabors.ImageSharp.Web 2.0.3-alpha.0.3
* Remove IImageUrlTokenGenerator and use ImageSharpRequestAuthorizationUtilities
* Move NuGet feed to config file
* Update to ImageSharp v3
* check for completed transitions before accessing target state
* upgrader should be happy with initial and final state being the same value - only an empty final state should throw
* refactor
* reduce complexity
* Don't check for successfull
* Add test that runs migration twice
---------
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* Add the core parts of the headless PoC
* Add Content API project (WIP - loads of TODOs and dupes that need to be fixed!)
* Rename the content API project and namespaces
* Fixed bad merge
* Rename everything "Headless" to "ContentApi" or "Api"
* Refactor Content + Media: Key => Id, Name not nullable
* Make Content API property return value types independent of datatype configuration
* Clean up refactorings
* First stab at an expansion strategy using content picker as example implementation
* Use named JSON options for content API serialization
* Proper inclusion and registration of the content API
* Introduce API media builder
* Make MNTP return API content/media depending on configuration (instead of links) and support output expansion
* Content API: Get by controllers (#13740)
* Adding ContentApiControllerBase
* Adding get by id and url controllers
* Change route of get all test controller
* Rename to ContentApiController
* Refactoring
* Removing test controller
* Content API: Add start-node header value to deal with url collisions (#13746)
* Use start-node header value to deal with url collisions
* Cleanup
* Rename "url" param to "path"
* Adding a start node service to get the start-node header value
* Trim '/' from both beginning and end
* Content API: Support Accept-Language header (#13831)
* Move the content API JSON type resolver to an appropriate namespace
* Add localization based on Accept-Language header
* Content API: Output expansion (#13848)
* Implement request based output expansion strategy + expansion output cache at property level
* Slighty leaner implementation for default output expansion strategy
* Clarify the code a bit
* Fix bad merge
* Encapsulate content API dependencies in the DI
* Support multi-site and multi-culture routing + a little rename/refactor (#13882)
* Support multi-site and multi-culture routing + a little rename/refactor
* Make the by route controller handle root nodes
* Rename Url to Path in API content output
* Add a few comments for magic route creation
* Rename services from "Default" to "Noop"
* Ensure that Umbraco can boot without adding "AddContentApi()" to ConfigureServices
* Moved incorrectly placed media builder
* Fix API routes (#13915)
* Fix multi URL picker value converter trying to access disposed objects in edge cases
* Delivery API: Content routing and structure (#13984)
* Introduce content route instead of content path, rename and rework start item (previously start node) handling
* Strip out start node path in generated route path
* Make the start-item header take precedence over the request domain
* Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)
* Include umbraco properties (width, height, ...) in the Media Properties collection (#14023)
* Move umbraco properties (width, height, ...) to the Properties collection of the API Media model
* Don't output the umbracoFile property of media items
* Add content type deny list (#14025)
* Create a deny list of content types and utilize it for output generation
* Add unit tests
* Dedicated property cache level for Content API (#14027)
* Support redirect tracking (#14033)
* Create a deny list of content types and utilize it for output generation
* Add unit tests
* Handle redirect tracking in the content API
* Include start item routing info for redirects
* Add cultures and their routes to the API output (#14038)
* Create a deny list of content types and utilize it for output generation
* Add unit tests
* Handle redirect tracking in the content API
* Include start item routing info for redirects
* Add culture routes to root output (for HREFLANG support)
* Rename redirect service method to better match its purpose
* Review changes
* Delivery API: Query controller (#14041)
* Initial commit
* Custom ContentAPIFieldDefinitionCollection
* Make index IUmbracoContentIndex
* Add querying for children by parent id (key)
* Add missing interface
* Adding querying endpoint
* Test code
* Compose unpublishedValueSet, so that you get the correct data in the ContentAPI index
* Renaming
* Fix ancestorKeys index values
* Adding IApiQueryExtensionService to be able to query the ContentAPI index in a generic way
* Fix IApiQueryService and clean up QueryContentApiController using it
* Support querying for path
* Fix content API indexing
* Fix default sorting
* Implement concrete QueryOption implementations
* Introduce new ExecuteQuery that uses the Core OptionHandlers
* Implement ExecuteQuery
* Change ExecuteQuery signature and implementation
* Implement demo sorting and fetching
* Add query option handlers and collection builder for them
* Cleanup
* Revert "Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)"
This reverts commit 78e1f748e55383baecd123d06457111e18f13365.
* Revert "Delivery API: Content routing and structure (#13984)"
This reverts commit a0292ae5350362dd6c1c5bc9763deda928c78a75.
* Revert "Fix multi URL picker value converter trying to access disposed objects in edge cases"
This reverts commit 6b7c37a5bf7871bee93a2b2640bbc6ef591f14db.
* Revert "Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)"
This reverts commit 78e1f748e55383baecd123d06457111e18f13365.
* Revert "Delivery API: Content routing and structure (#13984)"
This reverts commit a0292ae5350362dd6c1c5bc9763deda928c78a75.
* Revert "Fix multi URL picker value converter trying to access disposed objects in edge cases"
This reverts commit 6b7c37a5bf7871bee93a2b2640bbc6ef591f14db.
* Fix multi URL picker value converter trying to access disposed objects in edge cases
* Delivery API: Content routing and structure (#13984)
* Introduce content route instead of content path, rename and rework start item (previously start node) handling
* Strip out start node path in generated route path
* Make the start-item header take precedence over the request domain
* Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)
* Test commit
* Refactored interfaces for the query handlers and for the selectors (that will handle the value of the fetch query option)
* Implemented a base class for the query options
* Refactored the names of the selectors and made use of the base class
* Refactored the ApiQueryService
* Refactored the QueryContentApiController.cs
* Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)
* Fixing merge gone wrong
* Fix multi URL picker value converter trying to access disposed objects in edge cases
* Delivery API: Content routing and structure (#13984)
* Introduce content route instead of content path, rename and rework start item (previously start node) handling
* Strip out start node path in generated route path
* Make the start-item header take precedence over the request domain
* Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)
* Make fetching work with the new setup
* Moving files to dedicated folders
* Removing ? for array
* Rename selector query method
* Implement FilterHandler and some filters
* Implement SortHandler and sort some sorts
* Refactoring
* Adding more fields to index due to querying
* Appending filtering and sorting queries
* Implementing a new ISelectorHandler without Examine types
* Re-implementing the collection to have a dedicated one for the selectors
* Implementing a new IFilterHandler without Examine types & refactoring the filters implementing it
* Adding a new collection dedicated to filters
* Renaming the old collection
* Implementing a new ISortHandler without Examine types & refactoring the sorts implementing it
* Adding a new collection for the sorts & adding all collections to UmbracoBuilder.Collections
* Refactoring the service to use the new collections and types
* Refactoring the fields in ContentApiFieldDefinitionCollection
* Remove nullability in Handlers
* Don't return null for selector
* Add TODO for having the filters support negation
* Changing the SortType to FieldType with our custom types on the SortOption
* Fix AncestorsSelector
* Fix ApiQueryService
* Documentation
* Fix Swagger docs
* Refactor the QueryContentApiController
* Adding handling for the IApiContentResponse in the JsonTypeResolver
* Refactor the service to use a safe fallback value in Examine queries
* Adding Noop for the IApiQueryService
* Cleanup
* Remove comment
* Fix name field for indexing
* Don't inherit QueryOptionBase in filters
* Fix casing for API index constant + swap FIXME with TODO
* Add TODO for handling missing fetch with start-item header
* Rename query handler parameters to not leak source (i.e. query string)
---------
Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Elitsa <>
Co-authored-by: Zeegaan <nge@umbraco.dk>
* Delivery API: Adding pagination to query endpoint (#14083)
* Adding pagination to query endpoint
* Optimize the paging using Examine directly
* Fix comment
* Remove skip/take code duplication
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Add missing CompatibilitySuppressions.xml
* Make Delivery API packable
* Make Api.Common packable
* Renamed extension method and namespace so it is discoverable
* Untangle ApiVersion configuration into api.common, so delivery api do not require the management api to boot.
* configure options in management api
* RTE output as JSON for Content API (#14067)
* Conditionally serve RTE output as JSON instead of HTML
* Fixed merge
* Rename to Delivery API (#14119)
* Rename ContentApi to DeliveryApi
* Rename delivery API index implementation
* Update comments from "Content API" to "Delivery API"
* Rename project from Content to Delivery
* Add dedicated controller base for content delivery API
* Rename delivery API content index to include "content" specifically
* Fix compat suppressions
---------
Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
* Ensure case insensitivity in tag name queries.
Use LIKE instead of = to ignore collation rules.
* Add integration test for creating tag relations with mixed casing.
(cherry picked from commit 37d737f9bc)
* New Backoffice: Refactor migrations to allow for unscoped migrations (#13654)
* Remove PostMigrations
These should be replaced with Notification usage
* Remove outer scope from Upgrader
* Remove unececary null check
* Add marker base class for migrations
* Enable scopeless migrations
* Remove unnecessary state check
The final state of the migration is no longer necessarily the final state of the plan.
* Extend ExecutedMigrationPlan
* Ensure that MigrationPlanExecutor.Execute always returns a result.
* Always save final state, regardless of errors
* Remove obsolete Execute
* Add Umbraco specific migration notification
* Publish notification after umbraco migration
* Throw the exception that failed a migration after publishing notification
* Handle notification publishing in DatabaseBuilder
* Fix tests
* Remember to complete scope
* Clean up MigrationPlanExecutor
* Run each package migration in a separate scope
* Add PartialMigrationsTests
* Add unhappy path test
* Fix bug shown by test
* Move PartialMigrationsTests into the correct folder
* Comment out refresh cache in data type migration
Need to add this back again as a notification handler or something.
* Start working on a notification test
* Allow migrations to request a cache rebuild
* Set RebuildCache from MigrateDataTypeConfigurations
* Clean MigrationPlanExecutor
* Add comment explaining the need to partial migration success
* Fix tests
* Allow overriding DefinePlan of UmbracoPlan
This is needed to test the DatabaseBuilder
* Fix notification test
* Don't throw exception to be immediately re-caught
* Assert that scopes notification are always published
* Ensure that scopes are created when requested
* Make test classes internal.
It doesn't really matter, but this way it doesn't show up in intellisense
* Add notification handler for clearing cookies
* Add CompatibilitySuppressions
* Rename Execute to ExecutePlan
We have to do this to be able to obsolete :(
* Update CompatibilitySuppressions
* Update src/Umbraco.Infrastructure/Migrations/MigrationPlanExecutor.cs
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* generate compatability suppresion file
---------
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
* Ensure case insensitivity in tag name queries.
Use LIKE instead of = to ignore collation rules.
* Add integration test for creating tag relations with mixed casing.
* Fix CanForceCreateDatabase method and add some unit tests
* Fixed an old copy/paste error
* A little nitpicking over wording and formatting
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Fix CanForceCreateDatabase method and add some unit tests
* Fixed an old copy/paste error
* A little nitpicking over wording and formatting
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Improve ImageSharpImageUrlGenerationTests
Removed a few "stale" tests that look to have been from code of old.
Add tests for all ImageUrlGenerationOptions.
Add some edge case tests to make the tests more sensitive.
Reduce scope for certain tests so the test is more focused on one thing rather than multiple
* Amending a mis-spelt variable.
---------
Co-authored-by: georgebid <91198628+georgebid@users.noreply.github.com>
* Add IsNullOrWhiteSpace Extension method
IsNullOrWhiteSpace extension method for IHtmlEncodedString
* Move extension method
* Add a UnitTest for the IsNullOrWhiteSpace extension method
* Update unit test
(cherry picked from commit 9771e77243)
* Fixes#13715 issue with simple logviewer searches
* Update Logviewer test - to ensure MessageLike and simple equivalent returns same result count to help catch
(cherry picked from commit d38fabea4a)
* Add IsNullOrWhiteSpace Extension method
IsNullOrWhiteSpace extension method for IHtmlEncodedString
* Move extension method
* Add a UnitTest for the IsNullOrWhiteSpace extension method
* Update unit test
* Moved deleteAllMedia to afterEach, the reason for that is that we delete all the media in each test.
* Added additional timeout and a WaitForTimeout(), the reason for the WaitForTimeout is because it can take a second for the modelsbuilder to update the view.
* Added more timeout for the isSuccessNotificationVisible. Updated the helper ensureNameNotExists so they actually delete the partialViews
* Updated the locators for deleting the UK language. Added an expect for checking if the UK language is visible in the UI
* Updated the position where the dragAndDrop drops to
* Changed the trace so we only save the trace on the first retry, it saves a lot of time when the tests are running, since we dont need to save the trace and then delete the trace after each successful test
* Updated locators. Added an expect so the test waits until the / is visible in the URL before going further into the test
* Changed back to retain on failure on the pipelines, the reason for that is if a test only fails once, then we wont see what the actual error was in the test when looking on the pipeline.
* Added an expect so we wait until the page is loaded for packages
* Updated the dragAndDrop so they hopefully work.
* Changed values for dragAndDrop
* Updated the dragAndDrop values
* Bumped playwright version
* Added tests for testing if the rendering is working as intended for the block grid editor
* Added Layout stylesheets for testing
* We are now using the page.toHaveScreenshot() which checks if the test looks the same as the pngs.
* Updated the toHaveScreenShot so they now take in a shorter name for the pngs
* Updated the page.goto so they new go the to baseUrl based on the umbracoConfig
* Added additional pngs for the Linux tests
* Updated the pngs for linux yet again