Commit Graph

41250 Commits

Author SHA1 Message Date
Bjarke Berg
fe1c2f5d4f Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
#	src/Umbraco.Infrastructure/HostedServices/HealthCheckNotifier.cs
#	src/Umbraco.Infrastructure/HostedServices/RecurringHostedServiceBase.cs
#	src/Umbraco.Infrastructure/HostedServices/ServerRegistration/TouchServerTask.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TrackedReferencesRepository.cs
#	src/Umbraco.Web.Common/Middleware/UmbracoRequestMiddleware.cs
#	tests/Umbraco.Tests.Integration.SqlCe/Umbraco.Infrastructure/Persistence/DatabaseBuilderTests.cs
#	tests/Umbraco.Tests.Integration/Testing/BaseTestDatabase.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Migrations/AdvancedMigrationTests.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SchemaValidationTest.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SqlServerTableByTableTest.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Components/ComponentTests.cs
2022-03-31 12:51:55 +02:00
Bjarke Berg
ad51832b5d Merge remote-tracking branch 'origin/v9/9.4' into v9/dev
# Conflicts:
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
2022-03-31 11:54:33 +02:00
Bjarke Berg
93badabcb1 Added extra (unnessasary) WHERE-clause to help sql server generate a smarter query plan (#12198) 2022-03-31 11:52:02 +02:00
Bjarke Berg
181a7cb27d Bump versions to 9.4.2 2022-03-29 09:33:37 +02:00
Andy Butland
0418be4318 Corrected the base URL to use when retrieving and setting public access details. (#12178)
* Corrected the base URL to use when retrieving and setting public access details.

* Fixed original issue from a merge conflict.. Now using the correct v9+ resource

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-03-29 09:19:59 +02:00
Andy Butland
1ff6a953bb Corrected the base URL to use when retrieving and setting public access details. (#12178)
* Corrected the base URL to use when retrieving and setting public access details.

* Fixed original issue from a merge conflict.. Now using the correct v9+ resource

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-03-29 09:05:40 +02:00
Nikolaj Geisle
7d18914ae6 v9: fix cannot map mvc route to client side request (#12088)
* Implement UmbracoRequestOptions and check in UmbracoRequestMiddleware.cs

* Fix breaking change

* Add suggestion from Marc

* Amend names

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2022-03-29 08:32:02 +02:00
Andy Butland
02e76c8227 Configuration to control the creation of default data (#12122)
* Added configuration and checks for creation of default Umbraco data.

* Fixed configuration binding issues.

* Updated comments.

* Added DefaultDataCreationSettings to the JSON schema.

* Removed option to not install default relation types as Umbraco relies on (and will recreate) them if they aren't there.

* Renamed configuration class used for install of default data and converted to named optios.

* Fix to failing unit tests.

* Fixes for integration tests.

* Apply suggestions from code review

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

* Further fix from code review.

* Updated naming as per PR review suggestions.

* Update src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2022-03-25 08:58:07 +01:00
Ronald Barendse
037580b305 Fix obsolete constructor in RecurringHostedServiceBase (#12172)
* Use NullLogger in obsoleted constructor

* Create missing logger during execution instead

(cherry picked from commit d0823d4236)
2022-03-24 10:37:52 +00:00
Ronald Barendse
d0823d4236 Fix obsolete constructor in RecurringHostedServiceBase (#12172)
* Use NullLogger in obsoleted constructor

* Create missing logger during execution instead
2022-03-24 10:34:29 +00:00
Mole
c1552cf7fc Bump versions 2022-03-23 11:36:34 +01:00
Nikolaj Geisle
535008ebc1 Fix custom block view (#12104)
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2022-03-23 10:42:24 +01:00
Mole
4fffb9f7a7 Bump versions to non-rc 2022-03-23 09:48:21 +01:00
Mole
4e519d4c96 Merge branch 'v9/9.4' into v9/dev
# Conflicts:
#	src/Umbraco.Core/Security/LegacyPasswordSecurity.cs
#	src/Umbraco.Web.UI.Client/src/common/directives/components/references/umbtrackedreferences.component.js
#	src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Security/UmbracoPasswordHasherTests.cs
2022-03-23 09:44:53 +01:00
Elitsa Marinovska
78cfb29908 Item tracking fixes (#12146)
* Cleanup; Fix lang keys

* Documentation

* Typos

* Distinct the results

* Changed GetPagedRelationsForItems to GetPagedRelationsForItem as we would only expect a single id to be passed when calling this + fix more docs

* Changed to the correct reference

* Unused code

* Only load references when info tab is clicked

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-03-23 09:33:36 +01:00
Nikolaj Geisle
20f0ceeda6 Merge pull request #12161 from umbraco/v9/bugfix/amend_breaking_change_in_RecurringHostedServiceBase
Amend breaking change in RecurringHostedServiceBase
2022-03-23 09:15:27 +01:00
Nikolaj Geisle
0d836875c7 Merge pull request #12153 from vsilvar/v9/bugfix/12022_recurring_hosted_service_scope_leak
Fixes RecurringHostServices leaking the execution context / ambient scope
2022-03-22 13:03:14 +01:00
Sebastiaan Janssen
04c292f167 Merge pull request #12155 from umbraco/v9/bugfix/10066
Same fix as #12154 - fixes #10066

(cherry picked from commit a302b10f66)
2022-03-22 10:09:36 +01:00
Nikolaj Geisle
a302b10f66 Merge pull request #12155 from umbraco/v9/bugfix/10066
Same fix as #12154 - fixes #10066
2022-03-22 08:34:27 +01:00
Nikolaj Geisle
b97d016c13 Merge pull request #12156 from umbraco/v9/bugfix/youtube-link
Use an umbra.co link for the TV replacement channel
2022-03-22 08:19:58 +01:00
Sebastiaan Janssen
0aa4d1956a Also update Umbraco TV link + text in the help panel 2022-03-21 16:14:48 +01:00
Sebastiaan Janssen
cde312b6d4 Use an umbra.co link for the TV replacement channel so we can change it in the future if we need to 2022-03-21 15:47:51 +01:00
Sebastiaan Janssen
f3c5c0976d Same fix as #12154 - fixes #10066 2022-03-21 14:59:23 +01:00
Nikolaj Geisle
a9daab5a15 Merge pull request #12139 from umbraco/v9/bugfix/track-media-items-picked-as-macro-params
Fix media tracking of items added via macro parameters in RTE and Grid
2022-03-21 08:34:36 +01:00
Nikolaj Geisle
6f7a9cbd7b Merge pull request #12139 from umbraco/v9/bugfix/track-media-items-picked-as-macro-params
Fix media tracking of items added via macro parameters in RTE and Grid
2022-03-21 08:24:19 +01:00
Nikolaj Geisle
a02ef3c101 Try to make test non-flaky 2022-03-18 14:52:57 +01:00
Nikolaj Geisle
93432a2658 Apply suggestions from code review 2022-03-18 14:26:25 +01:00
Nikolaj Geisle
8e78de4dc5 Abstract ParameterValueEditors 2022-03-18 14:24:04 +01:00
Nikolaj Geisle
0f3aa320be Fix caching & contentPicker in parameter 2022-03-18 12:54:19 +01:00
Elitsa Marinovska
3044f8df04 Item tracking fixes (#12146)
* Cleanup; Fix lang keys

* Documentation

* Typos

* Distinct the results

* Changed GetPagedRelationsForItems to GetPagedRelationsForItem as we would only expect a single id to be passed when calling this + fix more docs

* Changed to the correct reference

* Unused code

* Only load references when info tab is clicked

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-03-18 11:21:49 +01:00
Bjarke Berg
608a65147f Fixes 2022-03-18 08:02:44 +01:00
Nikolaj Geisle
c7e45ae13a Encode path (#12132)
Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2022-03-17 14:53:53 +01:00
Nikolaj Geisle
30a30731ec Encode path (#12132)
Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2022-03-17 14:52:15 +01:00
Elitsa Marinovska
c08921d3e6 Merge remote-tracking branch 'origin/v9/dev' into v9/bugfix/track-media-items-picked-as-macro-params 2022-03-16 15:11:58 +01:00
Elitsa Marinovska
5bebf98339 Test + fix 2022-03-16 14:19:25 +01:00
Elitsa Marinovska
5d08caae8c Cleanup 2022-03-16 14:18:24 +01:00
Elitsa Marinovska
22b7771305 Changing the way we implement the new Macro service and repository 2022-03-16 14:15:46 +01:00
Elitsa Marinovska
cf9f4f39e4 Adds/Fixes xdoc comments 2022-03-16 10:30:02 +01:00
Paul Johnson
3961c4c233 v10 SQLite support + distributed locking abstractions (#11922)
* Created Persistence.SQLite project skeleton.

* SQLite database initialization

* Various changes and hacks to make things work.

* WIP integration tests

* Fix thread safety tests

* Fix tests that relied on tie breaker sorting.

Spent a fair amount of time looking for a less lazy fix but gave up.

* Convert right join to left join ContentTypeRepository.PerformGetByQuery
SQLite doesn't support right join

* Fix test Can_Generate_Delete_SubQuery_Statement

Worth noting that NPoco.DatabaseTypes.SQLiteDatabaseType doesn't override
EscapeSqlIdentifier so NPoco will escape with [].

SQLite docs say > "A keyword enclosed in square brackets is an identifier.
This is not standard SQL.
This quoting mechanism is used by MS Access and SQL Server and is
included in SQLite for compatibility."

Also could have updated SqliteSyntaxProvider to match npoco but
decided against it.

* Fixes for paginated custom order by

* Fix tests broken by lack of unique indexes.

* Fix SqlServerTableByTableTest tests.

These tests didn't actually do anything as the tables already exist so schema creator just returned.

Did however point out that the default implementation for DoesTableExist just returns false so added a default naive implementation.

* Fix ValidateLoginSession - SelectTop must come later

* dry up database cleanup

* Fix up db migration tests.
We can't drop pk in sqlite without recreating table.
Test looks to be testing that add column works as intended which we can test.

* Prevent schema creation errors.

* SQLite ignore lock tests, WAL back on.

* Fix package schema tests

* Fix NPocoFetchTests - case sensitivity not under test

* Fix AdvancedMigrationTests (where possible)

Migrations probably need a good look later.
Maybe nuke old migrations and only support moving to v10 from v9.

If we do that can do some cleanup.

* Cleanup test database configuration

* Run integration tests against SQLite on build agent.

* Drop MS.Data.SQLite
System.Data.SQLite was quicker to roll out due to more CLR type mapping

* YAML

* Skip Umbraco.Tests.Integration.SqlCe

* Drop SqlServerTableByTable tests.

Until this week they did nothing anyway as they with NewSchemaPerTest
so the tests all passed as CreateTable was no op (already exists).

Also all of the tables are created in an empty database by SchemaValidationTest.cs
DatabaseSchemaCreation_Produces_DatabaseSchemaResult_With_Zero_Errors

* Might aswell run against macOS also.

* Copy azure pipelines task header layout

* Delete SQLCe projects

* Remove SQL CE specific code.

* Remove SQL CE NuSpec, template params, build script setup

* Delete umbraco-netcore-only.sln

* Add SkipTests solution configuration and use for codeql

* Remove reference to deleted nuspec file.

* Refactor ConnectionStrings WRT DataDirectory placeholder & ProviderName.

At this point you can try out SQLite support by setting the following
in appsettings.json and then completing the install process.

"ConnectionStrings": {
  "umbracoDbDSN": "Data Source=|DataDirectory|/umbraco.sqlite",
  "umbracoDbDSN_ProviderName": "System.Data.SQLite"
},

Not currently possible via installer UI without provider name pre-set in
configuration.

* Switch to Microsoft.Data.Sqlite

Some gross hacks but will be good to find out if this works
with apple silicon.

* Enable selection of SQLite via installer UI (also quick install)

* Remove SqlServerDbProviderFactoryCreator to cleanup a TODO

* Move SQL Server support to its own class library

* Add persistence dependencies to Umbraco.CMS metapackage

* Bugfix packages delete query

Created invalid query for SQLite.

* Try out cypress tests Linux + SQLite

* Prevent cypress test artifact upload failure on attempt 2+

* LocalDb bugfixes

* Drop redundant enum

* Move SqlClient constant

* Misc whitespace

* Remove IsSqlCe extension (TODO: drop non 9->10 migrations later).

* Umbraco.Persistence.* -> Umbraco.Cms.Persistence.*

* Display quick install defaults and per provider default database name.

* Misc remove old comment

* little re-arrange

* Remove almost all usages of IsSqlite extension.

* visual adjustments

* Custom Database Configuration is last step and should then say Install.

* use text instead of disabled inputs

* move legend, rename to Install

* Update SqlMainDomLock to work without distributed locks.

* Added IDistributedLockingMechanism interface and in memory impl.

* Drop locking from ISqlSyntaxProvider & wire up scope to abstraction.

* Added SqlServerDistributedLockingMechanism

* Move distributed locking interfaces and exceptions to Core + xmldocs.

* Fix tests, Misc cleanup, Add SQL distributed locking integration tests

* Provide mechanism to specify DistributedLockingMechanism in config
(even if added by composer)

* Nomplementation -> NoImplementation

* Fix misleading comment

* Integration tests use SqlServerDistributedLockingMechanism when possible

* Handle up-gradable locks SqlServerDistributedLockingMechanism.
TODO: InMemoryDistributedLockingMechanism.

Note: Nuked SqlServerDistributedLockingMechanismTests, will still sleep
at night.
Is covered by Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.LockTests

* Make tests pass for InMemoryDistributedLockingMechanism, pretty hacky.

* Tweak constraints on WithCollectionBuilder so i can drop bad constructor

* Added SqliteDistributedLockingMechanism

* Dropped InMemoryDistributedMechanism + magic

InMemoryDistributedMechanism was pretty rubbish and now we have
a decent implementation for SQLite as we no longer block readers
see 8d1f42b.

Also drop the CollectionBuilder setup, instead do the same as we do
for syntax providers etc, it's more automagical so we never require an
explicit selection although we are allowing for it.

However keeping the optional IUmbracoBuilder constructor param for
CollectionBuilders as it's extremely useful.

* Fix quick install "" database name.

* Hide Database Configuration section when a connection string is pre-set.

Doesn't seem worth it to extract db name from connection string.

* Ensure wal test 2+

* Fix logging inconsistencies.

* Ensure in transaction when obtaining locks + no-op the SQLite read lock.

There's no point in running the query just to make a single test pass.

* Fix installer database display names

* Allow SQLite shared cache without losing deferred transactions

* Opt into shared cache for new SQLite databases + fix filename

* Fix misc inconsistency in .gitignore

* Prefer our interceptor interface

* Restore DEBUG_DATABASES code OnConnectionOpened in case it's used.

* Back to private cache.

* Added retry strategy for SQLite + refactor out SQL server specific stuff

* Fix SQL server tests.

* Misc - Orphaned comment, incorrect casing.

* InMemory SQLite test database & turn shared cache back on everywhere.

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2022-03-11 17:14:20 +01:00
Paul Johnson
ff2865c1dc Further enhancements for legacy password support. (#12124)
* Further enhancements for legacy password support.

For users - try new style passwords first and fallback on failure seeing
as a valid modern password is the norm, rehash is only one time.

For both users and members also deals with the fact that for
useLegacyEncoding we could store any old thing in passwordConfig
e.g. it's possible to get Umbraco8 to store "HMACSHA384" alongside
the hash even though it's really HMACSHA1 with password used as key
(try it out by tweaking machine key settings and setting
useLegacyEncoding=true).

Has behavioral breaking changes in LegacyPasswordSecurity as the
code now expects consumers to to respect IsSupportedHashAlgorithm
rather than ignoring it.

* Less rushed removals
2022-03-11 10:41:04 +00:00
Bjarke Berg
a30d24130f Merge pull request #12126 from umbraco/v10/feature/merge_v9.4rc_to_v10
Merge v9.4rc to v10
2022-03-11 11:06:02 +01:00
Bjarke Berg
78b85a44db Merge remote-tracking branch 'origin/v9/dev' into v10/dev 2022-03-10 22:10:00 +01:00
Elitsa Marinovska
92480b8446 Changes in the editors so we can track the items 2022-03-10 16:29:56 +01:00
Elitsa Marinovska
c22b9dbb76 Adding a new parser to get the media references in a macro 2022-03-10 16:28:33 +01:00
Elitsa Marinovska
cbb19b1d93 Implementations of the new interfaces 2022-03-10 16:27:31 +01:00
Elitsa Marinovska
2aa79c7494 Adding repository caching of macro definition by alias 2022-03-10 16:26:16 +01:00
Elitsa Marinovska
17266dacb1 New service and repo to get macros by alias 2022-03-10 16:25:47 +01:00
Paul Johnson
1ab0bb9254 fix additional legacy password formats (#12120)
* Added failing test to demo issue.

* Handle old machine key default.
2022-03-10 15:00:16 +01:00
Paul Johnson
cc05428640 fix additional legacy password formats (#12120)
* Added failing test to demo issue.

* Handle old machine key default.
2022-03-10 14:59:19 +01:00
Bjarke Berg
981e66a673 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	src/Umbraco.Core/Telemetry/TelemetryService.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
#	src/Umbraco.Infrastructure/HostedServices/ScheduledPublishing.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.BackOffice/Controllers/DashboardController.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/HostedServices/ScheduledPublishingTests.cs
2022-03-10 14:36:30 +01:00