Commit Graph

374 Commits

Author SHA1 Message Date
Ronald Barendse
5198e7c52d Backport relation tracking fixes and get references from recursive (nested/block) properties (#15593)
* Include automatic relation type aliases from factory and fix SQL parameter overflow (#15141)

* Include automatic relation type aliases from factory

* Remove unnessecary distinct and fix SQL parameter overflow issue

* Fixed assertions and test distinct aliases

* Simplified collection assertions

* Improve logging of invalid reference relations (#15160)

* Include automatic relation type aliases from factory

* Remove unnessecary distinct and fix SQL parameter overflow issue

* Fixed assertions and test distinct aliases

* Simplified collection assertions

* Improve logging of invalid reference relations

* Always get all automatic relation type aliases

* Do not set relation type alias for unknown entity types

* Get references from recursive (nested/block) properties
2024-01-19 20:02:57 +01:00
Bjarke Berg
bf8af4588e Centralised NuGet packages (#15293)
* Moved to centralized nuget packages

* Handle JsonSchema

* Change PackageReference to PackageVersion

* Opt out of central package management for mangement api (at least for versions less than 14) and the UI project

* ManagePackageVersionsCentrally = false

* Change folder acceptance tests are build, to avoid reading the test Directory.Packages.props

* Change folder acceptance tests are build, to avoid reading the test Directory.Packages.props

* change working directory

* workingDirectory

* Force the template to use local nuget packages

* Force the template to use local nuget packages

* clean up

* added wait on

* added wait on
2023-11-27 15:18:00 +01:00
Bjarke Berg
04e59e9a9d Fixed a couple of occurrences where scopes was auto-completed while modified db state (#14947)
* Fixed a couple of occurrences where scopes was auto-complated while actually modified the state of the database.

* Added temp ctor to fix boot issue

(cherry picked from commit 41f8f03c2c)
2023-11-15 09:45:23 +01:00
Bjarke Berg
e5de8bf56b Updated nuget packages (#15192) 2023-11-13 14:59:52 +01:00
Kenn Jacobsen
04b05714e5 Add notification state to "final" published notification when publishing with descendants (#14922)
* Revert "V10/bugfix/14543 publish descendants (#14763)"

This reverts commit f750bca453.

* Add notification state to "final" published notification when publishing with descendants
2023-10-05 14:39:00 +02:00
Andreas Zerbst
158cef1692 V10 fixed up failing acceptance test (#14829)
* Updated playwright, our builders, and our helpers

* Updated the use of our testhelper methods, we removed the need for sending umbracoApi through the methods as a parameter since it was unnecessary

* Added a timeout

* Updated successNotifications and added a locator

* Removed timeout from successNotification

* Added additional timeouts and updated old locators which were failing

* Updated locator so it only finds one element

* Removed timeouts and added a waitForTimeout

* Removed timeouts

* Removed timeouts

* Added timeouts

* Updated locator

* Added a timeout

* Updated locators for clicking button

* Changed locator for adding the image, sometimes the old locator would find 2 locators
2023-09-20 12:15:24 +02:00
Sven Geusens
c8e054baa2 V10/feature/pipeline test filters (#14766)
* Add configuration/code to not run certain tests based on variables/release builds

* Applied longrunning testAttribute to the worst offenders (>200ms on my machine)

* Fix yaml notation

* split up windows/non windows test runs

* Added supression for moved tests

* Fix yaml validation issues

* Change yaml string parameter null value to empty string

* Convert empty strings to whitespace strings

* Rename and cleanup some paramater to better reflect why we use them

* Nightly build test

* Change nightly build authentication type

* template paramater fix

* Update nightly pipeline name

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2023-09-12 14:16:27 +02:00
Andreas Zerbst
ca8ac21f4b Added test for checking if settings model contains default value (#14513)
* Added test for checking if a settings model contains default value.
Fixed tests

* Bumped version

* Moved createSliderWithDefaultValue function to our testHelpers. Removed the use of count in test since there was only one
2023-09-11 15:13:08 +02:00
Sven Geusens
f750bca453 V10/bugfix/14543 publish descendants (#14763)
* WIP: Fix publish descendants and related notifications

* Removed related entitities from publish notification

* Fixed root not being saved when publishingWithDescendants

* Updated integrationtests to reflect the update view on when to save the root when its part of a branch

* PR formatting fix

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* PR Cleanup

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Spicing up the codebase with some PR pattern matching

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-09-05 10:14:06 +02:00
Sven Geusens
311d322129 Add code infrastructure to validate file content (#14657)
* Implemented modular architecture for filestream security sanitization with an svg-html example

* 31440: Refactoring, applied to more entry points and removed test analyzer

* 31440 Added Unittests for FileStreamSecurityValidator

* PR fixes and better unittest mock names

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2023-08-21 13:08:26 +02:00
Andreas Zerbst
e7af98027d Updated the name of our Acceptance test project in the pipeline (#14691)
* Updated the name of our Acceptance test project.

The reason is because we want the naming to be clear and concise.

* Changed the name of the e2e pipeline project name for linux

* Updated dll file
2023-08-18 13:36:54 +03:00
Jacob Overgaard
ab836d2326 V10: Find and persist embedded images in rich text (#14546)
* add method to find and persist embedded base64 (data-uri) images in a html string

* use method to find embedded images in the Umbraco.TinyMce and Umbraco.Grid property editors

* rename method to better reflect what it does

* set allowed upload file types for integration tests

* add test for embedded images in Umbraco.TinyMce

* let old ctor call new ctor

* Apply suggestions from code review

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* apply pattern matching

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-07-18 09:17:19 +02:00
Maarten
3f196a9de4 Fix broken CookieAuthenticationRedirect caused by PR #14036 for non-api requests (#14399)
* Fix broken CookieAuthenticationRedirect caused by PR #14036 when not in an API controller

* Added Integration Tests for the MemberAuthorizationFilter

* Fix merge conflict

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
(cherry picked from commit 1d239a30ca)
2023-07-04 11:10:58 +02:00
Nikolaj
b451bb802b Revert "Case-insensitive tag names with SQLite provider (#14012)"
This reverts commit bb7752c483.
2023-06-21 08:45:54 +02:00
Nikolaj Geisle
b37bb517ab V10: Implement varying blocklist indexing (#14287)
* Implement available culture in Interface and base classes

* Add available cultures

* DI localizationService and use it

* Make the new method have default implementation to avoid breaking change

* Create implementations for old method

* Pass available cultures

* Pass localization service

* Create new method that takes available cultures

* Add ILocalizationService to DI

* implement missing method

* Add database for schema test

* Fixed issue with indexes not added correctly to nested types..

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-05-25 08:36:42 +02:00
Mole
999a83995e V10: Add external login provider count to detailed telemetry (#14282)
* Add backoffice external login provider count to telemetry

* Update translation

* Fix integration test
2023-05-24 11:48:56 +02:00
Nikolaj
21c6828b59 Use regex for class 2023-05-04 09:32:32 +02:00
Nikolaj
f7f361239c Try quick fix for test 2023-05-04 09:32:27 +02:00
Nikolaj
05908e2c78 Remove test.only 2023-05-04 09:32:18 +02:00
Jacob Overgaard
3a7ba530a2 Fix: Form elements in thirdparty dashboard views get removed (#14152) 2023-05-03 11:07:33 +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
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
Nikolaj
5828080589 Merge branch 'release/10.5' into v10/dev 2023-04-13 08:47:41 +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
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
Erik-Jan Westendorp
010ea5a2aa IsNullOrWhiteSpace Extension method for HtmlEncodedString (#13747)
* 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)
2023-03-17 08:21:21 +01:00
Sebastiaan Janssen
86247b4578 Revert "Add DefaultLanguage fallback policy for published values (#13814)"
This reverts commit ef4c9c508d.
2023-03-16 11:32:35 +01:00
Ronald Barendse
ef4c9c508d Add DefaultLanguage fallback policy for published values (#13814)
* Add DefaultLanguage fallback

* Implement DefaultLanguage fallback

* Add DefaultLanguage fallback test

(cherry picked from commit 7348171c01)
2023-03-16 11:31:30 +01:00
Warren Buckley
06b89963e4 Fixes #13715 Simple LogViewer queries not returning results (#13748)
* 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)
2023-03-16 10:57:52 +01:00
Elitsa Marinovska
cc76289a36 Fix mapping (#13844) 2023-02-17 09:38:39 +01:00
Bjarke Berg
d9f342bee7 Added missing property index value factories (#13819)
* Added missing PropertyIndexValueFactories, for Block Grid, Block List, Nested Content, Tags and added No-op for image picker, image cropper etc, where the content dont make any sense anyway.

Made it replace for block grid/list, nested content and tags

* Fixed tests

* Ensure raw-fields are the prefix

* Code clean up

* build fix

* Minor cleanup

* Fixed issue with published values / external index

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2023-02-13 14:47:26 +01:00
Bjarke Berg
884793f729 Added fix to maintenance page so it is shown before the content cache is created. (#13767) 2023-02-05 16:47:09 +01:00
Andreas Zerbst
5871fd2097 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 13:52:39 +01:00
Andy Butland
e87196909a Uses URL path separator when generating UDIs for files nested in folders. (#13689) 2023-01-31 09:46:45 +01:00
Nikolaj Geisle
d62e2d731b V10: Dont disable invited users (#13600)
* Dont allow disable user when invited

* Use data instead of selection

* return succesfully disabled users

* Disable disable button when invited

* Add integration tests

* Remove unused usings

* Update src/Umbraco.Web.BackOffice/Controllers/UsersController.cs

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Create DisabledUsersModel

* use data.disabledUsers

* Return OK if no users to be saved

* User disabledUsersModel

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2022-12-20 09:53:54 +01:00
Elitsa Marinovska
dabc7bed9b Enabling an Umbraco admin user to disable 2FA for a member (#13369)
* Fix Invalid authentication code bug

* Add translation keys for 2fa

* Display toggle for 2FA on member

* Add TwoFactorEnabled prop when saving member

* Handle disabling of 2FA

* Fix tests

* Changing obsolete msg

(cherry picked from commit af6b8fc5cb)
2022-12-14 13:50:16 +01:00
Kristian Tolleshaug Mørch
ba53b47b72 Ensure format processor is before quality processor.
(cherry picked from commit 69c725b3ec)
2022-12-14 13:31:08 +01:00
Kenn Jacobsen
dc2701cb5e Handle StringValues in ObjectExtensions.TryConvertTo (#13575) 2022-12-14 11:39:36 +01:00
CyberReiter
d46d5aac0d Use ToArray instead of ToList
(cherry picked from commit f99378c5d3)
2022-12-14 10:47:16 +01:00
patrickdemooij9
481d496641 Use span in StripFileExtension to speed up and use less memory (#13101)
(cherry picked from commit 475cea40a1)
2022-12-14 10:38:04 +01:00
Bjarke Berg
2d564a11b9 Maintenance page when in upgrade state (#13551)
* Added functionality to show maintenance page and fixed issues with showing custom api controllers and 404 page, when umbraco had been in install or upgrade state

* Fixed Tests

* Fixed typo

* Fixed issue with login screen redirecting to website when in upgrade state, instead of backoffice
2022-12-14 08:14:19 +01:00
Justin Neville
f28b4c1279 Fix for issue 13017 - BeginUmbracoForm doesn't work with custom umbraco routes (#13103)
* Fix issue with custom Umbraco routes not working after submitting to a Surface controller

* Added comments

* Fixed breaking changes

* Fixed test by using correct new ctor

* Fixed initializtion of UmbracoRouteValueTransformer due to ambiguous ctor

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-12-06 12:42:06 +01:00
Nikolaj Geisle
caed5bcb13 V11/feature/flaky test work (#13513) (#13527)
* Removed all the DeleteAllContent since I delete the doctypes in the before and after each functions which also deletes the content.

* fixed the test so it selects the specific button!

* I was dumb and forgot to remove the out commented code

* Added additional timeout so the pipeline has more time

* Removed language in settings because it was a duplicate of languages / languages

* Fixed the tests so they now check if each individual language that was created actually exists instead of checking for how many languages there are which could be flaky if another test touching the languages failed

* Bumped version

* Added a better locator for the buttons and increased timeouts

Signed-off-by: Zeegaan <nge@umbraco.dk>

Signed-off-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2022-12-06 11:32:23 +01:00
Jonny Muir
248a0c4f19 Allow indexing variant nodes when not all variants are published - fixes issues 11383. (#12669)
* This fixes issues 11383.
The introduction of the new Examine library caused an unintended consequence that it stopped indexing of nodes with language variants on them when one of the variants was unpublished.

These changes align ValueSetValidationStatus.Filtered to indicate that a node is intended as filtered out of a search, not that parts of its contents had been excluded from the result.

This brings it inline with how it is used in Umbraco.Examine.Lucene/UmbracoContentIndex

Unit tests changed to indicate the intent of ValueSetValidationStatus.Filtered

Change to UmbracoViewPage to make model variable nullable (because the solution wouldn't build otherwise on 2022)

* revert to use explicit type instead of var

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-12-06 08:23:54 +01:00
Nikolaj Geisle
e992da7159 Fix concurrency issue in UmbracoMapper (#13524)
* Add logging to UmbracoMapper

* Add NullLogger to tests

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-12-05 12:25:55 +01:00
Andreas Zerbst
ccab65b12e V10/feature/fixing flaky acceptance test (#13473) 2022-11-30 12:41:16 +01:00
Kenn Jacobsen
63fa6f392c Rollback improvements (#13452)
* Rollback improvements - hide draft version, allow rolling back to last published version

* UX improvements to rollback, revert some overly complex logic in favor of better UX

* Ensure title update when changing rollback version

* Clean up

* Fix rollback playwright text
2022-11-23 10:04:21 +01:00
Søren Kottal
b4115132cd Enable single block mode (#13216)
* Enable single block mode

* Fixes tests, and adds test for single block mode output type

* Update src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Fix breaking change

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-11-16 10:02:06 +01:00