Commit Graph

43106 Commits

Author SHA1 Message Date
Bjarke Berg
c06e89af64 Content Delivery API (#14051)
* 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>
2023-04-19 11:21:31 +02:00
Bjarke Berg
2af425fd90 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	version.json
2023-04-14 10:12:51 +02:00
Bjarke Berg
4521c881db Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	version.json
2023-04-14 10:04:35 +02:00
Nikolaj Geisle
eb31889be9 V12: Cherry pick unscoped migrations (#14086)
* 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>
2023-04-13 12:23:44 +02:00
Andy Butland
fe11f3c8e1 Bumped version to 12.0.0-rc (#14087)
* Bumped version to 12.0.0-alpha1

* Update version.json

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-04-13 11:01:28 +02:00
Nikolaj
5d3546e1b5 Bump version 2023-04-13 08:53:47 +02:00
Nikolaj
c636c7a7d2 Bump version 2023-04-13 08:52:50 +02:00
Nikolaj
810df46823 Merge branch 'release/11.3' into v11/dev 2023-04-13 08:49:32 +02:00
Nikolaj
5828080589 Merge branch 'release/10.5' into v10/dev 2023-04-13 08:47:41 +02:00
Nikolaj
a1d6f65cff Bump to non-rc 2023-04-12 09:36:49 +02:00
Nikolaj
8e32ac3e20 Bump to non-rc 2023-04-12 09:35:23 +02:00
Elitsa Marinovska
22328598db Adding dedicated Forbidden and Unauthorized handling for members (#14036) 2023-04-11 15:41:55 +02:00
Ronald Barendse
9223b5737e Update target to execute during packaging (#13521)
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-04-05 12:59:01 +02:00
Ronald Barendse
4cb46f06ae Update default UmbracoVersion template value using MSBuild target (#13481)
* Update default UmbracoVersion template value using MSBuild target

* Fix target order when using pack --no-build

* Use JsonPathUpdateValue MSBuild task to update default UmbracoVersion template value

* Update UmbracoVersion in Umbraco Package RCL
2023-04-05 11:16:43 +02:00
Ronald Barendse
92d92feb15 Add new 'Umbraco Package RCL' project template (#13776)
* Add new 'Umbraco Package RCL' project template

* Add --no-restore, hide --framework and remove conflicting -v parameter in Umbraco Package project template

* Hide --framework and --PackageTestSiteName, remove conflicting -v parameter in Umbraco project template and persist selected parameters

* Revert changes to Framework and UmbracoVersion parameter names
2023-04-05 09:32:48 +02:00
Bjarke Berg
be2887683b Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-04-04 09:18:03 +02:00
Bjarke Berg
ce47281c04 Determine correct if we can create a database with current connectionstring (#14030)
* 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>
2023-03-31 11:44:56 +02:00
Bjarke Berg
b8899459dc Determine correct if we can create a database with current connectionstring (#14030)
* 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>
2023-03-31 11:37:41 +02:00
Bjarke Berg
c662f5a36e Determine correct if we can create a database with current connectionstring (#14030)
* 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>
2023-03-30 10:19:35 +02:00
Bjarke Berg
8e7798b8f0 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-03-29 10:58:40 +02:00
Bjarke Berg
61a33c734c Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Core/Routing/UmbracoRequestPaths.cs
2023-03-29 10:30:16 +02:00
BatJan
83ad463e81 Change style to class
(cherry picked from commit 69010baceb)
2023-03-28 12:56:22 +02:00
Matthew Care
06f527e87b Fix pressing enter in a property editor name field (#13329)
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
(cherry picked from commit 7349ae1c5c)
2023-03-28 12:55:50 +02:00
Sebastiaan Janssen
6bc999bca4 Unit tests need updating now that the WriterId is properly being set after merging #12843
(cherry picked from commit a88d0c0ec9)
2023-03-28 10:28:33 +02:00
patrickdemooij9
5f8ba2e864 Memory improvements to ShortStringHelper (#13089)
(cherry picked from commit b17d9004fd)
2023-03-28 10:19:43 +02:00
patrickdemooij9
eee6207f19 Performance improvement for ReplaceFirst function (#13018)
* Some benchmarks for replacefirst & span method

(cherry picked from commit e550a4ce3a)
2023-03-28 10:14:42 +02:00
LandLogic IT
888173ac5b Add it key translation
(cherry picked from commit 99268f6211)
2023-03-28 10:11:57 +02:00
Dennis
7208f591c7 Fix equality check on property group (#13133)
* Fix equality check on property group

Also fix circular reference on PropertyTypeCollection

(cherry picked from commit f64f634979)
2023-03-28 10:08:48 +02:00
gadgetfbi
391bfb73e8 Fixes: listitem: <li> elements must be contained in a <ul> or <ol> (#13120)
Co-authored-by: Rob Nicolson <rob.nicolson@brightwire.net>
(cherry picked from commit 1f6307944b)
2023-03-28 09:38:51 +02:00
Matthew Care
9f2e79e9db Prevent overflowing property values (#12943)
(cherry picked from commit b34a93ed59)
2023-03-27 12:49:20 +02:00
Ealse Bouma
40285b76b9 Fix: Infinite Editor creates each save action a new version when content is invalid (#12713)
(cherry picked from commit 93a85a46f3)
2023-03-27 11:30:53 +02:00
Patrick de Mooij
aab6539d1f 12748: Make sure to set writerId
(cherry picked from commit 3ee9bfbc93)
2023-03-27 09:57:51 +02:00
Bjarke Berg
f8e5205aa7 Reverse the EnablePackageValidation in tests, so it is explicity opt-in. Otherwise the generated csproj file in Benchmarks will always fail (#14004) 2023-03-24 08:40:51 +01:00
Nikolaj
1ece9627f7 Convert path to absolute 2023-03-23 09:22:51 +01:00
Nikolaj
5598cc2491 Convert path to absolute 2023-03-23 09:21:07 +01:00
Andy Butland
b665099657 Updated reference for JSON schema to latest release of Forms 10. (#13996) 2023-03-23 09:14:23 +01:00
Andy Butland
010f722fa0 Updated reference for JSON schema to latest release of Forms 10. (#13996) 2023-03-23 08:59:28 +01:00
Nikolaj
21036a4c50 Merge remote-tracking branch 'origin/release/11.2.1' into v11/dev
# Conflicts:
#	build/azure-pipelines.yml
#	version.json
2023-03-21 08:54:08 +01:00
Nuklon
4f8b8b3415 Fixes #13732 - IsBackOfficeRequest is extremely inefficient (#13743)
* Update UmbracoRequestPaths.cs

* Update UmbracoRequestPaths.cs

* remove redundant check

---------

Co-authored-by: Michael <michael@crossingpaths.be>
(cherry picked from commit de27eb697e)

# Conflicts:
#	src/Umbraco.Core/Routing/UmbracoRequestPaths.cs
2023-03-21 08:24:13 +01:00
jesperweber
b1fd9e6f16 Added sort audit to nodes actually being sorted
(cherry picked from commit 36069aa813)
2023-03-20 16:23:12 +01:00
jesperweber
36069aa813 Added sort audit to nodes actually being sorted 2023-03-20 16:21:38 +01:00
Sebastiaan Janssen
d1fae0e350 Merge branch 'v11/dev' into contrib
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js
2023-03-20 16:01:08 +01:00
Joel Mandell
d31bd8755e Fixing issue #13865 (i.e. Rich text link picker not resolving correct variant when using .ValueFor()). (#13889)
(cherry picked from commit 451d1cec6a)
2023-03-20 15:59:08 +01:00
Joel Mandell
451d1cec6a Fixing issue #13865 (i.e. Rich text link picker not resolving correct variant when using .ValueFor()). (#13889) 2023-03-20 15:52:36 +01:00
Busra Sengul
5d3e3a4c71 Updated core collabs team member on contributing page 2023-03-20 11:14:52 +00:00
Bjarke Berg
298890436a Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-03-20 08:41:29 +01:00
Bjarke Berg
5e21ddccc4 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js
2023-03-20 08:38:28 +01:00
Rheannon
9a5e21702d small wording change for Element Type description (#13971)
* small wording change for Element Type description

* updated language files IRT Element Types

* replacing a duplicate Block List with Block Grid

---------

Co-authored-by: Rheannon <ral@umbraco.dk>
2023-03-18 00:03:49 +01:00
Donald Nairn
5915c9b29f Remove limitation on nested content to 1,000 items where max items unset. 2023-03-17 09:19:29 -04:00
Dhanesh Kumar Mj
6b208362cc [fix] Infinite Editor from member property with a media picker (#13817)
(cherry picked from commit 71e7836001)

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js
2023-03-17 12:24:39 +01:00