Commit Graph

42889 Commits

Author SHA1 Message Date
Kenn Jacobsen
59448aeaac Add "Model" postfix for all models in the Swagger output (#13806) 2023-02-08 12:34:11 +01:00
Nathan Woulfe
b5e87a82f2 Merge branch 'v13/dev' of https://github.com/umbraco/umbraco-cms into v13/dev 2023-02-08 09:47:02 +10:00
Nathan Woulfe
41a03f4b8b uses correct constant for dictionary icon (needs to be added to uui icon registry) 2023-02-08 09:46:58 +10:00
Mole
6808a63e73 New backoffice: Add GUIDS to user groups (#13672)
* Add key to UserGroupDto

* Fix renaming table in sqlite

The SqliteSyntaxProvider needed an overload to use the correct query

* Start work on user group GUID migration

* Add key index to UserGroupDto

* Copy over data when migrating sqlite

* Make sqlite column migration work

* 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

* Use unscoped migration for adding GUID to user group

* Make sqlite migration work

It's really not pretty, square peg, round hole.

* Don't re-enable foreign keys

This will happen automatically next time a connection is started.

* Scope database when using SQLServer

* Don't call complete transaction

* Tidy up a couple of comment

* Only allow scoping the database from UnscopedMigrationBase

* Fix comment

* Remove remark in UnscopedMigrationBase as it's no longer true

* Add keys when creating default user groups

* Map database value from DTO to entity

* Fix migration

Rename also renamed the foreign keys, making it not work

* Make migration idempotent

* Fix unit test

* Update CompatibilitySuppressions.xml

* Add UniqueId to AppendGroupBy

Otherwise MSSQL grenades

* Cleanup

* Update CompatibilitySuppressions

* Rename UniqueId to Key

* Cleanup

---------

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2023-02-07 08:30:33 +01:00
Andreas Zerbst
fdd059fb2b Updated the ID of the locator in the test 'can set a minimum of required blocks in content with a block list editor' to match the correct ID. (#13769) 2023-02-01 15:21:33 +01:00
Elitsa Marinovska
70aa626991 Fix sln file for the new backoffice (#13765)
* Fix sln file and add README commands to get started

* expand the docs a bit

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2023-02-01 10:37:21 +01:00
Kenn Jacobsen
8caee5297b Use ISO codes instead of language IDs for fallback languages and translations (#13751)
* Use language ISO code for language fallback instead of language ID

* Remove language and language ID from dictionary item and dictionary item translation

* ADd unit test for dictionary item translation value extension

* Make the internal service implementations sealed

* Rename translation ISO code to be more explicit in its origin (Language)

* Add breaking changes suppression

* Handle save of invalid fallback iso code

* Fixed test

* Only allow non-UserCustomCulture's

* Fixed and added tests

* Rename ISO code validation method

* Fix language telemetry test (create Swedish with the correct ISO code)

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-02-01 09:37:37 +01:00
Kenn Jacobsen
641cae7fb5 Align the data type API (#13760)
* Make data type CRUD operations async using Attempt pattern

* Refactor data type container management to its own service + add unit tests for it

* Add compatability suppression for new interface methods and unit test changes
2023-02-01 08:38:36 +01:00
Kenn Jacobsen
ac8cfcf634 Align template API with dictionary API (#13714)
* Align the template services and API with the dictionary ones (use attempt pattern)

* A little controller clean-up

* Mimic old file service behavior, make unit tests happy

* Align CreateForContentTypeAsync return value with the rest of the TemplateService API

* Scaffold endpoint should no longer feature master templates

* Update the OpenAPI JSON
2023-01-31 12:20:46 +01:00
Bjarke Berg
5f8ef4cfff Merge remote-tracking branch 'origin/v12/dev' into v13/dev 2023-01-30 08:02:44 +01:00
Bjarke Berg
432326cc20 Updated the BPlusTree package to reflect the update in the underlying package. 2023-01-30 08:01:54 +01:00
Bjarke Berg
cec613c0cc Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-01-27 09:50:35 +01:00
Bjarke Berg
e94328ad57 Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2023-01-27 09:50:06 +01:00
Bjarke Berg
700a33ac73 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-01-27 09:49:47 +01:00
Jacob Overgaard
219940f523 update backoffice submodule 2023-01-27 09:08:55 +01:00
Bjarke Berg
f275d80e2f Fixes issue with nucache slow on linux, when cold-booting (#13719)
* Fixes issue with nucache slow on linux, when cold-booting

https://github.com/umbraco/Umbraco-CMS/issues/12159
2023-01-26 16:20:57 +01:00
Kenn Jacobsen
0297152249 Split localization service into dedicated services (#13731)
* Rework language service and API

* Revert unintended commit of Directory.Build.props

* Create OS conditional test for invalid ISO codes

* Reintroduce and obsolete old Delete method on ILocalizationService + make new Delete method delete by ISO code + add obsoletion attrs to service implementation

* Review comments + utilize new Delete method

* Do not allow model reuse when creating a new language

* Fix bad merge

* Split localization service into dedicated services for language and dictionary item handling

* Replaced ILocalizationService usage in management API (as much as can be done for now)

* Ensure we can create dictionary items with explicit keys (but no duplicates)

* Fix culture controller so it works properly with pagination

* Update OpenAPI JSON

* Actually update the language being updated...

* Unit test for invalid ISO now no longer needs to differ between OS :)

* A little bit of code health improvements

* A litte less code duplication

* Remove duplicate validation
2023-01-26 13:34:11 +01:00
Nikolaj Geisle
c868c60ed2 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>
2023-01-26 12:26:06 +01:00
Elitsa Marinovska
aa90efa5b7 New Backoffice: Log viewer controller (#13648)
* Fixing a few nullable reference types for log viewer (#13634)

(cherry picked from commit b4ca2a6636)

* Adding LogControllerBase

* Migrating GetLogLevels()

* Migrating GetNumberOfErrors()

* Migrating GetLogLevelCounts()

* Migrating GetCanViewLogs()

* Migrating GetMessageTemplates()

* Migrating GetLogs()

* Migrating GetSavedSearches()

* Migrating PostSavedSearch()

* Migrating DeleteSavedSearch()

* Adding LoggerViewModel

* Adding LogViewModelMapDefinition

* Update OpenApi.json

* Cleanup

* V12: Change nullability for the log searches (#13647)

* Changing nullability

* Obsolete DeleteSavedSearch since the query param is not used

* Fix a bit more referenced

* Add default implementation for the new overload of DeleteSavedSearch

(cherry picked from commit 5e06f5a8a0)

* Updates based on nullability fix

* Adding GetSavedSearchByName

* Implementing ByName endpoint

* Refactoring Delete endpoint based on GetSavedSearchByName

* Refactoring Create endpoint to return the item's location

* Suppress new GetSavedSearchByName in ILogViewer interfaces

* Update OpenApi.json

* Adding github initials to FIXME

* Renaming

* Moving files to Core proj

* Adding GetLogs with skip and take

* Introducing ILogViewerService

* Supressing xml for ILogViewer.GetLogsAsPagedModel()

* Changing to our own Enum representation of LogLevel

* Creating ILogEntry needed for GetPagedLogs()

* Refactoring controllers to use the new logViewerService

* Removing base class methods since those have been moved to the new service

* Removing ErrorCountLogViewerController since the result can be calculated from another endpoint

* Refactoring the MapDefinition because of the new return types from the service

* Update OpenApi.json

* Obsoleting old methods in favor of the ILogViewerService

* Cleanup

* Fixing enum representation as strings for Swagger

* Adding documentation

* Changing enum representation to string in OpenApi.OpenApi.json

* Fix FIXME (use CreatedAtAction)

* Removing JsonStringEnumConverter as there should be another way to fix enum representation for Swagger

* Removing MappingBuilderExtensions and making specific LogViewerBuilderExtensions

* Changes to the .sln file

* Take only the result in the response

* Register the LogViewer extensions

* Update OpenApi.json

* Fix the supressions.xml

* Add inheritdoc

* Remove GetSavedSearchByName as it isn't necessary to introduce it anymore

* Obsolete interfaces

* Rename ViewPermission controller to ValidateLogFileSize

* Make rest of the methods async

* Route name change

* Remove methods obsoletion

* Introduce the "attempt" pattern

* Refactoring of ILogViewerService

* Refactoring controllers

* Another OpenApi.json update

* Adding fixme

* Re-add new client project

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2023-01-25 11:53:42 +01:00
Bjarke Berg
0fd90c1294 Merge remote-tracking branch 'origin/v12/dev' into v13/dev 2023-01-24 12:04:01 +01:00
Bjarke Berg
d180247915 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-01-24 12:02:09 +01:00
Bjarke Berg
be0138e526 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-01-24 11:56:32 +01:00
Mole
17248ce494 V11: Add improved log message on compilation failure using InMemoryAuto (#13678)
* Add improved log message when in memory compilation fails.

* Move LogCompilationFailure into its own method

And hopefully make codescene happeh

* Reduce nesting

* Replace null check with linq
2023-01-23 08:19:15 +01:00
Kenn Jacobsen
ff2d90d775 Rework dictionary CRUD operations (#13688)
* Rework dictionary CRUD operations

* Update OpenAPI json

* Move responsibility to localization service, introduce new attempt pattern for create and update operations, update unit tests accordingly

* Fix merge

* Rollback assumption that we can map entities from scratch (entity relations got in the way)

* Update OpenAPI JSON

* Add breakage supressions

* Add compat suppressions for integration test project

* Make dictionary item deletion follow same pattern as create and update

* Review comments + update delete to use new pattern

* Update breakage suppressions to match the new Delete method
2023-01-20 13:40:24 +01:00
Jacob Overgaard
435b6f0650 V11: Prevalues as toggles have problems in datatype settings view (#13709)
* format preValues with DataTypeHelper.createPreValuesProps before rendering so they have the 'alias' prop used for input-id to umb-toggle

* preValues are now formatted on fetch so we do not need to do it again

(cherry picked from commit 7aee15d6d1)
2023-01-20 08:16:25 +01:00
Jacob Overgaard
7aee15d6d1 V11: Prevalues as toggles have problems in datatype settings view (#13709)
* format preValues with DataTypeHelper.createPreValuesProps before rendering so they have the 'alias' prop used for input-id to umb-toggle

* preValues are now formatted on fetch so we do not need to do it again
2023-01-20 08:13:37 +01:00
Jacob Overgaard
a8acefcaba introduce lint option for gulp so we only lint when building and not watching, which makes dev, watch and fastdev even faster 2023-01-19 12:56:55 +01:00
Jacob Overgaard
b97dd46608 V11: fix issue where editing a macro was not possible (#13702)
* remove the onSetup for the macro button since we want to always be able to interact with the macro button (either insert or edit)

* let the onAction method find the currently selected macro by asking the active editor for its selection instead of relying on the NodeChanged event
2023-01-19 11:02:33 +01:00
Bjarke Berg
4be798ddfb Merge remote-tracking branch 'origin/v12/dev' into v13/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Install/PackageMigrationRunner.cs
#	src/Umbraco.Infrastructure/Migrations/IMigrationContext.cs
#	src/Umbraco.Infrastructure/Migrations/IMigrationPlanExecutor.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseBuilder.cs
#	src/Umbraco.Infrastructure/Migrations/MigrationContext.cs
#	src/Umbraco.Infrastructure/Migrations/MigrationPlan.cs
#	src/Umbraco.Infrastructure/Migrations/MigrationPlanExecutor.cs
#	src/Umbraco.Infrastructure/Migrations/PostMigrations/ClearCsrfCookies.cs
#	src/Umbraco.Infrastructure/Migrations/PostMigrations/DeleteLogViewerQueryFile.cs
#	src/Umbraco.Infrastructure/Migrations/PostMigrations/RebuildPublishedSnapshot.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/Upgrader.cs
#	src/Umbraco.Web.BackOffice/Controllers/MacroRenderingController.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/MigrationPlanTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/PostMigrationTests.cs
2023-01-19 10:43:07 +01:00
Bjarke Berg
4c62fcfb98 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
2023-01-19 09:52:41 +01:00
Bjarke Berg
8c22de0bad Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2023-01-19 09:50:54 +01:00
Bjarke Berg
1b88e0a7a1 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	version.json
2023-01-19 09:41:00 +01:00
Jacob Overgaard
f23ebaefa6 v11: javascript dependency updates (UUI, TinyMCE, jQuery, signalR, and more) (#13696)
* build(deps-dev): update development dependencies

* update the Umbraco UI library to 1.1.0

* update ace editor to 1.14.0

* update diff to 5.1.0

* update jquery to 3.6.3

* update tinymce to 6.3.1

* update underscore to 1.13.6

* update @microsoft/signalr to 7.0.2
2023-01-19 09:39:57 +01:00
Bjarke Berg
2dd38f8393 Merge remote-tracking branch 'origin/v11/contrib' into v11/dev 2023-01-19 09:32:04 +01:00
Mole
46049bfd74 Obsolete things broken in migrations refactor (#13658)
* Obsolete chings changed in v13

* Fix tests

* Obsolete Execute and add ExecutePlan with default implementation.

This just calls the old implementation and creates an ExecutedMigrationPlan from the result

In V13 this has its own implementation.

* Mention notification in obsolete message
2023-01-19 09:27:33 +01:00
Jacob Overgaard
0d4d3ce33c add workaround for line-height issues with tinymce (#13700)
based on this upstream issue: https://github.com/tinymce/tinymce/issues/6431
2023-01-19 09:26:00 +01:00
Jacob Overgaard
cfdc4a9573 add the s html element to allow list for TinyMCE (#13697)
Fixes #13637
2023-01-19 09:25:44 +01:00
CyberReiter
8fdb5a55ea Updating german translation (#13684)
* updating german translations

* translating missing sections

* added missing closing tag

Co-authored-by: Michael <michael@crossingpaths.be>
2023-01-19 00:19:13 +01:00
Jacob Overgaard
9c00c95f01 v13: New Backoffice in CMS (POC) (#13664)
* Added a new executeable to new backoffice

* add new backoffice client as submodule

* add new backoffice client as project

* add bootstrap of backoffice client

* experimentally allow CORS from local vite app running the backoffice

* fix base path

* move new backoffice projects to NewBackoffice folder

* add support for redirect urls to login page (temporary)

* update references to v13

* override databaseinstall/index.cshtml

* copy ignore lines from normal project

* remove redirect to AuthorizeUpgrade

* codeql: checkout submodules

* Section catch-all route

* fixed tests

* remove starter-kit file

* remove grid views

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-01-18 15:02:59 +01:00
Kenn Jacobsen
4640a317b8 Support non-nullable reference types in OpenAPI doc (#13685)
* Refactored ManagementApiComposer into several extension classes

* ADd support for non-nullable reference types in OpenAPI doc

* Update OpenAPI JSON to reflect new (lack of) nullability

* Don't add factories twice :)

* Rework composing + move backoffice route detection for management API to core
2023-01-18 13:11:42 +01:00
Elitsa Marinovska
2c8927c2e9 Rename old FIXME to TODO (#13646)
* Rename old FIXME to TODO, so we can track new FIXME starting v13

* Remove empty TODO
2023-01-18 12:28:54 +01:00
Kenn Jacobsen
de8e307295 Add "is trashed" data for content and media tree controllers (#13687) 2023-01-17 14:04:22 +01:00
Kenn Jacobsen
25f66e7413 Turn the indexer health status into an enum + rearrange the view models according to controller namespaces (#13686) 2023-01-17 14:04:13 +01:00
Bjarke Berg
ea3668a224 Update docfx (#13679) 2023-01-16 16:10:06 +01:00
Mole
13fb2a4f52 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>
2023-01-16 14:52:51 +01:00
Mike Masey
3ebd15b67e fix: move list view selection options to after list in focus order 2023-01-15 22:42:48 +01:00
Bjarne Fyrstenborg
eb9f9c68dd Add separator before reload node in Media Types tree 2023-01-15 21:56:18 +01:00
ustadstar
fd992f65bb Fix copy content with descendants not copying sort order (#13464) 2023-01-13 01:30:48 +01:00
Kenn Jacobsen
f6113db0fc Re-introduce the option to conditionally login members after registration (#13659)
* Re-introduce the option to conditionally login members after registration

* Make absolutely sure the default is true for automatic member login after registration
2023-01-12 10:56:14 +01:00
Kenn Jacobsen
8463d906a7 Make sure the property editor layout is contained within its container (prevent Z-index bleed-through) (#13583) 2023-01-12 10:55:02 +01:00