Commit Graph

43162 Commits

Author SHA1 Message Date
Elitsa Marinovska
8f8eeefd90 Delivery API: Fix default sorting when querying (#14207)
* Fix default sort for the query endpoint

* Revert changes in PathSortIndexer

* If no sort query option is provided, keep the index sorting as default

* Delete path sort and path sort indexer

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-05-08 09:34:43 +02:00
Elitsa Marinovska
83230d377c Handle unhappy paths for the multiple items endpoint (#14199) 2023-05-08 06:52:02 +02:00
Bjarke Berg
0f1c2f7022 Ensure no management api for v12 (#14197)
* Remove management api

* Remove actual files
2023-05-04 13:32:41 +02:00
Jacob Overgaard
3c5de5a321 Backoffice JS dependency updates (#14179)
* updates @babel/* to 7.21.4

* update @microsoft/signalr to 7.0.5

* update @umbraco-ui/uui to 1.2.1

* update ace editor to 1.18.0

* update all build dependencies to latest version

* update jquery to 3.6.4

* update spectrum-colorpicker2 to 2.0.10

* Add icon for "styles" alias (style select)

* update tinymce to 6.4.2

Read more here: https://www.tiny.cloud/docs/tinymce/6/6.4.1-release-notes/
2023-05-03 11:10:12 +02:00
Jacob Overgaard
c2a550daf0 Fix: Form elements in thirdparty dashboard views get removed (#14152) 2023-05-03 11:09:29 +02:00
Kenn Jacobsen
fc3f342906 Add sort handlers for create and update date (#14178)
* Add sort handlers for create and update date

* Make things sealed

* Update the field names

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-04-28 11:14:50 +02:00
Kenn Jacobsen
376c0bf7ba Update the delivery API content index at un/publish (#14175)
* Update the delivery API content index at un/publish

* Make the query service use "itemId" instead of "id" when extracting GUIDs + only fetch that single field rather than all fields

* Simplify the code a little

* Making AncestorsSelectorIndexer sealed

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-04-28 09:46:28 +02:00
Elitsa Marinovska
ca5c3c240a Delivery API: Apply start-item in the base querying request (#14168)
* Taking into account the start item when no "fetch" selector is present

* Fix spacing

* Get rid of extra DefaultSelect method

* Remove comment for default selector

* Apply default sorting directly in HandleSorting()

* Get rid of nesting conditional logic
2023-04-27 19:32:05 +02:00
Kenn Jacobsen
d72eb23102 Handle unroutable published content (#14166)
Co-authored-by: Elitsa <elm@umbraco.dk>
2023-04-27 13:32:15 +02:00
Kenn Jacobsen
d2a8068ca6 Filter out disallowed content types from the delivery API content index (#14156)
* Filter out disallowed content types from the delivery api content index

* Added .

* Allow children of disallowed content types in the index

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-04-27 10:30:30 +02:00
Kenn Jacobsen
a0d325cfe0 Make delivery API indexers and handlers public (sealed) so they can be overridden by custom ones (#14160)
* Make delivery API indexers and handlers public (sealed) so they can be overridden by custom ones

* Making the rest of the indexers public (sealed)

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-04-26 15:13:26 +02:00
Bjarke Berg
4fcdcb4002 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-04-25 15:43:22 +02:00
Bjarke Berg
a45f158d9e Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2023-04-25 15:42:21 +02:00
Elitsa Marinovska
c33ec7ca55 Change state to publishing before handling ContentSavingNotification (#14114) 2023-04-25 15:10:13 +02:00
Nikolaj Geisle
7e49493c8c V12: Reset cache on migrating (#14133)
* Reset cache when migrating

* Manually delete cache file

* Rewrite migration to delete files

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-04-25 14:50:17 +02:00
Bjarke Berg
c85a6274f8 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockGridEditor/Document/BlockGridEditorInDocument.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/mediaFiles.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/mediaSection.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/ModelsBuilder/modelsbuilder.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/partialViews.spec.ts
2023-04-25 13:45:26 +02:00
Kenn Jacobsen
7e117d2496 Delivery API content index handlers + unpublished/protected content handling (#14138)
* Introduce content index handlers for the Delivery API

* Do not add protected content to the index

* Re-introduce public collection builder extensions

* Add backwards compatible constructor to ConfigureIndexOptions

* Fix edge case for published children of unpublished parents

* Reduce number of hardcoded field names

* Fixed copy/paste comment

* Fix field definition type for date

* Do not add trashed items to the content index

* Don't expose protected content through the item endpoints

* Removing ReSharper comment

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-04-25 09:21:33 +02:00
Niels Lyngsø
08bedd7c13 fix situation when config was not available. (#14148) 2023-04-25 09:14:37 +02:00
Niels Lyngsø
3b104bf256 fix situation when config was not available. (#14148) 2023-04-24 12:24:36 +02:00
Kenn Jacobsen
6760f72512 Fix the "disposed object" error when rendering RTE content as JSON (#14147) 2023-04-24 12:04:05 +02:00
Mark Drake
aaec419672 Edge Cases for Issue #13838: Hotkey Actions Triggered from Web Components (#14098)
(cherry picked from commit 1436fe4e15)
2023-04-21 14:13:02 +02:00
Kenn Jacobsen
ced4f84dfe JSON output from RTE - review changes (#14139) 2023-04-21 11:42:49 +02:00
Dhanesh Kumar Mj
66b1add0d0 Save and Preview blank on second use #14052 (#14094)
(cherry picked from commit 00eab03d50)
2023-04-21 11:31:47 +02:00
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
Søren Kottal
81c6a1b8e6 Adds padding to the icon in btn-social (#14080)
(cherry picked from commit c4cf5f910d)
2023-04-18 16:30:40 +02:00
Søren Kottal
c4cf5f910d Adds padding to the icon in btn-social (#14080) 2023-04-18 16:29:31 +02:00
Nikolaj Geisle
747f2e7599 V11: Fix decimal variants (#13741)
* fix sqlite with variants

* Create and register SqlSpecificMapper

* Delete obsolete file

* Add back inheritance

Co-authored-by: Zeegaan <nge@umbraco.dk>
(cherry picked from commit c868c60ed2)
2023-04-18 15:22:39 +02:00
Markus Johansson
f9aaf1984a #14016 Fixed, added cache buster to Block Grid Editor stylesheets
(cherry picked from commit 80f6bb404a)
2023-04-18 14:48:08 +02:00
Mark Drake
539640f995 resolve spacing issues with block list inline editor when it is the last property editor on the current tab
(cherry picked from commit 9a638b6edc)
2023-04-18 14:46:56 +02:00
Dhanesh Kumar
07a45d02f9 fix for the char limit(512) for textboxdatatype
(cherry picked from commit 2c580e8d4f)
2023-04-18 14:45:31 +02:00
Lewis Hazell
bb7752c483 Case-insensitive tag names with SQLite provider (#14012)
* 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)
2023-04-18 14:41:06 +02:00
Lucas Bach Bisgaard
d1975ee2cf Fix bug, in multiurlpicker where you cannot deselect a selected entity.
(cherry picked from commit 3385947c4e)
2023-04-18 14:40:10 +02:00
Bjarne Fyrstenborg
4d13345b14 Support readonly set via SendingContentNotification (#13557)
* Support readonly set via SendingContentNotification

* Apply changes to second umb-property-editor as well

* Remove check on property.supportsReadOnly

* Disable allow unlock

* Add check on property.readonly

* Small adjustment in the order of preview checks

---------

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
(cherry picked from commit e30587f90d)
2023-04-18 14:37:23 +02:00
Sebastiaan Janssen
11ac2ca971 Merge branch 'v11/dev' into contrib 2023-04-18 14:23:42 +02:00
Andreas Zerbst
02e16992b4 V10/qa/added more acceptance tests (#14100)
* Imported BlockGrid tests from v11

* Updated existing tests

* Updated version of playwright, our models builders and testhelpers

* More imported tests

* Updated flaky tests
2023-04-18 08:13:01 +02:00
Markus Johansson
80f6bb404a #14016 Fixed, added cache buster to Block Grid Editor stylesheets 2023-04-15 18:16:15 +02:00
Mark Drake
9a638b6edc resolve spacing issues with block list inline editor when it is the last property editor on the current tab 2023-04-14 14:48:36 +01: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
Dhanesh Kumar
2c580e8d4f fix for the char limit(512) for textboxdatatype 2023-04-13 23:06:23 +02:00
Erik-Jan Westendorp
f43bc50e7d Translate tree headers to Romanian (#14077)
* Translate treeHeaders

* Oops
2023-04-13 20:07:06 +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