Compare commits

...

1062 Commits

Author SHA1 Message Date
swcs b686dc6362 disable "Add" button in Nested Content config when no available docTypes are left 2019-08-11 14:25:43 +02:00
swcs ab0c4d2700 add+delete anchors in Nested Content config should be <button/> elements 2019-08-11 14:19:09 +02:00
swcs 8b8a8c0ccb display docType alias in Nested Content property editor when necessary 2019-08-11 14:16:54 +02:00
Kenn Jacobsen 2f84e76952 Use mculture in content editor for multilingual content 2019-08-09 16:58:35 +02:00
Kenn Jacobsen 12a30d3ffd Always open the selected content template in infinite editing 2019-08-09 16:56:04 +02:00
Kenn Jacobsen 7e1f90fb3b Clear the content type "common" cache when deleting templates 2019-08-09 16:54:52 +02:00
Kenn Jacobsen feb5567621 Fix the disabled upload button in media picker (#6082) 2019-08-09 16:36:38 +02:00
Rachel Breeze ab3202b560 V8: Accessibility improvements for page name entry (#5760) 2019-08-09 16:25:51 +02:00
Kenn Jacobsen e10ce234db Fix "infinityMode" typo 2019-08-09 15:59:37 +02:00
Shannon 84554101f2 Merge branch 'v8/dev' of https://github.com/umbraco/Umbraco-CMS into v8/dev 2019-08-09 15:54:38 +10:00
Shannon 8a3b2e038c adds note 2019-08-09 15:54:21 +10:00
amitch17 296d7964ae Corrected comments to change usage examples
Corrected usage examples for entityResource.js

My first Umbraco commit! yay!
2019-08-08 18:55:38 +02:00
Steve Megson ed5effd190 Sorting of images in multiple media picker 2019-08-08 16:00:21 +02:00
Kenn Jacobsen 57e58c6cf7 Fix broken button to open content type from create dialog 2019-08-08 10:03:47 +02:00
leekelleher 34e45abcc7 Added constants for Property Editor Groups 2019-08-07 20:59:03 +02:00
Kenn Jacobsen b3497011e8 Make content types with description look ok in the create dialog (#5752) 2019-08-07 20:49:14 +02:00
Søren Gregersen a398881fa1 fix: spelling error in comment :)
infinie error(s) fixed
2019-08-07 20:38:37 +02:00
Sebastiaan Janssen 2cf3a7831c Merge pull request #5999 from kjac/v8-fix-allow-remove-user-start-nodes
V8: Allow removing user start nodes
2019-08-07 20:19:48 +02:00
Gopakumar R 0138091a6c Fix for issue #5816 (#5836) 2019-08-07 20:16:18 +02:00
Kenn Jacobsen 6c0fb2f849 Fix the create context menu overflows introduced with 405e9a79 (#5754) 2019-08-07 19:56:30 +02:00
Benjamin Carleski e495faf83c Fix FIPS compliance, add FIPS tests (#5978) 2019-08-07 19:31:08 +02:00
Sebastiaan Janssen 8721423f40 Merge pull request #6016 from umbraco/v8/fix/5906-support-stored-absolute-media-url
Fix exception when stored media url is already absolute
2019-07-29 14:30:03 +02:00
Rasmus John Pedersen 49b3351c72 Fix exception when stored media url is already absolute 2019-07-29 12:59:29 +02:00
Shannon Deminick faef449750 Merge pull request #6009 from bielu/v8/dev
V8: Value Set builder shouldn't stop indexing when one field is empty in …
2019-07-29 11:36:01 +10:00
arkadiuszbiel 4a24064783 Value Set builder shouldn't stop indexing when one field is empty in value sets 2019-07-27 20:41:15 +01:00
Kenn Jacobsen 0ab84fc443 Allow removing user start nodes 2019-07-25 10:28:16 +02:00
Bjarke Berg fca74ad8d7 Merge pull request #5862 from umbraco/v8/bugfix/5789-PublishedContentQuery-Search
Fixes #5789 - PublishedContentQuery Search always searches on culture
2019-07-24 14:16:32 +02:00
Shannon 7bc7dba86d fixes timing issue 2019-07-24 21:46:19 +10:00
Sebastiaan Janssen ca75a25802 Makes checks a little more robust 2019-07-24 11:33:12 +02:00
Shannon ece31733a9 Merge branch 'v8/dev' of https://github.com/umbraco/Umbraco-CMS into v8/dev 2019-07-24 19:25:48 +10:00
Shannon 28a8027179 removes reference to old packages.umbraco.org 2019-07-24 19:25:32 +10:00
Steve Megson a97604d6c4 Handle CSV values in TagsPropertyEditor 2019-07-24 11:14:00 +02:00
Bjarke Berg 308f929f7b Refactored tests to avoid duplicate code 2019-07-24 11:13:21 +02:00
Shannon c8d7df1515 Merge branch 'v8/bugfix/5789-PublishedContentQuery-Search' of https://github.com/umbraco/Umbraco-CMS into v8/bugfix/5789-PublishedContentQuery-Search 2019-07-24 18:46:48 +10:00
Shannon 2c795662d2 Adds tests for PublishedContentQuery search 2019-07-24 18:46:14 +10:00
Kenn Jacobsen 8a43e3a87e Make sure save options are up to date with the content state 2019-07-24 10:46:00 +02:00
Bjarke Berg 210e43fcb0 Fix for build 2019-07-24 09:53:51 +02:00
Shannon Deminick beb8c7ac7c Update src/Umbraco.Web/PublishedContentQuery.cs
Co-Authored-By: Bjarke Berg <mail@bergmania.dk>
2019-07-24 17:30:29 +10:00
Shannon Deminick 2f8979bbc3 Update src/Umbraco.Web/PublishedContentQuery.cs
Co-Authored-By: Bjarke Berg <mail@bergmania.dk>
2019-07-24 17:29:00 +10:00
Shannon a8ed7f2c17 adds new method 2019-07-23 22:11:02 +10:00
Frans de Jong 1c6bf55e5d GetCurrentLoginStatus()
In the summary of MembershipHelper.GetCurrentLoginStatus() it states that null will be returned when no member is logged in but that isn't the case (anymore?).
2019-07-23 13:02:11 +02:00
Bjarke Berg c246044ac7 Merge pull request #5972 from stevemegson/v8/temp-checkboxlist
Content migration - Include CheckBoxList in ValueListPreValueMigrator
2019-07-23 12:47:13 +02:00
Shannon 5126521d37 Fixes #5789 2019-07-23 19:09:15 +10:00
Shannon 27223738c6 Merge branch 'v8/8.1' into v8/dev
# Conflicts:
#	src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs
2019-07-23 19:05:06 +10:00
Shannon 2faa4defd8 Merge remote-tracking branch 'origin/v7/7.15' into v8/8.1
# Conflicts:
#	src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs
2019-07-23 19:03:14 +10:00
Warren Buckley bb8356d7db Merge pull request #5924 from umbraco/v/bugfix/5035-slot-swap2
Fixes race condition in PublishedSnapshotService and more...
2019-07-23 09:18:44 +01:00
Shannon Deminick 686f6752f3 Merge pull request #5951 from umbraco/v7/hotfix/5921-preview-failing
https://github.com/umbraco/Umbraco-CMS/issues/5921 - AB#1794 - Remove…
2019-07-23 16:58:13 +10:00
Warren Buckley 66ff4d191a Merge pull request #5946 from umbraco/v8/bugfix/5886-fixes-Children
Fixes issue with Children(culture) method
2019-07-22 14:54:49 +01:00
Shannon 21218b0332 Merge remote-tracking branch 'origin/v7/7.15' into v8/8.1
# Conflicts:
#	src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs
#	src/Umbraco.Web.UI.Client/src/views/common/dialogs/linkpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/rte.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/relatedlinks/relatedlinks.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js
2019-07-22 13:59:14 +10:00
Shannon Deminick 23ccdeb2cf Merge pull request #5868 from umbraco/v7/hotfix/5835-AB#1693-add-null-checks-when-using-dataTypeId
Added null checks when *.dataTypeId is used
2019-07-22 13:44:05 +10:00
Shannon 6148ce4e52 oops no es6 support in 7.x 2019-07-22 13:41:26 +10:00
Shannon 06850ed25c Merge branch 'v7/7.15' into v7/hotfix/5835-AB#1693-add-null-checks-when-using-dataTypeId 2019-07-22 13:40:35 +10:00
Shannon 0320a56cb5 Fixes up dataTypeId var declarations 2019-07-22 13:27:51 +10:00
Steve Megson 968463912a Include CheckBoxList in ValueListPreValueMigrator 2019-07-21 14:47:37 +01:00
Warren Buckley b9e44f381b Merge pull request #5923 from umbraco/v8/hotfix/5902-migration-should-not-warn-about-build-in-renamed-data-types
V8: Migration should not warn about build in data types that is handled correct but renamed
2019-07-19 10:56:38 +01:00
Bjarke Berg cd27bb210f https://github.com/umbraco/Umbraco-CMS/issues/5921 - AB#1794 - Remove trashed nodes from sql when building xml for previews 2019-07-19 11:25:33 +02:00
Bjarke Berg 67f680a675 Revert "https://github.com/umbraco/Umbraco-CMS/issues/5921 - AB#1794 - Remove trashed nodes from sql when building xml for previews"
This reverts commit 47c3e3a7
2019-07-19 11:24:01 +02:00
Bjarke Berg 47c3e3a79f https://github.com/umbraco/Umbraco-CMS/issues/5921 - AB#1794 - Remove trashed nodes from sql when building xml for previews 2019-07-19 11:20:31 +02:00
Shannon 02f49a0039 Cherry picks fix for 5894 and makes adjustments 2019-07-19 16:00:42 +10:00
Shannon Deminick 05c6b856f9 Merge pull request #5897 from kjac/v8-fix-media-type-add-property
V8: Fix YSOD when editing media types
2019-07-19 15:57:01 +10:00
Shannon b07df63422 Adds some better notes to the api docs 2019-07-19 15:49:39 +10:00
Shannon 487e45b45b updates note 2019-07-19 15:26:31 +10:00
Shannon 929c84822a Fixes the Children ext method and adds unit tests 2019-07-19 15:18:00 +10:00
Warren Buckley 993f11cd2c Merge pull request #5898 from umbraco/v8/hotfix/5846-AB#1695-Fix-for-migration-of-corrupt-data
V8: Give better exception if a json exception happens doing migration
2019-07-18 13:36:35 +01:00
Warren Buckley 6544b5c272 Update src/Umbraco.Core/Migrations/Upgrade/V_8_1_0/ConvertTinyMceAndGridMediaUrlsToLocalLink.cs
Co-Authored-By: Bjarke Berg <mail@bergmania.dk>
2019-07-18 13:03:14 +01:00
Shannon 817a458334 Merge remote-tracking branch 'origin/v7/7.15' into v8/8.1
# Conflicts:
#	src/SolutionInfo.cs
#	src/Umbraco.Core/Configuration/UmbracoVersion.cs
#	src/Umbraco.Web.UI/packages.config
2019-07-18 16:22:38 +10:00
Shannon f3bfc1ffb2 Puts back UmbracoAntiForgeryAdditionalDataProvider for backwards compat reasons but it is not used 2019-07-18 16:18:11 +10:00
Shannon 3603090421 Fixes race condition in PublishedSnapshotService and more... 2019-07-17 22:51:14 +10:00
Shannon 6fe3089207 Merge branch 'v8/8.1' into v8/dev
# Conflicts:
#	src/SolutionInfo.cs
#	src/Umbraco.Web/HtmlHelperRenderExtensions.cs
#	src/Umbraco.Web/Mvc/HttpUmbracoFormRouteStringException.cs
#	src/Umbraco.Web/Mvc/ValidateUmbracoFormRouteStringAttribute.cs
2019-07-17 22:31:54 +10:00
Bjarke Berg 79159b684d https://github.com/umbraco/Umbraco-CMS/issues/5902
- Fixed issue with migration of Umbraco.Date if it was never saved in v7, the default format was added the time-part.
- Fixed issue with warnings of migrations of build in types, that was renamed between v7 and v8. These are handled correct.
- Added constants for some of the legacy property editor aliases.
2019-07-17 14:30:02 +02:00
Shannon 26d4d056be bumps version 2019-07-17 22:28:06 +10:00
Shannon 6ad28f1103 Merge remote-tracking branch 'origin/v7/7.15' into v8/8.1
# Conflicts:
#	build/NuSpecs/tools/Web.config.install.xdt
#	src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs
#	src/Umbraco.Core/Services/EntityService.cs
#	src/Umbraco.Core/Services/IEntityService.cs
#	src/Umbraco.Tests/Web/Mvc/HtmlHelperExtensionMethodsTests.cs
#	src/Umbraco.Web.UI.Client/src/views/member/member.edit.controller.js
#	src/Umbraco.Web/Controllers/UmbLoginController.cs
#	src/Umbraco.Web/Controllers/UmbLoginStatusController.cs
#	src/Umbraco.Web/Controllers/UmbProfileController.cs
#	src/Umbraco.Web/Controllers/UmbRegisterController.cs
#	src/Umbraco.Web/HtmlHelperRenderExtensions.cs
#	src/Umbraco.Web/Mvc/HttpUmbracoFormRouteStringException.cs
#	src/Umbraco.Web/Mvc/ValidateUmbracoFormRouteStringAttribute.cs
#	src/Umbraco.Web/UmbracoHelper.cs
#	src/Umbraco.Web/WebBootManager.cs
2019-07-17 21:58:33 +10:00
Shannon 89cd655df2 Merge remote-tracking branch 'origin/v7/bugfix/build-without-vs2017' into v7/7.15 2019-07-17 21:48:21 +10:00
Shannon 14c4c4815d bumps version 2019-07-17 21:35:43 +10:00
Shannon bfb69a34ef re-adds back in the serialization overloads for the custom exception, re-adds detailed error messages, adds more documentation. Adds unit tests. 2019-07-17 21:15:18 +10:00
Shannon b675f6252c removes files (should have been part of cherry pick?), fixes logic 2019-07-16 23:07:31 +10:00
Shannon d52420183e Cherry picks ValidateUmbracoFormRouteStringAttribute implementation and fixes up some logic 2019-07-16 23:03:26 +10:00
Shannon 0cbe0b4796 Cherry picks ValidateUmbracoFormRouteStringAttribute implementation 2019-07-16 22:34:34 +10:00
Shannon Deminick 06b136fdf6 Merge pull request #5895 from ronaldbarendse/v8/feature/validate-umbracoformroutestring
Added attribute to validate Umbraco form route strings (ufprt)
2019-07-16 22:01:32 +10:00
Bjarke Berg c6246b5404 Merge remote-tracking branch 'origin/v8/dev' into v8/dev 2019-07-16 13:46:07 +02:00
Bjarke Berg 3062f40ef5 Missing file in project file 2019-07-16 13:43:10 +02:00
Bjarke Berg dcd0d38419 Merge remote-tracking branch 'origin/v8/8.1' into v8/dev 2019-07-16 13:41:30 +02:00
Steve Megson 0feb053e51 Fixes #5852 - TablesForScheduledPublishing 2019-07-16 13:39:09 +02:00
Bjarke Berg c01a8f8f13 Merge pull request #5887 from stevemegson/temp-content-migration
PR fixes 7 -> 8 migration bugs for #5852 and #5864
2019-07-16 13:37:08 +02:00
Bjarke Berg 09c8ae4e7e Fixed null ref exception in related links migrations 2019-07-16 13:36:16 +02:00
Kenn Jacobsen da71a94c39 Use IsCollectionEmpty() as per review 2019-07-16 12:45:27 +02:00
Shannon Deminick f6413af3f4 Merge pull request #5885 from hifi-phil/v8/dev
Change PropertyType.Alias to virtual
2019-07-16 20:31:58 +10:00
skttl 2aaca865e7 changes innerjoin to left join, to allow folders in sql query 2019-07-16 07:26:26 +02:00
Shannon 77dda5a70f Fixes issue during upgrade where umbraco can't clear cdf log files 2019-07-15 14:34:32 +02:00
Bjarke Berg 440e649d6d Merge pull request #5861 from umbraco/v8/bugfix/cdf-upgrade-bug
Fixes issue during upgrade where umbraco can't clear cdf log files
2019-07-15 14:32:19 +02:00
Bjarke Berg f6a8d487cc AB#1695 - https://github.com/umbraco/Umbraco-CMS/issues/5846
Give better exception, if a json exception happens doing migration of grid properties in ConvertTinyMceAndGridMediaUrlsToLocalLink
2019-07-15 13:06:47 +02:00
Warren Buckley 47dcd37d1d Merge pull request #5784 from nathanwoulfe/5768-log-viewer-chart-naming
V8: Make log naming and colors consistent between Log Search and Log Overview
2019-07-15 11:47:20 +01:00
Kenn Jacobsen d60fc63e78 Fix YSOD when editing media types 2019-07-15 12:23:09 +02:00
Ronald Barendse b0c4042e87 Removed UmbracoAntiForgeryAdditionalDataProvider 2019-07-15 10:16:09 +02:00
Shannon da525513a3 Merge remote-tracking branch 'origin/v7/dev' into v8/dev
# Conflicts:
#	build/NuSpecs/tools/Web.config.install.xdt
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/member/member.edit.controller.js
#	src/Umbraco.Web/Editors/EntityController.cs
#	src/Umbraco.Web/UmbracoHelper.cs
2019-07-15 16:18:04 +10:00
Shannon Deminick 2ac5e61e44 Merge pull request #5881 from bjarnef/dev-v7-link-picker-url-anchors
v7: Fix link picker url and anchors
2019-07-15 13:02:47 +10:00
Ronald Barendse 101a8b6c78 Added ValidateUmbracoFormRouteStringAttribute to public controllers 2019-07-14 23:18:21 +02:00
Ronald Barendse f7a10e3a15 Added attribute to validate Umbraco form route strings (ufprt) 2019-07-14 23:18:06 +02:00
Steve Megson 4e0dd728a8 Fixes #5864 - migrate prevalues for Umbraco.DropDown.Flexible 2019-07-14 16:48:33 +01:00
Steve Megson 320ccf8105 Fixes #5852 - TablesForScheduledPublishing 2019-07-14 16:46:01 +01:00
hifi-phil 62f924a757 Change PropertyType.Alias to virtual
When unit testing PropertyType.Alias needs to be virtual to make it mockable. The underlying code on the set triggers IOC logic and makes it hard to test anything that uses Property Types.
2019-07-14 09:45:12 +01:00
Bjarne Fyrstenborg c47a08b553 Add overload for NiceUrl 2019-07-13 16:40:01 +02:00
Bjarne Fyrstenborg de9241bcf5 Add UmbracoHelper overload methods to get url by guid 2019-07-13 14:50:25 +02:00
Bjarne Fyrstenborg 7c03fe3c1f Adjust parameter 2019-07-13 14:49:35 +02:00
Bjarne Fyrstenborg 82eb241119 Add overload method for Udi 2019-07-13 14:49:05 +02:00
Bjarne Fyrstenborg 1073e6257c Adjust comments 2019-07-13 14:48:35 +02:00
Nathan Woulfe bc3e4847fe Merge branch '5768-log-viewer-chart-naming' of https://github.com/nathanwoulfe/umbraco-cms into 5768-log-viewer-chart-naming 2019-07-13 13:50:21 +10:00
Nathan Woulfe 1a7251909c fix empty array - was checking index against empty array, so condition was never met 2019-07-13 13:45:13 +10:00
Warren Buckley 61a18297d9 Make v8/dev now 8.2.0 2019-07-12 13:03:20 +01:00
Warren Buckley bdd413f9ee Merge branch 'v8/dev' into 5768-log-viewer-chart-naming 2019-07-12 12:30:32 +01:00
Bjarke Berg fd8ca35e63 Merge pull request #5869 from umbraco/v8/bugfix/logviewer-error-count
V8: Fixes LogViewer Error Count search result click
2019-07-12 12:56:08 +02:00
Warren Buckley fdd9aee773 Fixes LogViewer Error Count search result clickthrough to include errors & fatal without exception as well 2019-07-12 11:07:15 +01:00
Bjarke Berg 59bf24c461 Added null checks when *.dataTypeId is used 2019-07-12 11:22:31 +02:00
Bjarke Berg 2748c3635d Merge pull request #5863 from umbraco/v7/bugfix/5822-entityservice-overloads
Fixes Change to Entity Service GetByKey isn't breaking in 7.15 #5822
2019-07-12 09:29:45 +02:00
Nathan Woulfe 3c2a92d3b6 map log values into logtypedata array - removes need to add these in the correct order. 2019-07-12 14:21:28 +10:00
Nathan Woulfe cf49e6160a critical => fatal 2019-07-12 14:20:28 +10:00
Shannon 2252db0d55 Fixes 5822 by reinstating optional method overloads of loadBaseType 2019-07-12 13:40:21 +10:00
Shannon ec93030e21 Merge branch 'v8/dev' of https://github.com/umbraco/Umbraco-CMS into v8/dev 2019-07-12 11:23:51 +10:00
Shannon 1d49c8626e Revert "V8: Don't show multiple open menus (take two) (#5609)"
This reverts commit 9ce996cbba.
2019-07-12 11:23:36 +10:00
Shannon 89bb94aa1a Fixes issue during upgrade where umbraco can't clear cdf log files 2019-07-12 10:57:26 +10:00
Warren Buckley 03a4b75176 Ran .\build SetUmbracoVersion 8.1.1 to bump version 2019-07-11 15:11:37 +01:00
Sebastiaan Janssen 943b54dcf7 Update 1_Bug.md 2019-07-11 11:55:01 +02:00
Warren Buckley 39bd18ec1a At some point we have upgraded Serilog.Filters.Expressions package & the signature/method name got changed to ByIncludingOnly() 2019-07-11 10:45:41 +01:00
Claus df896af476 adding build targets package. 2019-07-10 12:58:15 +02:00
Shannon e93ddff46b Merge branch 'nathanwoulfe-temp-5147-grid-reorder' into v8/dev 2019-07-09 11:01:11 +10:00
Nathan Woulfe 3144b51c91 fix behaviour on page load - don't add active class if sticky-bar is in viewport 2019-07-09 10:49:34 +10:00
Nathan Woulfe e92f68d040 improve variable naming 2019-07-09 10:46:29 +10:00
Nathan Woulfe 469054e9b3 No longer need scrollable-container attribute 2019-07-09 10:46:29 +10:00
Nathan Woulfe d17022d87d make it look pretty 2019-07-09 10:46:29 +10:00
Nathan Woulfe 6865629090 use position:sticky and IntersectionObserver instead of element cloning and position:fixed - much simpler. 2019-07-09 10:46:29 +10:00
Shannon a4749f201d Ensures luceneIndexer.WaitForIndexQueueOnShutdown is called even when not in MainDom 2019-07-08 23:03:20 +10:00
Shannon Deminick ad90264ef1 Merge pull request #5695 from linuselander/issue/5218
Enable removal of unpublished content from ExternalIndex
2019-07-08 19:34:25 +10:00
Shannon Deminick 9ba7e7742a Merge pull request #5801 from bielu/v8/dev
Remove last casting to LuceneIndex
2019-07-08 18:39:40 +10:00
arkadiuszbiel 6473f600c7 Remove last casting to LucenIndex 2019-07-08 08:48:49 +01:00
Claus 78735ff349 Merge pull request #5798 from kjac/v8-fix-save-member
V8: Can't save members without resetting their password
2019-07-08 09:29:37 +02:00
Claus 4b605b2580 Merge pull request #5799 from kjac/v7-fix-save-member
V7: Can't save members without resetting their password
2019-07-08 09:28:46 +02:00
Kenn Jacobsen 80d7f1b2c9 Make it possible to save a member without resetting the password 2019-07-07 11:36:26 +02:00
Kenn Jacobsen 1af43498d9 Make it possible to save a member without resetting the password 2019-07-07 11:16:02 +02:00
Nathan Woulfe 6329dfa629 Merge Andy's changes 2019-07-06 07:28:32 +10:00
Sebastiaan Janssen 5ada85df29 Provide the correct assembly redirects 2019-07-05 12:11:03 +02:00
Shannon 015ad64e30 Updates the exception thrown during upgrade to provide some meaningful feedback to the user. 2019-07-05 14:36:33 +10:00
Andy Butland 2cd0173534 Fixed incorrect label for "Fatal" errors on the log viewer pie chart.
Made the log viewer title variable so it either says "Log Overview For Today" or "Log Overview For Selected Time Period" (previously it said the former even if you'd adjusted the dates you were looking at.
Fixed up the selected date period display so the conjunction "to" is used between the dates when the selected time period is changed and querystring is updated.
Minor code tidy-up.
2019-07-04 14:35:06 +02:00
Bjarke Berg 6dbb988903 Refactor to limit to only v7.14.0 - V7.15.* 2019-07-04 11:44:05 +02:00
Bjarke Berg 926acb910e Forces the initial migration state of V7 sites that are allowed to be migrated into v7.14 state. 2019-07-04 11:44:05 +02:00
Nathan Woulfe a0bcfeddcc fix date range formatting on flatpickr - 'to' wasnt displayed after choosing a range 2019-07-04 11:48:02 +10:00
Nathan Woulfe c4b5483d8c make log naming and colors consistent between views 2019-07-04 11:19:10 +10:00
Sebastiaan Janssen 57e3187e3a For some reason this file was not part of the project any more :-( 2019-07-03 22:10:01 +02:00
Bjarke Berg 988d51c4c8 Merge pull request #5767 from umbraco/v8/bugfix/5671-fix-for-different-version-number-in-modelbuilder-models-in-live-mode
V8: Bugfix for Modelsbuilder models with different versions error
2019-07-03 13:43:00 +02:00
Bjarke Berg 4733256ca1 Merge pull request #5772 from umbraco/v8/bugfix/fix-n1-issue
Fixes N+1 Issues caused by the new bypass start nodes changes
2019-07-03 13:15:55 +02:00
Bjarke Berg 4133a1fe76 Refactored the ModelBindingExceptionFilter to also handle InvalidCastException, and also ensure the models are the same type.
Otherwise a infinite loop was introduced, when requesting a wrong model in the view.
Also refactored the why we do the retry from Html to Http headers
2019-07-03 13:14:35 +02:00
Shannon 37bf6fe938 Automatically refresh the page if we encounter a ModelBindingException 2019-07-03 19:15:54 +10:00
Shannon Deminick 31716e574c Update src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs
good catch!

Co-Authored-By: Bjarke Berg <mail@bergmania.dk>
2019-07-03 18:34:11 +10:00
Shannon 126c4cbd46 ensures media is rebuild and adds more notes 2019-07-03 18:25:19 +10:00
Shannon 7cc91f71c2 Fixes pure live mode when changing doc types 2019-07-03 18:11:00 +10:00
Shannon 7c52b9602c Reduce some allocations and in advertent SQL calls along with inadvertent enumeration of the entire cache, adds some notes 2019-07-03 17:43:30 +10:00
Bjarke Berg c5f1cc15fd Refactored dataTypeId when a guid into dataTypeKey 2019-07-03 08:33:30 +02:00
Shannon d089518681 Fixes SQL generation to populate the nodedto object of the datatypedto 2019-07-03 15:40:18 +10:00
Shannon cd6ef35bf9 comments out the fix during investigation - adds some notes 2019-07-03 15:17:51 +10:00
Shannon 47cdc79fcb Merge branch 'v8/dev' into v8/bugfix/5671-fix-for-different-version-number-in-modelbuilder-models-in-live-mode 2019-07-03 13:50:38 +10:00
Shannon f7382255c2 Fixes N+1 Issues caused by the new bypass start nodes changes 2019-07-03 13:16:40 +10:00
Shannon Deminick 2167eada0c Merge pull request #5764 from umbraco/v8/bugfix/fixes-for-bypass-securtiy-after-merge
V8: Bugfixes regarding the Bypass Security feature after merge from v7
2019-07-03 11:27:55 +10:00
Shannon df11935598 Revert and adjusts "Fixes issue when creating DateTypes of type Umbraco.MultiNodeTreePicker with type member, because -1 can't be casted to Udi" 2019-07-03 11:23:25 +10:00
Shannon d3b4b9fe64 fix merge 2019-07-03 11:10:34 +10:00
Shannon 33aff7ff61 Merge branch 'v8/dev' into v8/bugfix/fixes-for-bypass-securtiy-after-merge
# Conflicts:
#	src/Umbraco.Web/Editors/EntityController.cs
2019-07-03 11:04:34 +10:00
Sebastiaan Janssen 4d2c551b79 Merge branch 'v7/dev' into v8/dev 2019-07-02 22:01:34 +02:00
Sebastiaan Janssen 5b7ae7150f Fix weird merge 2019-07-02 21:55:54 +02:00
Sebastiaan Janssen 5bf29a907a Fixes #5206 2019-07-02 21:47:14 +02:00
Bjarke Berg 96d5bdd7b2 https://github.com/umbraco/Umbraco-CMS/issues/5671 - If modelsbuilder is in live mode, we need to clear cache for all document types when at least one is cleared. This is due to modelsbuilder updating all the models to different versions. 2019-07-02 15:26:54 +02:00
Bjarke Berg 7b4023fd5a Fixes issue when creating DateTypes of type Umbraco.MultiNodeTreePicker with type member, because -1 can't be casted to Udi 2019-07-02 13:17:47 +02:00
Bjarke Berg af72729905 Merge remote-tracking branch 'origin/v8/dev' into v8/dev 2019-07-02 13:03:29 +02:00
Claus d5bc54cf6c refixing #4708 - old merge error. 2019-07-02 13:00:50 +02:00
Claus 5625102e2c making EditorValidatorOfT public instead of internal. 2019-07-02 12:42:18 +02:00
Bjarke Berg 66abd7b50c Merge remote-tracking branch 'origin/v8/dev' into v8/dev 2019-07-02 11:31:14 +02:00
Bjarke Berg 2a9bcf0e98 Merge pull request #5763 from umbraco/v7/bugfix/fix-for-null-ref-exception-when-using-member-pickers
V7: Bugfix for Null ref-exception when using member pickers.
2019-07-02 11:20:53 +02:00
Bjarke Berg e6484687e5 Small fixes after v7 to v8 merge regarding the bypass security feature 2019-07-02 11:17:23 +02:00
Shannon 5da1e64bbc Merge branch 'v8/dev' of https://github.com/umbraco/Umbraco-CMS into v8/dev 2019-07-02 19:15:20 +10:00
Shannon 7b0979f9fd Fixes install.ps1 and updates sln to remove old ps1 file 2019-07-02 19:15:04 +10:00
Dave Woestenborghs 1a437c1c6a #5750 - fix outside click directive so it doesn't close dialogues from create action 2019-07-02 11:11:03 +02:00
Bjarke Berg 3c0565e516 Bugfix: Null ref-exception when using member pickers. 2019-07-02 10:56:44 +02:00
Claus 178b1ccf40 Merge pull request #5743 from umbraco/v8/feature/sourcelink-update
V8: Adds in SourceLink Debugging Feature
2019-07-02 10:49:11 +02:00
Shannon Deminick c03cd81c23 Merge pull request #5748 from umbraco/v8/feature/mb-embed-prepare
Prepare MB future
2019-07-02 18:18:07 +10:00
Stephan 3d3647b476 Fix tests 2019-07-02 10:11:51 +02:00
Stephan a4cac670df Merge branch 'v8/dev' into v8/feature/mb-embed-prepare 2019-07-02 09:12:00 +02:00
Shannon c414dd06cc updates package lock 2019-07-02 15:38:17 +10:00
Shannon 4ed746e4ef Fixes tree refreshing when changing users, fixes memory/event leak 2019-07-02 13:37:40 +10:00
Shannon c270d8ecac Merge remote-tracking branch 'origin/v7/dev' into v8/dev
# Conflicts:
#	build/NuSpecs/tools/Web.config.install.xdt
#	src/Umbraco.Core/Constants-DataTypes.cs
#	src/Umbraco.Core/Models/DataTypeDefinition.cs
#	src/Umbraco.Core/Models/DataTypeExtensions.cs
#	src/Umbraco.Core/Models/IDataTypeDefinition.cs
#	src/Umbraco.Core/Models/UmbracoEntity.cs
#	src/Umbraco.Core/Models/UserExtensions.cs
#	src/Umbraco.Core/Persistence/Factories/DataTypeDefinitionFactory.cs
#	src/Umbraco.Core/Persistence/Factories/UmbracoEntityFactory.cs
#	src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs
#	src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs
#	src/Umbraco.Core/Services/ContentService.cs
#	src/Umbraco.Core/Services/DataTypeService.cs
#	src/Umbraco.Core/Services/DateTypeServiceExtensions.cs
#	src/Umbraco.Core/Services/EntityService.cs
#	src/Umbraco.Core/Services/IContentService.cs
#	src/Umbraco.Core/Services/IDataTypeService.cs
#	src/Umbraco.Core/Services/IEntityService.cs
#	src/Umbraco.Core/Services/IRelationService.cs
#	src/Umbraco.Core/Services/Implement/RelationService.cs
#	src/Umbraco.Tests/Models/UmbracoEntityTests.cs
#	src/Umbraco.Tests/Plugins/PluginManagerTests.cs
#	src/Umbraco.Tests/Services/EntityServiceTests.cs
#	src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js
#	src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js
#	src/Umbraco.Web.UI.Client/src/common/resources/media.resource.js
#	src/Umbraco.Web.UI.Client/src/common/services/mediahelper.service.js
#	src/Umbraco.Web.UI.Client/src/common/services/search.service.js
#	src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
#	src/Umbraco.Web.UI.Client/src/views/common/dialogs/linkpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/dialogs/linkpicker.html
#	src/Umbraco.Web.UI.Client/src/views/common/dialogs/mediapicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/dialogs/treepicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/contentpicker/contentpicker.html
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.html
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/rte.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/relatedlinks/relatedlinks.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.prevalues.html
#	src/Umbraco.Web.UI/config/EmbeddedMedia.Release.config
#	src/Umbraco.Web.UI/config/EmbeddedMedia.config
#	src/Umbraco.Web.UI/packages.config
#	src/Umbraco.Web.UI/web.Template.config
#	src/Umbraco.Web/Editors/ContentController.cs
#	src/Umbraco.Web/Editors/EntityController.cs
#	src/Umbraco.Web/Editors/MediaController.cs
#	src/Umbraco.Web/HtmlHelperRenderExtensions.cs
#	src/Umbraco.Web/Models/ContentEditing/ContentPropertyBasic.cs
#	src/Umbraco.Web/Models/Mapping/ContentPropertyBasicConverter.cs
#	src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs
#	src/Umbraco.Web/Models/Mapping/ContentPropertyDtoConverter.cs
#	src/Umbraco.Web/Models/Mapping/ContentPropertyModelMapper.cs
#	src/Umbraco.Web/Models/Mapping/PreValueDisplayResolver.cs
#	src/Umbraco.Web/Mvc/RenderRouteHandler.cs
#	src/Umbraco.Web/PropertyEditors/ContentPicker2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/MediaPicker2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/MultiNodeTreePicker2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/RelatedLinks2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/RichTextPreValueEditor.cs
#	src/Umbraco.Web/Search/UmbracoTreeSearcher.cs
#	src/Umbraco.Web/Security/UmbracoAntiForgeryAdditionalDataProvider.cs
#	src/Umbraco.Web/Trees/ContentTreeController.cs
#	src/Umbraco.Web/Trees/ContentTreeControllerBase.cs
#	src/Umbraco.Web/Trees/MediaTreeController.cs
#	src/Umbraco.Web/Trees/TreeControllerBase.cs
#	src/Umbraco.Web/Trees/TreeQueryStringParameters.cs
#	src/Umbraco.Web/UmbracoHelper.cs
#	src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs
#	src/Umbraco.Web/WebBootManager.cs
#	src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseMediaTree.cs
#	src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseTree.cs
#	src/umbraco.cms/businesslogic/web/Access.cs
2019-07-02 12:24:05 +10:00
Shannon Deminick ade9bb7324 Merge pull request #5741 from umbraco/v8/merge/v715
Merging 7.15 - 8.1
2019-07-02 12:10:03 +10:00
Shannon 4134dd16df adds fixme note 2019-07-02 12:04:58 +10:00
Shannon f81588bb13 fixes search for content picker with ignore start nodes 2019-07-02 11:48:09 +10:00
Shannon 09793a1744 Fixes tests 2019-07-02 11:07:59 +10:00
Shannon ba7cd48b8f Merge remote-tracking branch 'origin/v8/dev' into v8/merge/v715
# Conflicts:
#	src/Umbraco.Core/Constants-DataTypes.cs
#	src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js
2019-07-02 10:49:20 +10:00
Shannon 640d2cedb9 Gets the link and media pickers working in the grid in the rte with ignore start nodes 2019-07-01 21:48:45 +10:00
Shannon 0a6237af04 Gets the multi url picker working with ignore start nodes 2019-07-01 21:13:11 +10:00
Shannon 503183331f gets media picker with ignore start nodes working in rte 2019-07-01 20:59:41 +10:00
Warren Buckley 3effc66b2c Need to update NuSpec to ensure the PDB are getting coppied into the bin when Nuget pacakeg installed into a project 2019-07-01 11:53:22 +01:00
Warren Buckley b64f303537 Mark the release PDB as portable too - the Powershell build uses Release not Debug 2019-07-01 11:20:07 +01:00
Warren Buckley 760f6a1647 Umbraco.Web.UI revert change as no real CS code to F11 into this project 2019-07-01 10:54:29 +01:00
Warren Buckley 0b64e34f05 Add in SourceLink Nuget to Umbraco.ModelsBuilder csproj 2019-07-01 10:19:09 +01:00
Warren Buckley f01be09075 Update sourcelink & set from full to portable 2019-07-01 10:13:31 +01:00
Shannon 1c5ed58074 gets media picker working with ignore user start nodes 2019-07-01 18:54:39 +10:00
Shannon 42d86f147f gets content picker ignore start nodes working, fixes descriptions 2019-07-01 18:23:36 +10:00
Shannon fa4acb255b fixes missing 'var' 2019-07-01 17:09:11 +10:00
Shannon 1885767ef1 Internalizes the new Anchor logic and removes it from the IContentService interface into extensions. 2019-07-01 16:33:09 +10:00
Shannon 80e6880bb7 more manual merging - getting anchors back in tinymce 2019-07-01 16:22:54 +10:00
Adam Nelson fabacd1689 V8: Fixes case issue on metaData.hasChildren in mini list view as well as .toLowerCase() issue on undefined scope.entityTypeFilter.filter (#5744) 2019-07-01 07:48:57 +02:00
Warren Buckley 23a7654cea Merge branch 'v8/dev' into v8/feature/sourcelink-update 2019-06-28 12:37:20 +01:00
Sebastiaan Janssen b2d019bfe1 Merge pull request #5270 from umbraco/v8/bugfix/5268-audit-repository
Bugfix Audit service
2019-06-28 10:53:42 +02:00
Sebastiaan Janssen 9f817bf032 Merge pull request #5742 from umbraco/v8/fix/typeloader-static-fields
Typeloader change fields set by constructor to non static
2019-06-28 10:51:45 +02:00
Rasmus John Pedersen 01c89bd338 Make fields set by constructor non static 2019-06-28 10:11:20 +02:00
Kenn Jacobsen e5956e4955 V8: Don't cast IContent to Content in DocumentRepository (#4611) 2019-06-28 09:19:11 +02:00
Shannon 958c3b147b more manual merging 2019-06-28 15:42:23 +10:00
Shannon 4a33ca99ba More manual merging 2019-06-28 15:03:52 +10:00
Shannon 568835f7e2 manual merging/fixing, project builds now, but need to manually merge the remaining 2019-06-28 13:24:13 +10:00
Shannon 84aa861a5b Merge remote-tracking branch 'origin/v7/dev' into v8/dev - Iniital commit (broken)
# Conflicts:
#	build/NuSpecs/tools/Web.config.install.xdt
#	src/Umbraco.Core/Constants-DataTypes.cs
#	src/Umbraco.Core/Models/DataTypeDefinition.cs
#	src/Umbraco.Core/Models/DataTypeExtensions.cs
#	src/Umbraco.Core/Models/IDataTypeDefinition.cs
#	src/Umbraco.Core/Models/UmbracoEntity.cs
#	src/Umbraco.Core/Models/UserExtensions.cs
#	src/Umbraco.Core/Persistence/Factories/DataTypeDefinitionFactory.cs
#	src/Umbraco.Core/Persistence/Factories/UmbracoEntityFactory.cs
#	src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs
#	src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs
#	src/Umbraco.Core/Services/ContentService.cs
#	src/Umbraco.Core/Services/DataTypeService.cs
#	src/Umbraco.Core/Services/EntityService.cs
#	src/Umbraco.Core/Services/IContentService.cs
#	src/Umbraco.Core/Services/IDataTypeService.cs
#	src/Umbraco.Core/Services/IEntityService.cs
#	src/Umbraco.Core/Services/IRelationService.cs
#	src/Umbraco.Core/Services/Implement/RelationService.cs
#	src/Umbraco.Tests/Models/UmbracoEntityTests.cs
#	src/Umbraco.Tests/Plugins/PluginManagerTests.cs
#	src/Umbraco.Tests/Services/EntityServiceTests.cs
#	src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js
#	src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js
#	src/Umbraco.Web.UI.Client/src/common/resources/media.resource.js
#	src/Umbraco.Web.UI.Client/src/common/services/mediahelper.service.js
#	src/Umbraco.Web.UI.Client/src/common/services/search.service.js
#	src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
#	src/Umbraco.Web.UI.Client/src/views/common/dialogs/linkpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/dialogs/linkpicker.html
#	src/Umbraco.Web.UI.Client/src/views/common/dialogs/mediapicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/dialogs/treepicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/contentpicker/contentpicker.html
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.html
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/rte.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/relatedlinks/relatedlinks.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.prevalues.html
#	src/Umbraco.Web.UI/packages.config
#	src/Umbraco.Web.UI/web.Template.config
#	src/Umbraco.Web/Editors/ContentController.cs
#	src/Umbraco.Web/Editors/EntityController.cs
#	src/Umbraco.Web/Editors/MediaController.cs
#	src/Umbraco.Web/HtmlHelperRenderExtensions.cs
#	src/Umbraco.Web/Models/ContentEditing/ContentPropertyBasic.cs
#	src/Umbraco.Web/Models/Mapping/ContentPropertyBasicConverter.cs
#	src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs
#	src/Umbraco.Web/Models/Mapping/ContentPropertyDtoConverter.cs
#	src/Umbraco.Web/Models/Mapping/ContentPropertyModelMapper.cs
#	src/Umbraco.Web/Models/Mapping/PreValueDisplayResolver.cs
#	src/Umbraco.Web/Mvc/RenderRouteHandler.cs
#	src/Umbraco.Web/PropertyEditors/ContentPicker2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/MediaPicker2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/MultiNodeTreePicker2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/RelatedLinks2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/RichTextPreValueEditor.cs
#	src/Umbraco.Web/Search/UmbracoTreeSearcher.cs
#	src/Umbraco.Web/Security/UmbracoAntiForgeryAdditionalDataProvider.cs
#	src/Umbraco.Web/Trees/ContentTreeController.cs
#	src/Umbraco.Web/Trees/ContentTreeControllerBase.cs
#	src/Umbraco.Web/Trees/MediaTreeController.cs
#	src/Umbraco.Web/Trees/TreeControllerBase.cs
#	src/Umbraco.Web/Trees/TreeQueryStringParameters.cs
#	src/Umbraco.Web/UmbracoHelper.cs
#	src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs
#	src/Umbraco.Web/WebBootManager.cs
#	src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseMediaTree.cs
#	src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseTree.cs
#	src/umbraco.cms/businesslogic/web/Access.cs
2019-06-28 13:03:36 +10:00
leekelleher ee2ebc7d14 ReadOnlyValueController - enabled filters
Previously the code checks if the `config` is an array,
but with how config options are set, this would typically
be an object (dictionary). So the previous code would
never allow a filter to be set.

Now the check is on the object property.
2019-06-27 22:43:14 +02:00
Kenn Jacobsen 9ce996cbba V8: Don't show multiple open menus (take two) (#5609) 2019-06-27 22:42:05 +02:00
leekelleher 580ba79619 Icon Constants consistency
Updated the `Constants.Icons` and replaced the hard-coded strings with
 the const references.
2019-06-27 22:35:29 +02:00
Lee Kelleher fbe184ef6e Prevent deletion of System DataTypes (#5623) 2019-06-27 22:33:19 +02:00
Kenn Jacobsen 2f7bf413ed V8: Make dialogs prompt to discard changes on outside click and ESC (#5740) 2019-06-27 22:27:42 +02:00
Andy Butland 390613c796 Fixed issue with node deletion not removing related records from the public access tables 2019-06-27 22:20:31 +02:00
BatJan b3e3475bf5 Make sure padding is not overwritten by other selectors 2019-06-27 22:19:27 +02:00
Bjarne Fyrstenborg 5333b23c23 v8: Add keyboard support to slider (#5651) 2019-06-27 22:17:31 +02:00
Patrick de Mooij 734086fcf5 temp-5612: Being able to add your own roles/startnodes etc 2019-06-27 22:05:50 +02:00
Morten Bock 12dff9bca3 Reduce size of LocalizedText output. Refactor localizationService to not expose internal dictionary. Refactor controllers to not access dictionary directly. 2019-06-27 21:59:33 +02:00
Kenn Jacobsen f370e738da V8: Use an overlay style dialog for deleting Nested Content ite… (#5357) 2019-06-27 21:34:19 +02:00
Marc Goodson a018ed9e52 V7: Less-Urgent-But-Still-Quite-Important - Add Giphy EmbeddedMedia support (#5736) 2019-06-27 14:27:33 +02:00
Marc Goodson 17f73b88dc Urgent: Add Giphy embed provider support (#5731) 2019-06-27 14:26:36 +02:00
Mike 405e9a79be V8: Make the content tree keyboard accessible (#5729) 2019-06-27 14:07:37 +02:00
Kenn Jacobsen 4d90322842 Fix broken on-outside-click 2019-06-27 13:58:43 +02:00
Kenn Jacobsen a8b5d69be0 Fix confirmation for permissions dialog 2019-06-27 13:56:50 +02:00
Kenn Jacobsen 5ebd90aba5 Make searched media pickable in linkpicker 2019-06-27 13:52:07 +02:00
Sebastiaan Janssen bec909c284 Merge branch 'v8/dev' of https://github.com/umbraco/Umbraco-CMS into v8/dev 2019-06-27 13:48:43 +02:00
Sebastiaan Janssen 46e0b08d65 Merge remote-tracking branch 'origin/v8/bugfix/fix-atroot' into v8/dev 2019-06-27 13:48:16 +02:00
Stephan 7a178be031 Fix getting content AtRoot 2019-06-27 13:29:35 +02:00
Kenn Jacobsen 9d14c9e0b7 Don't explicitly allow deleting the current editor's own content 2019-06-27 13:28:54 +02:00
Warren Buckley ef19633a90 Merge pull request #5134 from umbraco/v8/bugfix/image-cropper-converter
The ImageCropperPropertyValueEditor doesn't convert values in ConvertDbToString correctly
2019-06-27 12:20:43 +01:00
Sebastiaan Janssen 80ffd026f6 Reverts PR #5693 - we need to update the linkpicker search instead to return the correct results for us 2019-06-27 13:18:45 +02:00
Kenn Jacobsen cb7300688c Don't prompt for changes when cancelling empty properties 2019-06-27 12:53:58 +02:00
Kenn Jacobsen 040ebfe9dd Add auto-focus to the default action in overlay dialogs 2019-06-27 12:49:53 +02:00
Stephan 44e567aa34 Prepare MB future
- implement manifest filters to tweak manifests after they have been parsed
- make IEditorValidator public
- stop relying on InternalsVisibleTo Umbraco.ModelsBuilder
2019-06-27 12:42:40 +02:00
Michaël Vanbrabandt 8c5f253b41 V8: Add validation to the Version and UmbracoVersion properties (#5559) 2019-06-27 11:45:48 +02:00
Bjarke Berg 7b99e55148 Merge remote-tracking branch 'origin/v8/dev' into v8/dev 2019-06-27 10:25:12 +02:00
Bjarke Berg ba27eff5cf Added missing using in macro template 2019-06-27 10:24:53 +02:00
Shannon 01d5a12039 when syncing the picker to a path, activate the node 2019-06-27 18:00:45 +10:00
Claus 6d4d26009f Merge pull request #5730 from umbraco/v8/bugfix/umbracomapper-null-property
UmbracoMapper shouldn't throw an exception when trying to map a source prop being null
2019-06-27 08:35:57 +02:00
Bjarke Berg 857a8b163d build fix 2019-06-27 08:03:08 +02:00
Bjarke Berg acbe82f4c8 Merge pull request #5688 from umbraco/v8/bugfix/expand-tree-fix
Feature in v7 based on #2682 that wasn't merged upwards to v8
2019-06-27 07:53:15 +02:00
Shannon fad33a97b2 don't throw JS exception when no MediaPath, instead warn. 2019-06-27 15:47:25 +10:00
Shannon Deminick 3bfd9b71e2 Merge pull request #5312 from umbraco/v8/feature/5170-IPublishedContent
Refactor IPublishedContent
2019-06-27 14:49:42 +10:00
Shannon ef714ac258 Merge remote-tracking branch 'origin/v8/dev' into v8/feature/5170-IPublishedContent
# Conflicts:
#	src/Umbraco.Web/UmbracoHelper.cs
2019-06-27 14:44:33 +10:00
Claus 975816ddd7 UmbracoMapper shouldn't throw an exception when trying to map a source property being null. 2019-06-26 23:10:46 +02:00
Warren Buckley 8831860174 Merge pull request #5728 from umbraco/v8/feature/AB-1085
V8: https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/108…
2019-06-26 14:18:03 +01:00
Bjarke Berg fbf3015de4 Merge remote-tracking branch 'origin/v8/dev' into v8/bugfix/expand-tree-fix
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js
2019-06-26 14:38:19 +02:00
Bjarke Berg be587b2064 https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1085 - Creates a custom IAntiForgeryAdditionalDataProvider that provides and validates custom token data in the request which allows having a custom AF token per form created with BeginUmbracoForm 2019-06-26 14:15:26 +02:00
Stephan 347c2e8238 Upgrade to ModelsBuilder 8.1.0 2019-06-26 12:30:13 +02:00
Warren Buckley f5fde0f19e Merge pull request #5719 from umbraco/v8/bug/5700
Fixes Macro Rendered in Richtext Editor when not configured to do so
2019-06-26 10:07:44 +01:00
Warren Buckley ac586c5207 Merge pull request #5715 from umbraco/v7/bugfix/AB-1085/antiforgery-per-form
Custom IAntiForgeryAdditionalDataProvider implementation
2019-06-26 09:23:32 +01:00
Bjarke Berg 8033931e31 https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1085 - Fixed merge conflict 2019-06-26 09:58:01 +02:00
Bjarke Berg 8e29810598 Merge remote-tracking branch 'origin/v7/dev' into v7/bugfix/AB-1085/antiforgery-per-form 2019-06-26 09:52:44 +02:00
Shannon Deminick be96e2cf08 Merge pull request #5713 from umbraco/v7/feature/AB-1479-Reintroduce-the-bypass-security-option-in-pickers
V7: Reintroduce the bypass security option in pickers
2019-06-26 17:02:17 +10:00
Shannon 534ee67ad2 Merge branch 'v7/feature/AB-1479-Reintroduce-the-bypass-security-option-in-pickers' of https://github.com/umbraco/Umbraco-CMS into v7/feature/AB-1479-Reintroduce-the-bypass-security-option-in-pickers 2019-06-26 16:49:00 +10:00
Shannon 571a3bc257 fixes test 2019-06-26 16:48:39 +10:00
Kenn Jacobsen c12bdaacbf Show the list view paging component even when there are less than 10 pages :) 2019-06-26 08:10:39 +02:00
Bjarke Berg e7a30d0a5d https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1085 - Fixes for gulp build 2019-06-26 07:39:34 +02:00
Shannon a55323176f Updates EntityController to support passing in the dataTypeId for the GetChildren methods and updates the mediapicker to pass along that data 2019-06-26 14:35:36 +10:00
Shannon 1b83e0a87d cleanup 2019-06-26 13:49:45 +10:00
Shannon ca15f340b0 Fixes a bunch of N+1, content/media trees should be much more snappy 2019-06-26 13:32:16 +10:00
Shannon 23b8e1cce8 Removes the remaining part of the EntityRepository that was loading in ALL properties for media which we don't want whatsoever which means some other code is cleaned up/removed 2019-06-26 13:31:04 +10:00
Shannon cf53ba363d Internalizes new methods classes + cleanup 2019-06-26 13:29:05 +10:00
Rasmus Olsen 1c4b262c57 Fix/5489 actions button left margin (#5718) 2019-06-25 18:38:46 +02:00
Kim Rauff Schurmann 90d591e5a8 Fixed validation of fileextension. 2019-06-25 18:21:58 +02:00
Dennis Meinert Pedersen ad121bd758 Highlight when tabbing to umb-toggle 2019-06-25 16:20:16 +02:00
tiffy74 8d67e39e9a secondary menu tab first commit (#5701) 2019-06-25 15:58:56 +02:00
Kenn Jacobsen bd8e344736 Support keyboard input in date/time picker 2019-06-25 15:31:56 +02:00
Claus 014eba971e adding a test for enum mapping between equal enums of different types. 2019-06-25 15:29:32 +02:00
Bjarke Berg 2f309a2fd6 https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1085 - moved the code that adds the ufprt token to the context items, into the constructor of UmbracoForm. Because it needs to happen before the @Html.AntiForgeryToken() is called. The dispose method is too late. 2019-06-25 15:09:37 +02:00
Sebastiaan Janssen a5fb2d2025 Replace visually-hidden in favor of sr-only as discussed in #5664 2019-06-25 14:53:58 +02:00
Rachel Breeze 40311f8590 V8: Accessibility improvements for textbox validation (#5664) 2019-06-25 14:50:40 +02:00
Jannik Anker a0c51fb212 Update da.xml
Misc Danish language "fixes", including some in the new language variants stuff
2019-06-25 14:22:53 +02:00
Stephan b306e41560 NuCache - failover to database when local db fails to load 2019-06-25 13:26:50 +02:00
Bjarke Berg 9f45d41a4a https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1479
- Test fixes
2019-06-25 13:18:15 +02:00
Stephan e8d6daf59a NuCache - be more tolerant when cache is weird 2019-06-25 12:54:16 +02:00
Sebastiaan Janssen a0966be565 Fixes Macro Rendered in Richtext Editor when not configured to do so. #5700 2019-06-25 12:36:03 +02:00
Warren Buckley ba064ba4f5 Merge pull request #5717 from umbraco/v8/bug/5708
V8/bug/5708
2019-06-25 11:34:46 +01:00
Bjarke Berg 1994194656 https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1479
- Review fixes
2019-06-25 11:51:02 +02:00
Sebastiaan Janssen 1da2c00f0a Fix logic & make code easier to follow 2019-06-25 11:41:33 +02:00
Sebastiaan Janssen 71d076aba2 Dashboards not obeying c# access rules #5708
The invisible negator strikes again.
2019-06-25 11:34:26 +02:00
Claus c7ec1deee6 Merge pull request #5703 from kjac/v8-fix-property-settings-focus
V8: Set focus on "Mandatory" after picking a property type
2019-06-25 10:54:38 +02:00
Bjarke Berg 36559b8761 https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1479 - Fix for NullReferenceException 2019-06-25 09:22:56 +02:00
Bjarke Berg 8fe7c5599a Merge remote-tracking branch 'origin/v7/feature/AB-1479-Reintroduce-the-bypass-security-option-in-pickers' into v7/feature/AB-1479-Reintroduce-the-bypass-security-option-in-pickers
# Conflicts:
#	src/Umbraco.Core/Services/ContentService.cs
2019-06-25 09:22:43 +02:00
Bjarke Berg 4dd325cec9 https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1479 - Fix for NullReferenceException 2019-06-25 09:22:30 +02:00
Bjarke Berg d558646d75 https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1479 - Fix for NullReferenceException 2019-06-25 09:21:51 +02:00
Bjarke Berg afac4bb918 https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1479 - missing entityResource injection 2019-06-25 09:18:30 +02:00
Bjarke Berg 0869bf27c7 https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1479 - clean up 2019-06-25 08:26:01 +02:00
Bjarke Berg 383a8617ce https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1479 - Fixed test 2019-06-25 08:19:50 +02:00
Bjarke Berg 3865f4fb50 https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1479 - bugfix - wrong constant used 2019-06-25 08:15:06 +02:00
Shannon Deminick d7d58644e5 Merge pull request #5684 from umbraco/v8/bugfix/AB-1447-Fix-for-update-checker
V8: Fix for update checker error
2019-06-25 15:13:04 +10:00
Shannon 3e74bbfb45 Creates a custom IAntiForgeryAdditionalDataProvider that provides and validates custom token data in the request which allows having a custom AF token per form created with BeginUmbracoForm 2019-06-25 14:35:28 +10:00
Bjarke Berg 966b07ba1c https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1479 - Changed entity service to only return small model with media path. And updated media picker to use entity service when loading data. 2019-06-24 21:12:38 +02:00
Claus 56669b5c84 Merge pull request #5709 from umbraco/v8/bugfix/fix-js-tests-currentuser-auth
Fixes JS Unit Test from commit 9fffdb4
2019-06-24 14:59:50 +02:00
Warren Buckley 60ed6f6b20 Remove snupkg aka newer Symbol nuget packages 2019-06-24 13:18:20 +01:00
Warren Buckley 903c163a57 Merge branch 'v8/bugfix/fix-js-tests-currentuser-auth' into v8/feature/sourcelink-update 2019-06-24 11:31:43 +01:00
Warren Buckley 41b8294ce3 Fixes build as commit 9fffdb4 added a check/call to GetCurrentUser and JS test was failing for unexpected HTTP call to GetCurrentUser 2019-06-24 10:39:47 +01:00
Bjarke Berg d4311fe4ab https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1479 - Replaced client side method to get Auchors with a server side version, and eliminated the use of contentResource in linkPikers 2019-06-24 10:52:35 +02:00
Bjarke Berg eab597a2a8 https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1479 - fix for js linter 2019-06-24 08:58:25 +02:00
Warren Buckley 003ee1a991 Added in Microsoft.SourceLink.GitHub Nuget package 2019-06-23 19:57:43 +01:00
Warren Buckley 601d48277e Update NuSpecs with the XML MetaData for SourceLink 2019-06-23 19:53:57 +01:00
Kenn Jacobsen aed6ef28e6 Fix overflow for specific node permissions 2019-06-23 13:19:18 +02:00
Kenn Jacobsen 339ae32c3d Fix the overflow wrapping for repeatable textstrings 2019-06-23 13:15:14 +02:00
Kenn Jacobsen 7d990a2cbb Enforce max width on numeric inputs 2019-06-23 13:14:33 +02:00
Dennis Adolfi b98812b119 V8/dev missing translations (#5639) 2019-06-23 13:13:42 +02:00
Steve Temple fafd045ed2 V8 Duplicate comments in MediaService (#5636)
* Remove duplicate comments in MediaService

* Remove temp files
2019-06-23 13:12:46 +02:00
Kenn Jacobsen acf63fc74d Fix the back button for media list views 2019-06-23 13:10:52 +02:00
Kenn Jacobsen 85565f2c5f V8: Fix the Nested Content title overflow (#5594) 2019-06-23 13:09:12 +02:00
Chriztian Steinmeier ac6625a80c Handle loginModel.RedirectUrl in Login partial (#5587) 2019-06-23 13:07:43 +02:00
Kenn Jacobsen 6d7b439aec Support negative values for integer and decimal property editors 2019-06-23 13:04:44 +02:00
Andy Butland 9fffdb407a Provided alternative messages for users that do and do not have access to document/media types for when trying to create content or media and no types can be created.
Where they do, provided a link to go to the page where child nodes can be edited.
2019-06-23 13:02:15 +02:00
Kenn Jacobsen 9170061810 V8: Add option to keep the mini profiler active at all times in debug mode (#5560) 2019-06-23 12:40:23 +02:00
Kenn Jacobsen a7da3d741f V8: Add keyboard support for navigating search results (#5500) 2019-06-23 12:30:17 +02:00
Kenn Jacobsen 255bd10296 V8: Use a picker to select allowed types for MNTP (#5506) 2019-06-23 12:25:15 +02:00
Mike 4fca0bb735 V8: Accessibility improvements for top header (#5544) 2019-06-23 12:10:16 +02:00
Kenn Jacobsen f7aaad86c5 Set focus on "Mandatory" after picking a property type when creating a new property 2019-06-21 15:56:36 +02:00
Sebastiaan Janssen 8d12170def Correct NuGet transform for the web.config file in the Views folder 2019-06-21 14:58:58 +02:00
Bjarke Berg d2655a9f2f Merge remote-tracking branch 'origin/v7/dev' into v7/feature/AB-1479-Reintroduce-the-bypass-security-option-in-pickers 2019-06-21 13:59:11 +02:00
Bjarke Berg c4c2082fa9 https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1479 - Only allow "ignoreUserStartNodes" for custom data types and not the default build in. 2019-06-21 13:57:17 +02:00
Sebastiaan Janssen 40d4a8fe6a Modelsbuilder is asking for too old a version of CodeAnalysis, Immutable and Metadata dependencies 2019-06-21 13:32:53 +02:00
Bjarke Berg 4c443b9e2e Merge pull request #5672 from umbraco/v8/feature/0000-avoid-too-long-locking-when-delete-content
Small fixes for backoffice under load.
2019-06-21 11:58:37 +02:00
Bjarke Berg 2898203cb9 https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1479 Bugfixes for the "Bypass security" feature + filter out possible sensitive data 2019-06-21 10:50:23 +02:00
Sebastiaan Janssen 5ebdfc7b1c Previously added a few too many binding redirects to the web.config 2019-06-21 10:22:16 +02:00
Bjarke Berg 31d7e58191 Merge remote-tracking branch 'origin/v7/dev' into v7/feature/AB-1479-Reintroduce-the-bypass-security-option-in-pickers 2019-06-21 10:20:51 +02:00
Sebastiaan Janssen ad4416f663 So apparently Microsoft.CodeAnalysis.CSharp version 1.3.2 contains the dll that has the version 1.3.1.. very confusing 2019-06-21 10:07:45 +02:00
Sebastiaan Janssen b55d2a8a41 Modelsbuilder is asking for too old a version of the CodeAnalysis dependency 2019-06-21 09:56:01 +02:00
Sebastiaan Janssen 17a4799b97 7.15 release needs a few more assembly redirects (#5698)
7.15 release needs a few more assembly redirects
2019-06-21 08:19:35 +02:00
Shannon b0121c44b1 Merge branch 'v8/dev' into v8/feature/5170-IPublishedContent 2019-06-21 16:09:43 +10:00
Shannon be9d8e7da7 null checks on UrlHelperRenderExtensions when requesting image crop urls, if there's a null we'll just return an empty string 2019-06-21 16:08:54 +10:00
Shannon d129989c3d Removes irrelevant GetAbsoluteMediaUrl method now that there is both a media url provider and urls have been refactored in this PR, this was overlooked with the media url provider PR 2019-06-21 16:07:07 +10:00
Shannon 2870ce5e0a a perf change that in ContentCacheRefresher it doesn't iterate payloads if there is no real Id 2019-06-21 15:48:10 +10:00
Shannon da1e2680cb Fixes ContentStore when it's building the cache from sources, adds TODO notes, questions, concerns, etc.... 2019-06-21 15:47:47 +10:00
Shannon cd2ce2486a Fixes debugger display attribute 2019-06-21 15:46:16 +10:00
Shannon 5d4f2ec697 Fixes issue with ImageCropperTemplateExtensions since it wasn't re-mapped to the new method definition 2019-06-21 15:45:12 +10:00
Shannon c2cb85f1cd Merge branch 'v8/dev' into v8/feature/5170-IPublishedContent
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
2019-06-21 15:06:43 +10:00
Bjarke Berg 4df838c20c https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1358 - Changed the ignoreUserStartNodes in public endpoints to the data type id, and then look up the setting 2019-06-20 16:02:42 +02:00
Sebastiaan Janssen 4e44871671 The NuGet packages needs an extra DotNetCompilerPlatform transform to be sure it gets applied as it sometimes didn't
Added SignalR binding redirect for Umbraco Cloud
Added System.Web.Http.WebHost binding redirect for uCommerce
2019-06-20 15:57:31 +02:00
Niels Lyngsø 37d3692cd0 Merge pull request #5694 from kjac/v8-fix-editor-state-comma-dangle
V8: Fix "comma-dangle" gulp build error (editorstate.service.js)
2019-06-20 12:56:31 +02:00
Shannon f4b2ff93fc Fixes how Umbraco Context is injected into DI so that LightInject doesn't try to control it's lifetime. 2019-06-20 19:10:32 +10:00
Shannon 5ea6ebcc66 Revert "Fixes up UmbracoContextFactory to ensure it's not returning a disposed Umbraco context"
This reverts commit fcfb107653.
2019-06-20 17:58:40 +10:00
Shannon f6ac64f705 makes TreeChangeExtensions public 2019-06-20 15:53:25 +10:00
Shannon fcfb107653 Fixes up UmbracoContextFactory to ensure it's not returning a disposed Umbraco context 2019-06-20 15:40:57 +10:00
Linus Elander 7557c584d8 Adjusts conditions for which indexes should be affected when a node is unpublished 2019-06-19 21:41:47 +02:00
Kenn Jacobsen f829bb8023 Fix "comma-dangle" gulp build error 2019-06-19 18:40:42 +02:00
Bjarke Berg 1dd2c1cb91 Revert "Revert "U4 10147 - Bypass User Security option in pickers (#2441)""
This reverts commit 994c6eed
2019-06-19 14:30:44 +02:00
Niels Lyngsø 23702ee4dc Fixes notifications issue for new variant saving, allows "soft redirect" for creating (#5646)
Fixes notifications issue for new variant saving, allows "soft redirect" for creating
2019-06-19 12:34:33 +02:00
Shannon 5c2b0647f3 Gets the feature in v7 based on #2682 that wasn't merged upwards to v8 and found some issues along the way like not filtering the mini list view properly along with not returning the content type alias in the entity controller 2019-06-19 16:42:04 +10:00
Shannon c7a725ad94 Merge remote-tracking branch 'origin/v7/dev' into v8/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js
#	src/Umbraco.Web.UI.Client/src/common/services/tree.service.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.controller.js
2019-06-19 13:38:35 +10:00
Shannon 5c6a9480a6 remove unneeded method 2019-06-19 13:32:26 +10:00
Shannon c1be8e3f00 Merge branch 'v7/dev' of https://github.com/umbraco/Umbraco-CMS into v7/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.controller.js
2019-06-19 13:31:43 +10:00
Shannon d8dbda8e94 Merge branch 'kjac-v7-fix-treepicker-allowed-nodes' into v7/dev 2019-06-19 13:30:33 +10:00
Shannon a0ab7ace07 Makes the treeNodeExpanded event raised during tree syncing 2019-06-19 13:29:54 +10:00
Shannon 7c27189e2e Merge branch 'v7-fix-treepicker-allowed-nodes' of https://github.com/kjac/Umbraco-CMS into kjac-v7-fix-treepicker-allowed-nodes 2019-06-19 13:01:50 +10:00
Shannon 76cbfdb787 ignores a failing test, will need a separate task for that. 2019-06-19 12:31:36 +10:00
Sebastiaan Janssen 56545ad7f1 Revert "Merge branch 'v7/dev' into v8/dev"
This reverts commit 7db0440b5c.

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.prevalues.html
#	src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs
2019-06-18 19:18:48 +02:00
Bjarke Berg 832dc7f4a5 Changed superadmin back to admin again 2019-06-18 18:44:22 +02:00
Warren Buckley 62dc68e7b2 Merge pull request #5401 from umbraco/v8/feature/logviewer-change-time-period
Added support for changing the dates of the log files
2019-06-18 15:09:16 +01:00
Bjarke Berg 348c79d841 Init preflight check 2019-06-18 15:19:27 +02:00
Sebastiaan Janssen 994c6eed50 Revert "U4 10147 - Bypass User Security option in pickers (#2441)"
This reverts commit cc9a7ff942.

# Conflicts:
#	src/Umbraco.Web/Editors/ContentController.cs
#	src/Umbraco.Web/Editors/EntityController.cs
#	src/Umbraco.Web/Search/UmbracoTreeSearcher.cs
2019-06-18 13:07:40 +02:00
Bjarke Berg 9614740410 Added timeout for 2 seconds. Dont make sense to wait longer for this 2019-06-18 11:44:56 +02:00
Stephan 62e6168e03 Revert ContentStore changes - have to find the bug now 2019-06-18 11:36:53 +02:00
Warren Buckley b6d762c279 Merge pull request #5683 from umbraco/v8/bugfix/5600-rte-full-screen
Fixes #5600 Adds fullscreen plugin/command to the RTE and allows it to sit in front of the tree when used
2019-06-18 10:12:03 +01:00
Bjarke Berg ab93c4ff2d clean up 2019-06-18 11:02:43 +02:00
Bjarke Berg 473c39f7c4 Still being able to change date period if the period has too much data 2019-06-18 10:53:00 +02:00
Bjarke Berg 811aea7898 Added missing files 2019-06-18 10:27:56 +02:00
Bjarke Berg 07358eb46d Merge remote-tracking branch 'origin/v8/dev' into v8/feature/logviewer-change-time-period
# Conflicts:
#	src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs
#	src/Umbraco.Web.UI.Client/package-lock.json
2019-06-18 10:20:48 +02:00
Stephan 067af64dff Cleanup ChildrenForAllCultures 2019-06-18 09:46:29 +02:00
Bjarke Berg cb428bb288 https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1447: Catch the SoapException which happends when a timeout occurs on the server. Also change such that this check is only executed for super admins. 2019-06-18 08:11:18 +02:00
Shannon b69c981100 Fixes #5600 Adds fullscreen plugin/command to the RTE and allows it to sit in front of the tree when used 2019-06-18 16:02:36 +10:00
Shannon 1709879b14 Merge remote-tracking branch 'origin/v7/dev' into v8/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
#	src/Umbraco.Web.UI.Client/src/views/member/member.edit.controller.js
#	src/Umbraco.Web.UI.Client/src/views/users/views/user/details.html
2019-06-18 14:15:50 +10:00
Shannon cff5046a9e Merge branch 'kjac-v7-fix-linkpicker-anchor-link-without-url' into v7/dev 2019-06-18 14:09:11 +10:00
Shannon 9f6da2ca4b Merge branch 'v7-fix-linkpicker-anchor-link-without-url' of https://github.com/kjac/Umbraco-CMS into kjac-v7-fix-linkpicker-anchor-link-without-url 2019-06-18 14:08:45 +10:00
Shannon Deminick 0c8b0edcda Merge pull request #5472 from umbraco/v8/feature/5123-rte-data-udi-images
RTE data-udi and image paths
2019-06-18 13:40:20 +10:00
Shannon 68f9e89a32 Merge branch 'v8/dev' into v8/feature/5123-rte-data-udi-images 2019-06-18 13:05:37 +10:00
Shannon fecadeec51 Fixes issue with nucache and rebuilding and fixes ChildrenForAllCultures to deal with unpublished children 2019-06-18 11:57:36 +10:00
Warren Buckley d3b675a213 Merge pull request #5640 from umbraco/v8/feature/0000-dont-mark-default-language
Remove bold from default variant.
2019-06-17 13:39:28 +01:00
Warren Buckley 316ab6becb Merge pull request #5536 from umbraco/v8/bugfix/5345-dragging-rte-in-grid
5345 dragging rte in grid
2019-06-17 13:15:39 +01:00
Bjarke Berg 9a45bda430 Merge pull request #5658 from umbraco/v8/bugfix/3498-EntityService-updates
V8/bugfix/3498 entity service updates
2019-06-17 13:37:58 +02:00
Stephan 7c11943836 Merge remote-tracking branch 'origin/v8/feature/5170-IPublishedContent' into v8/feature/5170-IPublishedContent 2019-06-17 13:24:28 +02:00
Stephan 94d2a5cbad Bugfix published cache and children 2019-06-17 13:03:01 +02:00
Bjarke Berg 99cabe564d Merge pull request #5673 from umbraco/v7/bugfix/5665-non-admin-edit-user-group
V7: Resolved issue where adding non-admin user group editor to group already exists
2019-06-17 09:13:42 +02:00
Shannon b0488d2d94 fixes showing the correct create date on content creation 2019-06-17 16:50:56 +10:00
Bjarke Berg 600c8ebbbf Merge pull request #5670 from AndyButland/defect/5665-non-admin-edit-user-group
V8: Resolved issue where adding non-admin user group editor to group already exists
2019-06-17 08:48:38 +02:00
Shannon 3bf43d7ce3 adds a unit test showing that the SimilarNodeName is broken. 2019-06-17 16:48:35 +10:00
Andy Butland 15b1d35c17 https://github.com/umbraco/Umbraco-CMS/issues/5665: Resolved issue where adding non-admin user group editor to group already exists 2019-06-17 08:43:24 +02:00
Shannon 872db5877f fixes the color of the variant state after publishing and switching to the info tab 2019-06-17 16:33:20 +10:00
Shannon 977c1d9585 fixes JS error when navigating to the content info tab 2019-06-17 16:23:38 +10:00
Bjarke Berg 46f4984add https://umbraco.visualstudio.com/D-Team%20Tracker/_workitems/edit/1357: Fixed issue where too fast change between sections, leads to a wrong tree (The first requested) shown in the menu. 2019-06-17 07:20:11 +02:00
Bjarke Berg e39e132feb Cleaned up, such that we are not in doubt about whether the page variable should have been increased. 2019-06-17 07:19:38 +02:00
Andy Butland 17b479275e Resolved issue where adding non-admin user group editor to group already exists 2019-06-16 12:20:52 +02:00
Shannon 9927ff3c86 removes commented out code 2019-06-13 23:47:48 +10:00
Shannon 81077c2681 Gets the entity service returning a media's url property and allows this to be used in the media picker. 2019-06-13 23:39:36 +10:00
Niels Lyngsø f4593778cb updated package lock 2019-06-13 12:31:29 +02:00
Shannon 16f6bbcbd4 init commit of removing code for entity service that loads in any property data 2019-06-13 18:45:33 +10:00
Warren Buckley c597da8f97 Merge pull request #5423 from umbraco/v7/bugfix/4144-member-password-manual-change-fix
Fixes #4144 - AllowManuallyChangingPassword Regression Fix
2019-06-13 08:53:17 +01:00
Shannon 5775a8b614 fixes if explicitly resetting password 2019-06-13 16:50:15 +10:00
Bjarke Berg cc4a7653e5 Bugfix: Still load trees even when a tree is about to be loaded. But only use the result, if we are still on the correct section. This eliminates the issue where a wrong tree is shown in a section. 2019-06-12 14:31:01 +02:00
Bjarke Berg 5b546cc425 Bugfix: Don't increase the page number in the loop, because the items are moved to another subtree, and therefore is not any longer part of the descendants call. Now we avoid the leak of items when moving to recycle bin. 2019-06-12 10:39:34 +02:00
Sebastiaan Janssen 7f5f304d2d Merge pull request #5642 from umbraco/v8/feature/0000-Gulp-root-folder-as-real-root
Gulp root variable change
2019-06-12 10:25:13 +02:00
Niels Lyngsø 0827ced915 removed App_Plugins 2019-06-12 09:43:59 +02:00
Stephan 9c252131f7 Better exception message in NuCache 2019-06-12 08:55:03 +02:00
Shannon dec042fce4 adds Id to panic exception 2019-06-12 16:28:33 +10:00
Shannon 8eafadc29b adds some more info to panic exceptions 2019-06-12 14:00:28 +10:00
Shannon c5347a97ce Fixes setting the reset flag when allowManuallyChangingPassword is disabled 2019-06-12 12:51:26 +10:00
Shannon 8a19cd4bbc Fixes content blueprint creation 2019-06-12 12:22:14 +10:00
Shannon 2797011fb0 Ensures there's no duplicate notifications and ensures that soft redirects occur for content blueprints too 2019-06-12 11:34:36 +10:00
Shannon 1307ee7ced some cleanup 2019-06-12 10:36:52 +10:00
Shannon e0059f1fad adds notes 2019-06-12 10:35:21 +10:00
Shannon fd5b5b67bf Fixes notifications for invariant content publishing 2019-06-12 10:11:27 +10:00
Shannon 7ba4c2f353 revert overlay.service 2019-06-12 01:04:52 +10:00
Shannon 0381c55ce7 reverts some parts of the content editor 2019-06-12 01:01:09 +10:00
Shannon 88d9e3321c Don't do a redirect on create for content, instead we do a 'soft redirect' which means the URL is updated but the route isn't changed which simplifies re-wiring everything up (will eventually do for all editors) 2019-06-12 00:39:12 +10:00
Niels Lyngsø 05f479a58f changed root folder to only contain the URI for root, not including /Umbraco/ 2019-06-11 14:14:44 +02:00
Shannon d8180604e8 fixes SimilarNodeName 2019-06-11 22:10:53 +10:00
Shannon e6a8ba84aa starts re-binding the variant dialogs on create for the content editor (WIP - will probably revert and try a different approach) 2019-06-11 21:47:45 +10:00
Sebastiaan Janssen 39d93a7ace Spelling mistake IContentFinder function (#5616)
Spelling mistake IContentFinder function
2019-06-11 13:00:27 +02:00
Niels Lyngsø 5ddf21f09f remove bold from lists of language variants 2019-06-11 10:03:04 +02:00
Niels Lyngsø 7b3ab72105 remove bold from default variant. 2019-06-11 09:48:45 +02:00
Shannon 1f64ae4682 Fixes language/variant mapping so it's consistent and by lang name not iso 2019-06-11 17:17:19 +10:00
Shannon 120f4c3096 removes scope.busy callls (legacy old stuff), add ability to preserve editor state between routes, for content we now preserve editor state when redirecting to new content and then rebind some values from that editor state when the editor loads, updates editorstate.service and filemanager.service to manage themselves on route change (decoupling), fixes variant mapper to ensure that the variants are always returned in a deterministic order. 2019-06-11 16:31:32 +10:00
Patrick de Mooij e59d75f4f9 Spelling mistake IContentFinder function 2019-06-07 16:42:53 +02:00
Sebastiaan Janssen e3b2d427a4 Merge branch 'v7/dev' into v8/dev
# Conflicts:
#	build/Modules/Umbraco.Build/Get-UmbracoBuildEnv.ps1
#	build/Modules/Umbraco.Build/Umbraco.Build.psm1
#	build/NuSpecs/UmbracoCms.Core.nuspec
#	build/NuSpecs/UmbracoCms.nuspec
#	src/SQLCE4Umbraco/SqlCE4Umbraco.csproj
#	src/SQLCE4Umbraco/app.config
#	src/SolutionInfo.cs
#	src/Umbraco.Core/Configuration/UmbracoVersion.cs
#	src/Umbraco.Core/app.config
#	src/Umbraco.Core/packages.config
#	src/Umbraco.Tests.Benchmarks/app.config
#	src/Umbraco.Tests.Benchmarks/packages.config
#	src/Umbraco.Tests/App.config
#	src/Umbraco.Tests/Migrations/SqlScripts/SqlResources.Designer.cs
#	src/Umbraco.Tests/Services/Importing/ImportResources.Designer.cs
#	src/Umbraco.Tests/TreesAndSections/ResourceFiles.Designer.cs
#	src/Umbraco.Tests/packages.config
#	src/Umbraco.Web.UI.Client/bower.json
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI/Properties/Settings.Designer.cs
#	src/Umbraco.Web.UI/config/imageprocessor/cache.config
#	src/Umbraco.Web.UI/config/imageprocessor/processing.config
#	src/Umbraco.Web.UI/packages.config
#	src/Umbraco.Web.UI/web.Template.Debug.config
#	src/Umbraco.Web.UI/web.Template.config
#	src/Umbraco.Web/Editors/ContentTypeControllerBase.cs
#	src/Umbraco.Web/Editors/EntityController.cs
#	src/Umbraco.Web/Editors/MediaController.cs
#	src/Umbraco.Web/Mvc/Strings.Designer.cs
#	src/Umbraco.Web/Properties/Settings1.Designer.cs
#	src/Umbraco.Web/Search/UmbracoTreeSearcher.cs
#	src/Umbraco.Web/UI/JavaScript/Resources.Designer.cs
#	src/Umbraco.Web/Web References/org.umbraco.our/Reference.cs
#	src/Umbraco.Web/Web References/org.umbraco.update/Reference.cs
#	src/Umbraco.Web/app.config
#	src/Umbraco.Web/packages.config
#	src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/Resources.Designer.cs
#	src/UmbracoExamine/UmbracoExamine.csproj
#	src/UmbracoExamine/app.config
#	src/UmbracoExamine/packages.config
#	src/umbraco.MacroEngines/Resources/Strings.Designer.cs
#	src/umbraco.MacroEngines/app.config
#	src/umbraco.MacroEngines/packages.config
#	src/umbraco.MacroEngines/umbraco.MacroEngines.csproj
#	src/umbraco.businesslogic/app.config
#	src/umbraco.businesslogic/packages.config
#	src/umbraco.businesslogic/umbraco.businesslogic.csproj
#	src/umbraco.cms/app.config
#	src/umbraco.cms/businesslogic/Packager/FileResources/PackageFiles.Designer.cs
#	src/umbraco.cms/packages.config
#	src/umbraco.cms/umbraco.cms.csproj
#	src/umbraco.controls/TreePicker/BaseTreePickerScripts.Designer.cs
#	src/umbraco.controls/app.config
#	src/umbraco.controls/umbraco.controls.csproj
#	src/umbraco.datalayer/app.config
#	src/umbraco.datalayer/umbraco.datalayer.csproj
#	src/umbraco.editorControls/app.config
#	src/umbraco.editorControls/mediapicker/MediaChooserScripts.Designer.cs
#	src/umbraco.editorControls/umbraco.editorControls.csproj
#	src/umbraco.interfaces/umbraco.interfaces.csproj
#	src/umbraco.providers/app.config
#	src/umbraco.providers/umbraco.providers.csproj
2019-06-07 16:05:44 +02:00
Sebastiaan Janssen 22f54394fb Fix method signatures to prevent breaking changes (just like what I'd already done in v8) 2019-06-07 16:02:03 +02:00
Sebastiaan Janssen 57c368f70d Bumps version to 7.15.0 2019-06-07 14:32:02 +02:00
Stephan 14a056f4f4 Fix and cleanup 2019-06-07 11:15:58 +02:00
Kenn Jacobsen 580de6befe Linkpicker should support anchor links without base URL 2019-06-07 09:03:35 +02:00
Bjarke Berg 0120dc6ea3 https://github.com/umbraco/Umbraco-CMS/issues/5574 - Fixes issue when… (#5575) 2019-06-07 09:01:15 +02:00
Shannon 79cd312912 Fixes message when descendant publishing fails when there is a mix of variant types 2019-06-07 14:20:44 +10:00
Shannon 9b36bc4097 Fixes notifications when publishing fails and warnings are issues - these were not being displayed 2019-06-07 13:13:52 +10:00
Shannon 9f346e6ee2 fixes valServer directive so that JS errors dont' occur on the content tyep editor 2019-06-07 13:01:58 +10:00
Shannon 3ea9504620 Revert "Don't show multiple open menus"
This reverts commit 661246b5f5.
2019-06-07 13:01:13 +10:00
Shannon Deminick 86db972188 Merge pull request #5208 from umbraco/v8/bugfix/5190-invariant-property-validation
Fix for server side validation fails invariant-properties on non-default languages.
2019-06-07 12:16:57 +10:00
Shannon 6d12eea789 Adds unit tests for serverValidationManager and fixes it up to ensure that the correct culture callbacks are called. 2019-06-07 12:16:00 +10:00
Shannon 68174bc7df Merge branch 'v8/dev' into v8/bugfix/5190-invariant-property-validation 2019-06-07 11:21:36 +10:00
Shannon 5ca9600c98 adds comments 2019-06-07 11:01:30 +10:00
Shannon 87b3fb5539 Fixes BulkInsertRecordsSqlServer 2019-06-07 10:18:45 +10:00
Sébastien Sougnez 4be6a48fb2 Update tinymce version to 4.9.4 in v7 (#4703) 2019-06-06 17:42:12 +02:00
Sebastiaan Janssen 53731049de Updates .NET Framework to 4.5.2 and updates dependencies (#3064)
Updates .NET Framework to 4.5.2 and updates dependencies
2019-06-06 17:27:53 +02:00
Stephan 7fd6bfa163 Make IPublishedContent changes less breaking and more friendly 2019-06-06 16:54:00 +02:00
Sebastiaan Janssen 4b2ce522fe Update nuspecs 2019-06-06 15:55:38 +02:00
Sebastiaan Janssen d0eddbb9a2 Update SignalR 2019-06-06 15:38:37 +02:00
Sebastiaan Janssen 938abab9d6 Update assembly redirects 2019-06-06 15:29:32 +02:00
Sebastiaan Janssen 5faa71187d More Owin updates 2019-06-06 15:21:05 +02:00
Sebastiaan Janssen c069f262dc Update MVC, Razor, WebApi and Owin 2019-06-06 14:50:01 +02:00
Shannon Deminick ac79fe7a77 Merge pull request #5576 from umbraco/v8/bugfix/database-factory-fix
Fix UmbracoDatabaseFactory SqlServer detection
2019-06-06 22:46:37 +10:00
Sebastiaan Janssen 9f42e6a607 Update ImageProcessor and Newtonsoft.Json dependencies to the latest version 2019-06-06 14:37:57 +02:00
Shannon 3f8fe334b2 Merge branch 'v8/dev' of https://github.com/umbraco/Umbraco-CMS into v8/dev 2019-06-06 22:35:15 +10:00
Shannon 096004db13 fixes infinite loop issue 2019-06-06 22:34:57 +10:00
Sebastiaan Janssen 202f2d2e27 Fix build for VS2019 (not complete yet) 2019-06-06 13:53:42 +02:00
Sebastiaan Janssen aaab14be3e fix csproj file 2019-06-06 13:48:48 +02:00
Sebastiaan Janssen 1c87176d80 Merge branch 'v7/dev' into pr/3064
# Conflicts:
#	build/NuSpecs/UmbracoCms.Core.nuspec
#	src/Umbraco.Tests/packages.config
#	src/Umbraco.Web.UI/packages.config
#	src/Umbraco.Web/packages.config
#	src/umbraco.MacroEngines/packages.config
2019-06-06 12:50:48 +02:00
Stephan c17dbbe141 Fix merge 2019-06-06 12:16:55 +02:00
Stephan 1dde60a1d5 Merge branch v8/dev into v8/feature/5170-IPublishedContent 2019-06-06 12:12:49 +02:00
Shannon Deminick 04967143d8 Merge pull request #5598 from kjac/v8-fix-content-type-culture-variance
V8: Fix broken culture variance toggle on content type properties
2019-06-06 17:33:17 +10:00
Kenn Jacobsen 70fb48d94a Fix broken culture variance toggle on content type properties 2019-06-06 08:39:21 +02:00
Shannon 760d1d7daa Merge branch 'v8/dev' into v8/bugfix/database-factory-fix 2019-06-06 16:32:24 +10:00
Shannon Deminick 3135353a1a Merge pull request #5597 from kjac/v8-fix-rte-unconfigured-dimensions
V8: Fix JS error when the RTE has unconfigured dimensions
2019-06-06 16:16:07 +10:00
Kenn Jacobsen 1565ff1661 Fix JS error when the RTE has unconfigured dimensions 2019-06-06 08:04:06 +02:00
Sebastiaan Janssen bc55d96cde Merge pull request #5589 from MvdDonk/v8/dev
5588 - Correct location for Visual Studio xml documentation files
2019-06-05 16:17:44 +02:00
Maarten v.d. Donk 3d2379d582 Correct location for Visual Studio xml documentation files (5588) 2019-06-05 11:34:42 +02:00
Shannon Deminick 73e907291b Merge pull request #5568 from umbraco/v8/bugfix/5565-rte-sizing
5565 fix for configuration of TineMCE size
2019-06-05 16:07:55 +10:00
Shannon 49c76c744e Fixes width/height for when in distraction free mode 2019-06-05 16:06:55 +10:00
Shannon 8967061758 fixes semi colons 2019-06-05 15:21:00 +10:00
Niels Lyngsø eff8075102 Merge remote-tracking branch 'origin/v8/dev' into v8/bugfix/5190-invariant-property-validation
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
2019-06-04 14:49:23 +02:00
Stephan 849feb0683 Fix UmbracoDatabaseFactory SqlServer detection 2019-06-04 13:15:25 +02:00
Sebastiaan Janssen a182c9b1ee Updates to latest Examine (#4851)
Updates to latest Examine
2019-06-04 13:06:35 +02:00
Poornima Nayar 17675d389e Toggle color picker labels squeeze spectrum color picker (#5391) 2019-06-03 12:41:27 +02:00
Niels Lyngsø f30aefb614 parse dimensions to configuration of TinyMCE + remove autoresize if height is set. 2019-06-03 12:04:14 +02:00
Sebastiaan Janssen a1722f268c Merge pull request #5400 from poornimanayar/temp-5326
Search shadow-layer should be on top of the user-dialog
2019-06-03 12:00:41 +02:00
Poornima Nayar 864d83f8f7 Introduce a maxlength on the name of the node (#5374) 2019-06-03 11:41:58 +02:00
Bjarke Berg 2f978e96d4 Merge pull request #5467 from umbraco/v8/bugfix/805-migrate-from-7
Tested starterkit both using SqlCE and SqlServer and reviewed the code. Merging in..
2019-06-03 10:59:57 +02:00
Sebastiaan Janssen dccc6238e0 Merge pull request #5558 from FransdeJong/DeleteDictionaryChildren
Added a check for and delete descendants when deleting a dictionary item
2019-06-03 10:21:45 +02:00
Sebastiaan Janssen 0687125343 Merge pull request #5563 from kjac/v8-fix-multiple-open-menus
V8: Don't show multiple open menus
2019-06-03 10:16:02 +02:00
Sebastiaan Janssen de36edfd58 Merge pull request #5566 from bjarnef/dev-v8-rte-startnodes-description
v8: Remove HTML characters in RTE prevalue description
2019-06-03 10:14:35 +02:00
Bjarne Fyrstenborg 2842a56356 Remove html characters in description 2019-06-02 23:03:20 +02:00
Kenn Jacobsen 661246b5f5 Don't show multiple open menus 2019-06-01 21:11:59 +02:00
Frans de Jong 457474ecf9 Added a check for and delete descendants when deleting a dictionary item 2019-06-01 13:07:16 +02:00
Sebastiaan Janssen 5f67b3a9c1 Merge pull request #5458 from tiffy74/issue#5277_13
Issue#5277 13
2019-05-31 20:52:16 +02:00
Sebastiaan Janssen a3547a79e8 Merge pull request #5460 from kjac/v8-fix-rte-load-indicator
V8: Use umb-load-indicator when loading the RTE
2019-05-31 20:49:22 +02:00
Sebastiaan Janssen c6467b355d Merge pull request #5491 from kjac/v8-feature-mntp-single-mode-improvements
V8: MNTP improvements when configured to select only one item
2019-05-31 20:47:41 +02:00
Sebastiaan Janssen e2ef186dd1 Merge pull request #5519 from FransdeJong/Umb-Sections
Updated allowed width for Umb-Section directive
2019-05-31 20:41:39 +02:00
Sebastiaan Janssen 0ccc40bf52 Merge pull request #5522 from kjac/v8-feature-content-type-editor-without-live-editing
V8: Don't apply changes instantly when editing content type properties
2019-05-31 20:39:22 +02:00
Sebastiaan Janssen ebc21a1cc7 V8: Apply nicer log message wrapping (#5274)
V8: Apply nicer log message wrapping
2019-05-31 20:36:00 +02:00
Kenn Jacobsen 30067d92ae V8: Always show content and media search results first (#5309) 2019-05-31 20:29:00 +02:00
Kenn Jacobsen 342f924e8f V8: Fix the link picker anchor list (#5379) 2019-05-31 20:27:15 +02:00
Sebastiaan Janssen ba12efd285 Merge pull request #5358 from kjac/v8-feature-backoffice-localize
V8: Allow localizing content types and properties using language files
2019-05-31 20:15:22 +02:00
Sebastiaan Janssen ed3efe9bee V8: Default nested content item names to the item type name (#5369)
V8: Default nested content item names to the item type name
2019-05-31 20:11:56 +02:00
Sebastiaan Janssen 47a7c08686 Merge pull request #5407 from kjac/v8-fix-users-search-empty-state
V8: Add/fix empty state in users and groups search
2019-05-31 20:08:57 +02:00
Sebastiaan Janssen 5191dbf011 Case insensitive section comparison (#5540)
Case insensitive section comparison
2019-05-31 20:07:26 +02:00
Sebastiaan Janssen 8d9ae085aa Fix bug with multi url picker. (#5408)
Fix bug with multi url picker.
2019-05-31 19:59:30 +02:00
Sebastiaan Janssen 161d6505eb Merge pull request #5414 from electricsheep/v8/bugfix/5404-avatar-cursor
V8: Fix the avatar cursor
2019-05-31 19:42:12 +02:00
Sebastiaan Janssen c292f7ff03 Merge pull request #5424 from electricsheep/v8/bugfix/5292-remove-hsts-preload
V8: Remove preload from HSTS healthcheck
2019-05-31 19:31:19 +02:00
Sebastiaan Janssen 17860fb8c7 Merge pull request #5432 from leekelleher/v8/bugfix/entitycontroller-convert-membertype
Corrected `EntityController.ConvertToObjectType` return type for MemberType
2019-05-31 19:28:01 +02:00
Sebastiaan Janssen eb642dc611 Merge pull request #5434 from bjarnef/patch-2
Fix noPasswordManager name for docs
2019-05-31 19:27:07 +02:00
Sebastiaan Janssen bc99d074a9 Merge pull request #5435 from ArnoldV/temp-5420
5420: v8 Invited user keeps showing as "has not logged in yet"
2019-05-31 19:25:56 +02:00
Kenn Jacobsen d536bebdbe V8: Show loading indicator while the Nested Content editor is loading (#5446) 2019-05-31 19:22:23 +02:00
Sebastiaan Janssen 3639d952d5 Merge pull request #5447 from kjac/v8-fix-nested-content-set-dirty-on-paste
V8: Prompt to save changes after pasting items into Nested Content
2019-05-31 19:19:41 +02:00
Sebastiaan Janssen 7c79cf318e Merge pull request #5450 from Matthew-Wise/5277-27
Login errors are not identified for screen reader users
2019-05-31 19:17:45 +02:00
Sebastiaan Janssen 6ad1607685 Merge pull request #5456 from electricsheep/v8/feature/5443-add-publish-menu-hotkeys
V8/feature/5443 add publish menu hotkeys
2019-05-31 19:15:41 +02:00
Sebastiaan Janssen c1ed2b9f45 Merge pull request #5523 from kjac/v8-fix-tree-node-flickering
V8: Fix the flickering when browsing up and down already loaded trees
2019-05-31 16:42:56 +02:00
Sebastiaan Janssen 2c5eeaeac8 V8: Don't load the breadcrumb twice when editing content (#5454)
V8: Don't load the breadcrumb twice when editing content
2019-05-31 16:41:43 +02:00
Sebastiaan Janssen a74a0c343e Merge pull request #5465 from kjac/v8-feature-content-sort-ux
V8: UX update for content/media sort dialog
2019-05-31 16:40:17 +02:00
Sebastiaan Janssen 4eb897ccff Merge pull request #5477 from electricsheep/v8/bugfix/5443-save-options-not-tabbable
V8: Enable tabbing for save options dropdown
2019-05-31 16:37:58 +02:00
Sebastiaan Janssen 20dc77c330 Merge pull request #5480 from electricsheep/v8/bugfix/4657-fix-view-source-animation
V8: Fix TinyMCE source overlay animation
2019-05-31 16:36:04 +02:00
Sebastiaan Janssen 4c79863130 Merge pull request #5521 from FransdeJong/Issue5038
Fixed form controls being pushed off screen.
2019-05-31 16:25:19 +02:00
Sebastiaan Janssen 9ec95c7aa2 Merge pull request #5520 from kjac/v8-fix-macro-tree-sorting
V8: Sort macros alphabetically
2019-05-31 16:21:29 +02:00
Sebastiaan Janssen 38bfd07883 Merge pull request #5535 from AndyButland/defect/5534-user-no-group-save-notification
V8: Fixes #5534 (saving a user with no groups fails validation, but no message is displayed)
2019-05-31 16:19:01 +02:00
Sebastiaan Janssen ce15b7c7c4 Merge pull request #5548 from kjac/v8-feature-reload-close-context-menu
V8: Automatically hide the context menu after reloading a node
2019-05-31 16:17:41 +02:00
Sebastiaan Janssen b090de3cde Merge pull request #5549 from kjac/v8-fix-remove-reload-for-container-nodes
V8: Don't show "Reload" for list view nodes
2019-05-31 16:16:42 +02:00
Bjarne Fyrstenborg dbd74f5273 v8: Fix listview layout icons (#5405) 2019-05-31 16:15:20 +02:00
Ollie P e87f8b14be Removed reference to adding languages from dictionary item description (#5457) 2019-05-31 16:14:10 +02:00
Sebastiaan Janssen fb14a4987c Merge pull request #5494 from kjac/v8-fix-umbconfirm-cursor
V8: umb-confirm button cursor should be "pointer"
2019-05-31 16:12:14 +02:00
Sebastiaan Janssen a471e7d25e Merge pull request #5553 from kjac/v8-fix-pointer-cursor-for-ng-links
V8: Ensure "pointer" cursor for all links with ng-click
2019-05-31 16:11:23 +02:00
Sebastiaan Janssen fef9248b51 Merge branch 'v7/dev' into v8/dev
# Conflicts:
#	src/Umbraco.Core/Persistence/Repositories/UserRepository.cs
#	src/Umbraco.Web.UI.Client/src/views/common/dialogs/macropicker.html
#	src/Umbraco.Web/Models/Mapping/MemberModelMapper.cs
#	src/Umbraco.Web/Strategies/NotificationsHandler.cs
2019-05-31 11:36:29 +02:00
Kenn Jacobsen a8e2798add Ensure "pointer" cursor for all links with ng-click (even if they have no href) 2019-05-30 21:39:52 +02:00
Sebastiaan Janssen 6af1057ad7 Merge pull request #5508 from Geckex/v7/temp-5507
MemberModelMapper to return member groups ordered alphabetically
2019-05-30 17:38:53 +02:00
Stephan 983144c3f9 Unit-test published content linked-list children 2019-05-29 17:01:12 +02:00
Stephan c451498975 Fix v8/dev merge 2019-05-29 15:13:28 +02:00
Bjarke Berg b366c5da03 Merge remote-tracking branch 'origin/v8/dev' into v8/bugfix/805-migrate-from-7 2019-05-29 10:14:31 +02:00
Stephan 24998425fc Better handling of default constraints 2019-05-29 09:19:29 +02:00
Stephan 8579b5a89b Merge branch 'v8/dev' into v8/feature/5170-IPublishedContent 2019-05-29 08:48:18 +02:00
Mario Lopez 1ad4414026 case insensitive section comparison 2019-05-29 11:39:10 +10:00
Stephan 70e4b7d931 Fix tests 2019-05-28 18:40:44 +02:00
Stephan 49d2a6dbf0 Fix migrations for SqlServer 2019-05-28 17:49:50 +02:00
Niels Lyngsø d52d0819ab remember settings for affected RTEs 2019-05-28 16:08:38 +02:00
Andy Butland 0dedd7b2d4 Show the notification when validation fails following saving a user with no groups assigned 2019-05-28 15:57:03 +02:00
Niels Lyngsø ca25b3199b refactor to use area var 2019-05-28 15:24:02 +02:00
Stephan 457427a5f4 Cleanup logging in DataTypeMigration 2019-05-28 10:58:47 +02:00
Stephan 5046bc019c Cleanup strings in UmbracoPlan 2019-05-28 10:52:04 +02:00
Stephan 187ab9ba46 Better exceptions in MigrationPlan 2019-05-28 10:46:26 +02:00
Stephan 3a813d2d77 Cleanup unknown user for audit events 2019-05-28 10:26:30 +02:00
Kenn Jacobsen 460653d078 Don't show "Reload" for container nodes 2019-05-26 19:06:24 +02:00
Kenn Jacobsen beb9068805 Automatically hide the context menu after reloading a node 2019-05-26 19:05:19 +02:00
Kenn Jacobsen f5a00cc3bd Fix the tree node flickering when browsing up and down already loaded trees. 2019-05-26 13:43:30 +02:00
Frans de Jong 86aef126fd Added float none for viewport up to 768 Larger viewports are not affected 2019-05-25 22:17:19 +02:00
Kenn Jacobsen 0e9d0a5a10 Don't live edit content type properties 2019-05-25 19:08:46 +02:00
Kenn Jacobsen a4f1b433eb Sort macros alphabetically 2019-05-25 10:34:03 +02:00
Frans de Jong 08b386e180 Finetuned Umb-Sections directive to use full space 2019-05-25 10:19:08 +02:00
Sebastiaan Janssen 97ae6165e4 Merge pull request #5511 from ReVoid/patch-1
ng-switch-default directive typo in macropicker.html
2019-05-23 11:19:47 +02:00
Sebastiaan Janssen c4ba0454fc Merge pull request #5488 from bjarnef/dev-v8-fix-overlay-drawer
v8: Fix overlay drawer
2019-05-22 23:02:13 +02:00
Sebastiaan Janssen cf1351b50f v8: Show box shadow when hover user avatar (#5490)
v8: Show box shadow when hover user avatar
2019-05-22 21:02:43 +02:00
Dmitriy 8cdb61195d ng-switch-default typo in macropicker.html
looks like it is just a typo :) fixed
2019-05-22 19:49:07 +03:00
Thomas Poulsen 50c2d574f1 Change MemberModelMapper GetMemberGroupValue to return member groups ordered alphabetically.
- This is used in ContentPropertyDisplay class - for UI purposes only.
2019-05-22 14:13:46 +01:00
Sebastiaan Janssen e3de3f98fd Merge pull request #5396 from kjac/v8-fix-color-picker-label-enabled
V8: Make sure that the color picker labels are always shown
2019-05-22 14:43:17 +02:00
Kenn Jacobsen 7a8a1a3705 Add a bit of a wait to the toggle initialization 2019-05-21 11:48:02 +02:00
Kenn Jacobsen 7707839968 Merge branch 'v8/dev' into v8-fix-color-picker-label-enabled 2019-05-21 11:36:18 +02:00
Sebastiaan Janssen b270db791b Merge pull request #5398 from kjac/v8-fix-rte-codeview-autofocus
V8: Support auto focus on ACE editor and use it for RTE source view
2019-05-21 10:40:04 +02:00
Kenn Jacobsen c6cabf1239 Make sense of the umb-confirm button cursor 2019-05-20 08:11:00 +02:00
Sebastiaan Janssen 0ea4864f24 Merge pull request #5461 from kjac/v8-fix-confirm-discard-esc-key
V8: Disable the escape key in the "unsaved changes" dialog
2019-05-19 10:01:14 +02:00
Kenn Jacobsen f07fcac13d If MNTP is configured to pick max 1 item, don't allow multiselect in the content picker dialog 2019-05-19 08:38:03 +02:00
Kenn Jacobsen e2746604a1 If MNTP is configured to pick max 1 item, convert the value into IPublishedContent instead of IEnumerable<IPublishedContent> 2019-05-19 08:37:33 +02:00
Bjarne Fyrstenborg 21e8a6faf4 Cleanup styles 2019-05-18 14:40:35 +02:00
Bjarne Fyrstenborg 65d8be45a1 Show box shadow when hover user avatar 2019-05-18 14:27:51 +02:00
Bjarne Fyrstenborg 00768fdfa7 Remove empty style 2019-05-18 13:33:43 +02:00
Bjarne Fyrstenborg ee3105009b Add back 100% height to make drawer positioned at bottom in overlays. 2019-05-18 13:33:16 +02:00
Ollie Philpott e9b5225676 Updated view source callback to execute correctly 2019-05-16 15:38:56 +01:00
Stephan 5dbc95a604 Fix StandaloneTests 2019-05-16 14:48:04 +02:00
Bjarke Berg 206f47bf52 Added missing nuget dependencies to the nuspec-file of UmbracoCms.Core 2019-05-16 14:24:09 +02:00
Stephan ea4f1a0f56 Merge branch v8/dev into v8/bugfix/805-migrate-from-7 2019-05-16 13:58:32 +02:00
Ollie Philpott c2046ad173 Fixed formatting 2019-05-16 10:53:03 +01:00
Ollie Philpott f080260396 Enabled tabbing for save options dropdown 2019-05-16 10:42:37 +01:00
Niels Lyngsø 9fac00d91b Fixed documentation mistake 2019-05-16 10:50:24 +02:00
Niels Lyngsø 4456a202e4 Merge remote-tracking branch 'origin/pr_5448' into v8/dev 2019-05-16 10:36:57 +02:00
Niels Lyngsø b503becaf3 Only show if we do have pasteable items. 2019-05-16 10:27:00 +02:00
Niels Lyngsø 5d1da3ada1 normalizing non-existing-culture to "invariant", cause the server sends invariant errors as invariant-culture. 2019-05-16 09:15:57 +02:00
Rasmus John Pedersen 2b84f96836 Don't render data-udi in RTE on frontend 2019-05-16 08:54:57 +02:00
Rasmus John Pedersen 28b669d3a3 Don't add dada-id and rel attributes on media in RTE 2019-05-16 08:48:47 +02:00
Stephan d5e63c0e62 Fix ContentNu cascade rules 2019-05-15 18:27:34 +02:00
Stephan 066a860c1d Fix more PreValues migration + better error reporting 2019-05-15 17:00:05 +02:00
Niels Lyngsø 225688facf fix comment 2019-05-15 16:23:23 +02:00
Niels Lyngsø 8bc28a4d81 clean up 2019-05-15 16:21:38 +02:00
Stephan c0f650436b Fix wording in DatabaseBuilder 2019-05-15 16:17:18 +02:00
Niels Lyngsø e7e74840bc indication if something is wrong in another variant than the current one. 2019-05-15 16:11:01 +02:00
Stephan d16002eb7c Fix KeyValueService to support re-running migrations 2019-05-15 15:34:37 +02:00
Stephan 1a54a24150 Fix DataType and PreValues migrations 2019-05-15 14:21:24 +02:00
Niels Lyngsø ceb1260509 current progress 2019-05-15 08:49:16 +02:00
Kenn Jacobsen 9706a0f76a Remove sort order and add item icons in content and media sort dialogs 2019-05-15 08:32:47 +02:00
Kenn Jacobsen 572dc11995 Disable the escape key in the "confirm discard" dialog 2019-05-14 18:43:57 +02:00
Kenn Jacobsen 12d79f2d08 Use umb-load-indicator when loading the RTE 2019-05-14 17:54:37 +02:00
Tiffany Prosser ef15c247c2 updated styles on focus state on section menu 2019-05-14 14:05:09 +01:00
Tiffany Prosser d255cd115b fixed sections.less focus states on top menu 2019-05-14 13:45:49 +01:00
Rasmus John Pedersen 19e2b1c24e Don't save media paths for images in RTE 2019-05-14 13:35:17 +02:00
Sebastiaan Janssen 1090d54763 Update to the latest caniuse-lite to fix the build
Fixes #5455
2019-05-14 13:32:28 +02:00
Ollie Philpott c0c9f4dfcc Changed publish submenu rendering to allow working hotkeys 2019-05-14 12:21:29 +01:00
Ollie Philpott 61ba78538a Added hotkeys for schedule and publish with descendants 2019-05-14 12:20:58 +01:00
Kenn Jacobsen cb76914a27 Don't load the breadcrumb twice when editing content 2019-05-14 09:09:18 +02:00
Matthew Wise 9b0d16f0ad Added aria label for validation messages on login 2019-05-11 17:31:37 +01:00
Kenn Jacobsen d9027e04f3 Hide "Create new" header in Nested Content create item dialog if all items are filtered out 2019-05-10 21:58:55 +02:00
Kenn Jacobsen 3377888219 Prompt to save changes after pasting items into Nested Content 2019-05-10 21:45:06 +02:00
Stephan 0b924f75d4 Fix migrations 2019-05-10 10:14:15 +02:00
Stephan 301b16a036 Fix user for v7 migration 2019-05-10 10:14:15 +02:00
Stephan 919fb79db9 Fix migrations 2019-05-10 10:14:15 +02:00
Stephan ba9aa49b91 Fix user for v7 migration 2019-05-10 10:14:14 +02:00
Stephan 7fed43cc68 Fix migration tooling 2019-05-10 10:14:14 +02:00
Stephan a1828fec51 Fix migrations 2019-05-10 10:14:09 +02:00
Shannon Deminick a43359e440 Merge pull request #5272 from umbraco/v8/spike/api-docs
Regenerating API docs
2019-05-10 13:53:37 +10:00
Shannon 8fce680430 removes unused line, updates gitignore 2019-05-10 13:07:06 +10:00
Shannon 35645672ae Ensures the reset flag is set for users when the legacy user membership provider setting allowManuallyChangingPassword is used 2019-05-10 02:00:45 +10:00
Shannon f952877d04 ensures that the reset flag is passed to the server when an admin is changing a members password 2019-05-10 01:48:11 +10:00
Warren Buckley 1815112ae7 Merge pull request #5353 from umbraco/v8/feature/ux-copy-paste-service-for-nested-content
V8: ClipboardService + implementation for nested content
2019-05-09 15:42:30 +01:00
Niels Lyngsø 66d12ddab2 fix spelling 2019-05-09 15:30:07 +02:00
Niels Lyngsø 2a592bfe8c remove comments 2019-05-09 15:30:01 +02:00
Shannon Deminick 3bf5160895 Merge pull request #5412 from umbraco/v8/bugfix/5131-remember-focus-for-search
Remember focus from before search opened + unbind shortcuts when backdrop is open
2019-05-09 23:08:41 +10:00
Niels Lyngsø 041fdc40e7 using localStorageService + applied further documentation 2019-05-09 15:02:22 +02:00
Niels Lyngsø 9c599868cc documentation for truncate fitler + only space between dots and words in wordwise mode. 2019-05-09 14:38:13 +02:00
Warren Buckley ac52960938 Merge pull request #5389 from umbraco/v8/feature/ui-improve-focus-state-of-umb-form-check
V8 improved focus state of umb-form-check inputs
2019-05-09 10:39:29 +01:00
Warren Buckley 3995c7c521 Merge pull request #5226 from umbraco/v8/bugfix/ui-sharpen-look-of-umb-tags
Accessibility and UI update of umb-tags
2019-05-09 10:13:49 +01:00
Arnold Visser 62a6a4ec92 5420: v8 Invited user keeps showing as "has not logged in yet" 2019-05-09 10:31:44 +02:00
Bjarne Fyrstenborg 943e050493 Fix noPasswordManager name for docs
Fix `noPasswordManager` for documentation.
https://our.umbraco.com/apidocs/v8/ui/#/api/umbraco.directives.directive:no-password-manager
2019-05-09 09:45:29 +02:00
leekelleher e958ca6f89 Fixed EntityController.ConvertToObjectType (for MemberType)
When the `entityType` was "MemberType", it would return the "MediaType" object-type.
2019-05-09 07:21:18 +01:00
Niels Lyngsø b952156027 corrected documentation 2019-05-08 15:10:46 +02:00
Niels Lyngsø 4c23d7fec9 removed properties, replaced with a getter method. 2019-05-08 15:09:01 +02:00
elitsa 3d80d511a4 Adding a parameter for enabling docfx into the script. 2019-05-08 14:27:44 +02:00
Ollie Philpott 0a752c8985 Updated hsts description from days to weeks 2019-05-08 11:57:03 +01:00
Ollie Philpott b6ad19ccad Corrected hsts max age description 2019-05-08 11:12:09 +01:00
Ollie Philpott bea1d35ebf Updated hsts urls 2019-05-08 11:11:47 +01:00
elitsa fc0f996500 Excluding no longer needed paths. 2019-05-08 12:11:06 +02:00
Ollie Philpott dae8802c50 Removed preload from descriptions 2019-05-08 11:11:01 +01:00
Ollie Philpott 58cdff1d71 Removed preload from HSTS header 2019-05-08 11:09:45 +01:00
Warren Buckley d69a978870 Fixes #4144 - Adds code back for allowing password changes without old password, that was removed in b029215933 2019-05-08 10:52:27 +01:00
Rasmus John Pedersen 16b88ca2ff Merge pull request #5419 from kjac/v8-fix-convert-media-urls-migration
V8: Fix duplicate alias exception in "convert media URLs" migration
2019-05-08 11:06:29 +02:00
Rasmus John Pedersen 6cf82669fb Update media urls migration to only fetch/update needed fields from db 2019-05-08 10:52:05 +02:00
Shannon 93bc2dc95b fixes some null checks 2019-05-08 17:48:54 +10:00
Shannon 1bcf40402c Merge branch 'v8/dev' into v8/bugfix/5190-invariant-property-validation
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
2019-05-08 16:53:21 +10:00
Shannon 7b101f0b9e Fixes duplicate error messages per key in ModelState 2019-05-08 16:52:25 +10:00
Shannon dad3f31f86 merged 2019-05-08 16:51:23 +10:00
Kenn Jacobsen 6baea68a7d Fix duplicate alias exception in "convert media URLs" migration 2019-05-08 07:53:11 +02:00
Stephan 7cd31ce970 Fix TourController during upgrade 2019-05-07 14:58:05 +02:00
Stephan 54a8796d51 Cleanup migration plan, supports 7.14.0 2019-05-07 14:58:05 +02:00
Ollie Philpott e091987f0f Added hash to user profile href and reordered attributes 2019-05-07 11:57:35 +01:00
Niels Lyngsø e906808a9b unbind keyboard shortcuts for editors when backdrop is active 2019-05-07 10:59:09 +02:00
Niels Lyngsø c4dbb90d10 remember focus from before opening search 2019-05-07 10:46:52 +02:00
Shannon ef24c2e2f2 Fixes a migration syntax 2019-05-07 18:33:15 +10:00
Niels Lyngsø 4b55f99493 rename copy.service to clipboard.service 2019-05-07 09:08:32 +02:00
Shannon Deminick 3332e93d4c Merge pull request #5375 from umbraco/v8/feature/5373-make-async-file-logging-possible-with-serilog
V8: Make async file logging possible with serilog
2019-05-07 17:06:01 +10:00
Shannon Deminick ed88ce8ae2 Merge pull request #5209 from umbraco/v8/feature/4940-save-media-reference-instead-of-media-url
Save media reference instead of media url
2019-05-07 16:33:30 +10:00
Bjarke Berg 96cd42b316 #5373 - Removed configuration options that we don't want to support. The other options can be archived using the original file sink. 2019-05-07 08:25:43 +02:00
Shannon 2e7aa11211 Adds TODO, removes the data-udi or data-id attribute from inserted links 2019-05-07 15:47:40 +10:00
Kenn Jacobsen f07b9da2ef Add line wrap to RTE code editor 2019-05-06 14:57:18 +02:00
Niels Lyngsø 4c1129e944 added missing documentation 2019-05-06 14:30:23 +02:00
Niels Lyngsø 74cbff5ee5 minor rename 2019-05-06 14:27:15 +02:00
Niels Lyngsø bfdeb6c987 requires alias to be parsed in copy method + minor renaming 2019-05-06 14:23:25 +02:00
Niels Lyngsø 07f4295810 rename copyService to clipboardService 2019-05-06 14:18:15 +02:00
Thomas Pralong 60a3cdc5ab Fix bug with multi url picker. Would display the wrong language tree in
the link picker dialog
2019-05-06 10:47:33 +02:00
Shannon Deminick 74be040298 Merge pull request #5390 from umbraco/v8/bugfix/ui-2fa-login-view
Add back the ability to use a custom 2-factor auth screen
2019-05-06 16:23:18 +10:00
Sebastiaan Janssen c03a4d978b Use int.MinValue instead of calculating from SuperUserId 2019-05-06 08:22:03 +02:00
Shannon 64eff0ba0f adds serilog xdt file 2019-05-06 15:51:28 +10:00
Kenn Jacobsen 03006d7698 Add empty state to groups search result 2019-05-05 19:00:36 +02:00
Kenn Jacobsen 8344372ae2 Fix the empty state for User search 2019-05-05 18:40:10 +02:00
Bjarke Berg d52f6b5810 Added support for changing the dates of the log files 2019-05-03 14:56:44 +02:00
Poornima Nayar 4fa07389dd Search shadow-layer should be on top of the user-dialog 2019-05-03 13:07:05 +01:00
Kenn Jacobsen a056c273de Support auto focus on ACE editor and use it for RTE code view 2019-05-03 11:17:15 +02:00
Bjarke Berg f81fd8f35f #5373 - Handle the serilog fallback pattern in log viewer. The fallback pattern is that a "_NNN" is added to the file name before the file extension, if the file is locked when serilog needs to write to it. 2019-05-03 09:41:26 +02:00
Kenn Jacobsen a6136c18bb Make sure that the color picker labels are always shown 2019-05-03 09:01:41 +02:00
Bjarke Berg 0222f929df #5373 - Changed the logging to be buffered 2019-05-03 08:39:01 +02:00
Shannon Deminick f34b2edb08 Merge pull request #5371 from umbraco/v8/bugfix/remove-old-doc
Removing a no longer relevant section
2019-05-03 13:16:28 +10:00
Sebastiaan Janssen e5839a89cd Fixes references to the "SuperUser" which used to have user Id 0, but now has userId -1 2019-05-02 14:56:12 +02:00
Sebastiaan Janssen 503d6d0265 Make the callback do something and cleanup code a little bit to limit it to only what we actually need 2019-05-02 14:44:33 +02:00
Bjarke Berg 6adec17b26 #5236 - Added options to set (and set default as) the log file is closed after each log event 2019-05-02 14:19:48 +02:00
Niels Lyngsø 3a5538730b only remove gray border when checked. 2019-05-02 13:32:16 +02:00
Niels Lyngsø fe3c1bc089 remove console.log 2019-05-02 13:25:19 +02:00
Niels Lyngsø 8031562ea2 better focus state 2019-05-02 10:54:59 +02:00
Sebastiaan Janssen 4881fb76e4 Merge pull request #5387 from umbraco/v8/bugfix/ui-umb-button-spacing
Added margin-left: 5px; to achieve the needed whitespace, couldn't figu…
2019-05-02 10:29:57 +02:00
Niels Lyngsø e9b06701cc Merge remote-tracking branch 'origin/v8/dev' into v8/feature/ux-copy-paste-service-for-nested-content 2019-05-02 10:10:48 +02:00
Niels Lyngsø 496d5d7791 added margin-left 5px; to achive the needed whitespace, could'nt figure out how it had been done before. 2019-05-02 10:01:16 +02:00
Marc Goodson b92fbffd7c Remove the Link to the out-of-date editors manual
Editors manual is for v7.1
2019-05-02 07:56:44 +02:00
Bjarke Berg 29b4da4dca #5373 - Disposes the logger on application end if disposable and implementes the CloseAndFlush in the dispose method of SerilogLogger 2019-05-01 15:50:43 +02:00
Elitsa Marinovska 6cd77df1ad Updating the base link 2019-05-01 15:30:58 +02:00
Elitsa Marinovska adf762bdf8 Integrate docs script with the main build script 2019-05-01 15:25:47 +02:00
Elitsa Marinovska 6b17248f64 Updating base link 2019-05-01 15:22:10 +02:00
Bjarke Berg a5684f867a #5373 - Added custom extension method to configure the file serilog file sink to be wrapped in the async sink 2019-05-01 15:15:29 +02:00
Niels Lyngsø e2730f2b66 use vm.login and vm.password, not parsing it. 2019-05-01 14:36:51 +02:00
Niels Lyngsø b4368666ca return to login-view on submit 2019-05-01 14:31:26 +02:00
Niels Lyngsø b60fe9cc0a use external view 2019-05-01 13:56:34 +02:00
Stephan 33b857d2c6 Merge branch 'v8/dev' into v8/feature/5170-IPublishedContent 2019-05-01 13:53:13 +02:00
Niels Lyngsø 3aabe424a8 example of 2fa login view 2019-05-01 13:44:18 +02:00
Elitsa Marinovska 9c667414bc Removing a no longer relevant section 2019-05-01 13:36:34 +02:00
Niels Lyngsø 5d5fa3fac8 changed localstorage key to umbCopyService 2019-05-01 10:14:33 +02:00
Niels Lyngsø d23f25beba finishing requestDeleteNode 2019-05-01 10:02:43 +02:00
Niels Lyngsø c0ad64d259 Merge remote-tracking branch 'origin/v8/dev' into v8/feature/ux-copy-paste-service-for-nested-content 2019-05-01 09:57:59 +02:00
Niels Lyngsø 6802716cf1 use requestDeleteNode 2019-05-01 09:57:11 +02:00
Niels Lyngsø 23a27c3519 adding paste feature + cleaning css 2019-05-01 09:40:38 +02:00
Rasmus John Pedersen 0e636b4ce1 Set href to # if url can't be resolved 2019-05-01 09:20:40 +02:00
Kenn Jacobsen 2bdbd86787 Default nested content item names to the content type name if there are multiple content item types to choose from 2019-05-01 09:10:09 +02:00
Rasmus John Pedersen f00a230d12 Merge branch 'v8/dev' into v8/feature/4940-save-media-reference-instead-of-media-url 2019-05-01 08:55:55 +02:00
Shannon Deminick 009e373178 Merge pull request #5354 from umbraco/v8/feature/5350-fluent-type-collection
Make TypeCollectionBuilderBase fluent
2019-05-01 16:45:00 +10:00
Shannon Deminick 3c6d3280d8 Merge pull request #5266 from umbraco/v8/bugfix/5187-mapper-issue
Fix mapper concurrency issue
2019-05-01 15:25:54 +10:00
Callum Whyte 43d84a37a3 Pointing parent doctype links to correct edit pages in doctype builder
Links to parent doctype in doctype builder go to the wrong place
2019-04-30 22:20:30 +02:00
Kenn Jacobsen 3d86b08e31 Send delete notifications when content is moved to trash 2019-04-30 22:19:38 +02:00
shane Prendergast 264958f097 #5277 Adding correct button element,styling to remove default styles 2019-04-30 22:18:59 +02:00
Kenn Jacobsen 99dedac375 Vertically center the button carets in the grid RTE 2019-04-30 22:17:29 +02:00
Kenn Jacobsen 078a7d5679 Fix the active state for nested content in nested content 2019-04-30 22:16:30 +02:00
matthew-hair 5cef71e4e6 fixed typos in ClearLoginSessions queries 2019-04-30 22:11:07 +02:00
matthew-hair fe7b114083 fix for umbracoUserLogin not pruned
Signed-off-by: matthew-hair <matthew.hair@sedgwick.gov>
2019-04-30 22:11:07 +02:00
Kenn Jacobsen 1df2cf5935 Fix info button icon color 2019-04-30 22:08:09 +02:00
Kenn Jacobsen 86c56ae844 Make sure to use the specified content template name when creating content templates from content 2019-04-30 22:05:00 +02:00
Sebastiaan Janssen 16322bed31 Merge pull request #4784 from kjac/v8-fix-content-template-mixed-variance
V8: Handle mixed variance when creating content templates from content
2019-04-30 22:04:21 +02:00
Sebastiaan Janssen 044decc0dc v8: Fix table cells collapsing when sorting doctypes in Nested Content (#4832) 2019-04-30 22:00:35 +02:00
Sebastiaan Janssen b9482fc867 Merge branch 'v8/dev' into pr_4832 2019-04-30 21:59:50 +02:00
Kenn Jacobsen 4d8e5e1416 Make sure to hide the member types when creating a new member 2019-04-30 21:56:00 +02:00
Samuel Butler 958c8b1214 Umbraco installer double-encodes connection string password fix (#4820) 2019-04-30 21:54:35 +02:00
Kenn Jacobsen d04b967fe6 V8: Hide "umbContent" app if the content has no properties (#4840) 2019-04-30 21:34:00 +02:00
Kenn Jacobsen 6bfcc7bb34 Don't "Create matching template" before the content type is created 2019-04-30 21:25:46 +02:00
Kenn Jacobsen 6274a08a4f Don't allow opening an uncreated template 2019-04-30 21:24:52 +02:00
Kenn Jacobsen 4ebfd8ca37 Remove accordion group behavior from media editing 2019-04-30 21:23:40 +02:00
Kenn Jacobsen 1370894b38 Remove accordion group behavior from member editing 2019-04-30 21:23:16 +02:00
Kenn Jacobsen c5f1d2d885 Use standard pickers in MNTP config 2019-04-30 21:22:14 +02:00
Kenn Jacobsen 4df63c7f04 V8: Save the slider default values on the model if no value is set (#4931) 2019-04-30 21:19:34 +02:00
Marc Goodson a822e18719 Patch/update published content request comments (#4945) 2019-04-30 21:13:59 +02:00
Matt Darby 1605b6f909 Adjust naming in Nested Content configuration to fit ElementType (#4946) 2019-04-30 21:08:49 +02:00
Kenn Jacobsen 5e8d73cd20 V8: Add tooltip/title to unselectable items in MNTP (#4964) 2019-04-30 20:57:28 +02:00
Bjarne Fyrstenborg f05915ef08 v8: Fix package download (#4968) 2019-04-30 20:47:37 +02:00
Bjarne Fyrstenborg 5fd423dbb6 Increase z-index of .umb-editor-footer so dropup is above grid editor hover overlay and doctype inherited label. 2019-04-30 20:45:30 +02:00
Kenn Jacobsen 1758d0cd1a Fix glitch in umb-checkbox background 2019-04-30 20:43:15 +02:00
Kenn Jacobsen d698aa56d0 Use umb-checkbox in the delete mediatype dialog 2019-04-30 20:41:07 +02:00
Kenn Jacobsen 0478a37b00 Use umb-checkbox in the delete datatype dialog 2019-04-30 20:40:20 +02:00
Kenn Jacobsen 6def4d6248 Use umb-checkbox in the delete membertype dialog 2019-04-30 20:39:38 +02:00
Kenn Jacobsen 2835da8e96 Use umb-checkbox for "open in new window" in the link picker 2019-04-30 20:37:45 +02:00
Sebastiaan Janssen f895900ec5 Merge branch 'v7/dev' into v8/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
2019-04-30 20:36:45 +02:00
Kenn Jacobsen 21e91ac4e1 RTE: Don't assume "mailto:" protocol in links with "@" 2019-04-30 20:34:26 +02:00
Anders Bjerner ecc7a3b96e Added parameters to the docs for specifying an already selected icon 2019-04-30 20:31:47 +02:00
Kenn Jacobsen 9598d2c2e6 Make header name input look ok when disabled (reverts input height adjustment from ff8f9083) 2019-04-30 20:30:16 +02:00
Andy Butland 966bfafe22 Fixed casing of editorService open method inline documentation for the size parameter 2019-04-30 20:25:29 +02:00
Peter Duncanson f2a5e5da87 Added in new browser targets for Babel config
Fixes #4894
2019-04-30 20:24:20 +02:00
Kenn Jacobsen 5eb0f6f92f V8: Show info message if Nested Content is configured without content types (#5342) 2019-04-30 16:45:23 +02:00
Sebastiaan Janssen f2e01d8f65 Merge pull request #5343 from kjac/v8-fix-mntp-bounds-validation
V8: Fix the MNTP min/max items validation
2019-04-30 16:15:34 +02:00
Sebastiaan Janssen d328a53590 Merge pull request #5355 from kjac/v8-fix-media-library-open-file
V8: Make it possible to open/view files in the media library
2019-04-30 16:06:17 +02:00
Niels Lyngsø 27d5b258df truncate + cache header for create new + different title for overlay depending on situation 2019-04-30 15:53:38 +02:00
Niels Lyngsø b271c77d97 fixing size to only work for target overlay 2019-04-30 15:52:37 +02:00
Niels Lyngsø 906c7a4ccd added angularJS truncate filter 2019-04-30 15:52:00 +02:00
Niels Lyngsø 5942bce7da control size of umb-overlay 2019-04-30 15:23:56 +02:00
Niels Lyngsø ab2f0c3a1c go to four lines if more than 6 items in Item-picker 2019-04-30 15:00:52 +02:00
Niels Lyngsø 85905f7a77 fix variant error for collection tabs 2019-04-30 15:00:31 +02:00
Niels Lyngsø 85456bbb9b correct lang file 2019-04-30 14:59:34 +02:00
Niels Lyngsø 8e925c930b sort items by dragging the item header 2019-04-30 14:05:20 +02:00
Niels Lyngsø 18c7680baf remove unused CSS 2019-04-30 13:53:06 +02:00
Niels Lyngsø 77407a9446 correcting text 2019-04-30 13:39:17 +02:00
Niels Lyngsø 62e72a54b7 Merge commit 'a7ebf9bed3f78c68f5da8a67d27a8ffa0e961d3b' into v8/feature/ux-copy-paste-service-for-nested-content 2019-04-30 13:34:56 +02:00
Niels Lyngsø 5d7aa4bcf5 remove edit and paste button. 2019-04-30 13:34:35 +02:00
Niels Lyngsø 90912a4b2a restyled umb-overlay + added paste features in nested-content create-overlay 2019-04-30 12:49:37 +02:00
Niels Lyngsø 01116e21f4 finished copy service 2019-04-30 12:48:44 +02:00
Claus a7ebf9bed3 Merge pull request #5318 from umbraco/v8/bugfix/5075-rte-update-model
update RTE model on changing code or media
2019-04-30 10:31:35 +02:00
Claus a01efcb59f fix for vs2019 release build tools. 2019-04-29 13:59:16 +02:00
Kenn Jacobsen adc7201e86 Allow localizing content types and properties using language files 2019-04-29 08:24:34 +02:00
Elitsa Marinovska 880e86820e Updating with correct directory refferences 2019-04-28 21:15:59 +02:00
Elitsa Marinovska 7e064cee83 Optimizing scripts 2019-04-28 21:14:32 +02:00
Kenn Jacobsen cc7bf4cef5 Make it possible to open/view files in the media library 2019-04-27 22:28:00 +02:00
Stephan 70203512fb Make TypeCollectionBuilderBase fluent 2019-04-27 09:07:49 +02:00
Niels Lyngsø 48ceb0d41d working prototype 2019-04-26 15:15:27 +02:00
Stephan 173df80e3d Fix recycle bin moves 2019-04-26 15:01:16 +02:00
Bjarne Fyrstenborg 9b62269bde v8: Update image cropper slider (#4487) 2019-04-26 14:12:57 +02:00
Niels Lyngsø 4d3154c7fa prototype, not working correctly. 2019-04-26 13:34:38 +02:00
Niels Lyngsø e139fa6719 first version of copyService 2019-04-26 13:22:00 +02:00
Warren Buckley 09617d9b50 Merge pull request #5337 from umbraco/v8/feature/ui-prettier-focus-outlines
Created umb-outline to make it easy to apply pretty focus outline for elements.
2019-04-26 10:29:22 +01:00
Warren Buckley 00e33fb156 Merge pull request #5338 from umbraco/v8/feature/ui-app-header-action-focus-outline
V8: app header action focus outline
2019-04-26 10:26:14 +01:00
Warren Buckley dc27bd148a Merge pull request #5340 from umbraco/v8/feature/ux-disable-tabbing-state-with-a-mouse-click
Disable tabbing state if user clicks
2019-04-26 10:19:24 +01:00
Warren Buckley 6dc343f9d8 Merge pull request #5339 from umbraco/v8/feature/ui-hover-and-focus-outline-on-umb-checkbox-and-umb-radio
focus outline + hover states for umb-checkbox and umb-radio
2019-04-26 10:18:33 +01:00
Pete Duncanson 2470a2737f Added gulp-angular-embed-template (#4871)
Fixed #4845 by embedded the angularjs templates for directives in the directives, cuts down on network traffic and increases speed to render
2019-04-26 11:06:00 +02:00
Warren Buckley 1753ddbfc4 Merge pull request #5330 from umbraco/v8/feature/ui-umb-button-nicer-outline
V8: prettier outline for buttons, and only shown when tabbing is active.
2019-04-26 10:00:14 +01:00
Warren Buckley 4230ad27f3 Merge pull request #5329 from umbraco/v8/feature/ui-nested-content-add-content-button
V8: nested content consistent "add content"-button, and other adjustments.
2019-04-26 09:56:44 +01:00
Warren Buckley 9bca5e0347 Merge pull request #5332 from umbraco/v8/feature/ui-prettier-outline-on-media-picker
V8: prettier outline on media picker
2019-04-26 09:31:21 +01:00
Bjarne Fyrstenborg f82dff597b v8: Imagepicker prevalue and grid setting/styles as infinite editor (#4971) 2019-04-25 13:31:29 +02:00
Stephan 56d7755487 Merge branch 'v8/dev' into v8/spike/api-docs 2019-04-25 09:05:21 +02:00
Kenn Jacobsen 82f966ca24 Fix MNTP bounds min/max items validation 2019-04-24 22:09:00 +02:00
Sebastiaan Janssen 2179e85638 Merge pull request #5336 from umbraco/v8/feature/snupkg
Create new Nuget Symbol packags - snupkg
2019-04-24 16:10:33 +02:00
Niels Lyngsø defbb8e821 disables the tabbing-state if the user performes a mouse-click that reaches the window. 2019-04-24 15:56:37 +02:00
Niels Lyngsø f7dce756a7 focus outline + hover states for umb-checkbox and umb-radio 2019-04-24 15:50:57 +02:00
Stephan bb0331e9cc Move IPublishedContent.Url() to ext method 2019-04-24 14:25:41 +02:00
Niels Lyngsø 30385789c8 only show focus-outline on sections if tabbing is active 2019-04-24 14:15:24 +02:00
Niels Lyngsø 8bac388f73 prettier focus outline for app-header-actions 2019-04-24 14:15:02 +02:00
Niels Lyngsø 53c7df36b0 umb-outline to make it easy to apply pretty focus outline for elements. 2019-04-24 13:55:31 +02:00
Sebastiaan Janssen 5f5b21b43e Make Nested Content work with hidden item icons (#5324) 2019-04-24 13:37:48 +02:00
Sebastiaan Janssen 64f7cc1c29 General clean up, use === and double quotes everywhere 2019-04-24 13:35:24 +02:00
Sebastiaan Janssen c80187938b Make sure to parse as boolean in case old models still use "1" or the string "true" 2019-04-24 13:34:48 +02:00
Sebastiaan Janssen bb4be11a0b Merge branch 'v8/dev' into pr_5324 2019-04-24 13:32:29 +02:00
Warren Buckley 103c92bc69 Update powershell to use the snupkg format for symbol package to be hosted on nuget.org symbol server
Advisory from Nuget team is to no longer include the C# .cs files in the src folder of a nuget package
2019-04-24 12:31:05 +01:00
Warren Buckley 950849a4c6 Update jQuery to latest 3.4.0 (#5331)
Seems good
2019-04-24 13:21:24 +02:00
Elitsa Marinovska da125405ea Merge pull request #4722 from kjac/v8-fix-media-picker-create-folder
V8: Return folder creation to non-active state in media picker
2019-04-24 12:35:23 +02:00
Niels Lyngsø d05e188d00 prettier outline on media picker 2019-04-24 12:03:43 +02:00
Stephan 25b8c8a565 Refactor getting Urls 2019-04-24 11:53:35 +02:00
elitsa 4cf55a8837 Getting the current user start nodes 2019-04-24 11:52:38 +02:00
Niels Lyngsø 5436478dfb prettier outline for buttons, and only shown when tabbing is active. 2019-04-24 11:37:03 +02:00
Warren Buckley 9333426985 Merge pull request #5304 from MMasey/v8/feature/tab-accessibility-improvements
V8: Login form accessibility improvements and form input tabbed focus styles
2019-04-24 10:25:13 +01:00
Warren Buckley c21b740c71 Merge pull request #5320 from shane-sigma/temp-5277-4
Re-adding outline to the umb-button__button for focus states
2019-04-24 10:00:44 +01:00
Niels Lyngsø 9e03103cbb using new ligther gray for background of nested content 2019-04-24 10:34:57 +02:00
Niels Lyngsø e889ec1fa9 added new lighter gray 2019-04-24 10:34:41 +02:00
Niels Lyngsø dc66807d13 changed the look of nested content 2019-04-24 10:31:30 +02:00
Warren Buckley fe57ef329b Revert the change to the gitignore - no web.config should be in ui.client folder anyway 2019-04-24 09:26:33 +01:00
elitsa 5ce226104b Merge branch 'v8/dev' into v8-fix-media-picker-create-folder 2019-04-24 09:41:48 +02:00
Stephan eb390f8d80 Fix merge 2019-04-24 09:32:49 +02:00
Niels Lyngsø 43586e6bb7 first step for changing the add-content button 2019-04-24 09:27:47 +02:00
Stephan be93773399 Merge branch v8/dev into v8/feature/5170-IPublishedContent 2019-04-24 08:51:25 +02:00
Kenn Jacobsen fecf561279 Make Nested Content work with hidden item icons 2019-04-23 22:57:10 +02:00
Kenn Jacobsen 61cc22dccf V8: Send notifications for changes in permissions (#5287) 2019-04-23 22:00:35 +02:00
Kenn Jacobsen e7f4f61f93 V8: Send notifications for changes in public access (#5288)
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2019-04-23 21:55:42 +02:00
Kenn Jacobsen a6d8b48ab4 V8: Remove obsolete umb-permission styling (#5308) 2019-04-23 21:50:28 +02:00
Kenn Jacobsen 7cc9747b2f V8: Allow content to be shown before list view (#5074) 2019-04-23 21:31:48 +02:00
Kenn Jacobsen 72d588287f V8: Add option to create nonclustered primary keys using ICreateBuilder (#5261) 2019-04-23 21:03:50 +02:00
Sebastiaan Janssen 700fe9b787 Merge branch 'v7/dev' into v8/dev
# Conflicts:
#	src/Umbraco.Core/Persistence/Repositories/MediaRepository.cs
#	src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs
#	src/Umbraco.Web.UI.Client/src/common/security/securityinterceptor.js
2019-04-23 20:37:38 +02:00
Kenn Jacobsen d5858fe1be Enable manual sorting on contentTypeAlias 2019-04-23 20:28:17 +02:00
Kenn Jacobsen 6dba751167 Fix "sort by document type" in listviews 2019-04-23 20:28:17 +02:00
Kenn Jacobsen b367ae6c80 Fix "sort by document type" in media listviews 2019-04-23 20:27:25 +02:00
Kenn Jacobsen 07684bb1d6 Fix "sort by document type" in content listviews 2019-04-23 20:26:55 +02:00
Dennis Flæng 7eadcf66ed added submit button for row and layoutconfig (#5136) 2019-04-23 20:17:38 +02:00
Stephan 977bf91409 Merge branch 'v8/feature/4942-media-url-provider' into v8/dev 2019-04-23 19:32:30 +02:00
Kenn Jacobsen fab025bf66 V8: Don't use floats in the slider config as it only supports integers (#4821) 2019-04-23 17:27:34 +02:00
Ondrej Pialek 8d382fb9b7 Backoffice session timeout on custom-URL backoffices leads to high browser CPU and self-inflicted backend DDoS (#5210) 2019-04-23 16:37:37 +02:00
Stephan c19be0c64e Misc cleanup 2019-04-23 16:23:06 +02:00
Kenn Jacobsen 67e046e477 V8: Allow nested content without blueprints (#4777)
* Don't assume there is at least one NC blueprint
* NC disabled icon styling (hover pointer type)
* Allow and handle NC configs without blueprints
2019-04-23 16:14:26 +02:00
Kenn Jacobsen aba409600b V8: Improve notifications save button style and interaction (#5097) 2019-04-23 15:59:57 +02:00
Kenn Jacobsen fdfcb75a71 Make sure datatype configs are validated in infinite editing (#4776) 2019-04-23 15:41:45 +02:00
shane Prendergast ac44f800a6 Re-adding outline to the umb-button__button for focus states 2019-04-23 13:56:48 +01:00
Kenn Jacobsen 7eddc22bba V8: Send notifications for move, restore, copy and delete actions (#5255) 2019-04-23 14:24:45 +02:00
Kenn Jacobsen 9280c74062 V8: Use umb-checkbox for RTE configuration (#5119) 2019-04-23 14:19:08 +02:00
Sebastiaan Janssen 90cbdbf2cd Merge pull request #5316 from umbraco/v8/bugfix/5315-paging-error-nucache
Fix paging error in NuCache
2019-04-23 14:05:56 +02:00
Sebastiaan Janssen fdc9adfe83 Merge pull request #5278 from kjac/v8-fix-macro-parameter-configuration
V8: Fix "multiple" macro parameter property editor configuration
2019-04-23 14:02:45 +02:00
Stephan e6f6c498a5 Merge branch v8/dev into v8/feature/4942-media-url-provider 2019-04-23 13:58:17 +02:00
Kenn Jacobsen 5472297245 Add busy state to <umb-confirm/> OK button 2019-04-23 13:45:42 +02:00
Niels Lyngsø 71bea2bc25 update RTE model on changing code or media 2019-04-23 13:43:36 +02:00
Stephan d9653026de Merge branch 'v8/bugfix/4963-fixing-models-and-member-repo' into v8/dev 2019-04-23 13:41:36 +02:00
Stephan 3185f7ae97 Fix member type builtin properties handling 2019-04-23 13:07:57 +02:00
Kenn Jacobsen 417b270f59 V8: Allow sorting manually by name in listviews (#5252) 2019-04-23 13:05:04 +02:00
Stephan 509b1151a2 Fix tests 2019-04-23 12:09:22 +02:00
Stephan 0cf857e8bc Cleanup 2019-04-23 12:09:13 +02:00
Stephan 50f6779c17 Merge branch v8/dev into v8/bugfix/4963-fixing-models-and-member-repo 2019-04-23 11:31:47 +02:00
Stephan 5d0010a993 Fix paging error in NuCache 2019-04-23 11:11:53 +02:00
Stephan f47cfe155a Merge branch 'v8/dev' of https://github.com/umbraco/Umbraco-CMS into v8/dev 2019-04-23 11:02:15 +02:00
Stephan 6c08828887 Merge branch 'temp8-4682-ui-selection-of-users-and-user-groups' into v8/dev 2019-04-23 11:01:50 +02:00
Niels Lyngsø 74b4689059 corrected spacing 2019-04-23 10:59:53 +02:00
Stephan 2f1687cd4f Merge branch 'v8/dev' into temp8-4682-ui-selection-of-users-and-user-groups 2019-04-23 10:54:07 +02:00
Stephan 6f0baa4a8e Merge branch v8/dev into v8/feature/5170-IPublishedContent 2019-04-23 10:47:40 +02:00
Stephan 9443599382 Merge pull request #5307 from kjac/v8-fix-search-result-mapping
V8: Fix mapping for search results
2019-04-23 10:43:12 +02:00
Stephan a56f3b23d1 Cleanup PublishedMember 2019-04-23 08:29:43 +02:00
Stephan 4feb766cc6 Fix IPublishedContent.Children() and NuCache 2019-04-23 08:29:43 +02:00
Stephan 55d4457c70 UmbracoContext: don't use obsolete properties 2019-04-23 08:29:43 +02:00
Stephan 05c85bbce5 NuCache: children as linked lists 2019-04-23 08:28:26 +02:00
Stephan 2270188668 Refactor IPublishedContent.Children() 2019-04-23 08:28:23 +02:00
Stephan 41e14a62c0 Refactor IPublishedContent.Parent() 2019-04-23 08:27:50 +02:00
Stephan a996d46b6f Refactor IPublishedContent.GetCultureFromDomains() 2019-04-23 08:27:50 +02:00
Stephan e062ea8d31 Refactor IPublishedContent.CultureDate(), .Cultures 2019-04-23 08:27:50 +02:00
Stephan 7cf13cbf94 Fix IPublishedContent.Name(), .Segment() for invariant 2019-04-23 08:27:49 +02:00
Stephan afda7a5661 Refactor IPublishedContent.ItemType 2019-04-23 08:27:49 +02:00
Stephan 11ef00c63d Refactor IPublishedContent.Url() 2019-04-23 08:27:49 +02:00
Stephan 2b54cc50ab Refactor IPublishedContent.UrlSegment() 2019-04-23 08:27:49 +02:00
Stephan 99319e0b49 UmbracoContext: rename properties 2019-04-23 08:27:49 +02:00
Stephan f99302ac63 Cleanup IPublishedContent/PropertyType 2019-04-23 08:27:49 +02:00
Stephan 890d7d8ce3 Refactor IPublishedContent.Name() 2019-04-23 08:27:48 +02:00
Stephan f039b00a44 Introduce IPublishedPropertyType 2019-04-23 08:27:48 +02:00
Stephan 34ad8dfb8d Introduce IPublishedContentType 2019-04-23 08:27:40 +02:00
Sebastiaan Janssen 160d140167 Merge branch 'v7/dev' into v8/dev
# Conflicts:
#	src/Umbraco.Web/Strategies/NotificationsHandler.cs
2019-04-22 13:22:15 +02:00
Sebastiaan Janssen db7ae9a7e2 V7: Send notifications for changes in permissions (#5306)
V7: Send notifications for changes in permissions
2019-04-22 13:21:03 +02:00
Sebastiaan Janssen 2e6f032222 Merge branch 'v7/dev' into pr_5306
# Conflicts:
#	src/Umbraco.Web/Strategies/NotificationsHandler.cs
2019-04-22 13:20:15 +02:00
Sebastiaan Janssen 9fc33d71e4 V7: Send notifications when an item is copied (#5302)
V7: Send notifications when an item is copied
2019-04-22 13:15:44 +02:00
Sebastiaan Janssen 916cd999d5 Merge branch 'v7/dev' into pr_5302
# Conflicts:
#	src/Umbraco.Web/Strategies/NotificationsHandler.cs
2019-04-22 13:14:32 +02:00
Sebastiaan Janssen a75506d60b V7: Send notifications when an item is moved or restored (#5303) 2019-04-22 13:04:14 +02:00
Sebastiaan Janssen 6631a50a44 Merge branch 'v7/dev' into pr_5303
# Conflicts:
#	src/Umbraco.Web/Strategies/NotificationsHandler.cs
2019-04-22 13:03:00 +02:00
Sebastiaan Janssen 9611791f31 Merge branch 'v7/dev' into v8/dev
# Conflicts:
#	src/Umbraco.Web/Strategies/NotificationsHandler.cs
2019-04-22 12:52:25 +02:00
Kenn Jacobsen c35a3fa702 Send notifications for rollbacks 2019-04-22 12:51:37 +02:00
Kenn Jacobsen 153ac58d2a Send notifications for rollbacks 2019-04-22 12:50:44 +02:00
Kenn Jacobsen a969ff6e10 Make sure Nested Content scaffolds are listed in defined sort order 2019-04-22 12:34:19 +02:00
Kenn Jacobsen c7b4d1b206 Always show file names for media/files without thumbnail 2019-04-22 12:31:01 +02:00
Sebastiaan Janssen aaf8ba0211 Merge branch 'v7/dev' into v8/dev
# Conflicts:
#	src/Umbraco.Core/IO/MediaFileSystem.cs
2019-04-22 12:28:33 +02:00
Kenn Jacobsen 072c014055 Read image dimensions via GDI if EXIF fails with an exception 2019-04-22 12:21:55 +02:00
Kenn Jacobsen 655befde42 Read image dimensions via GDI if EXIF fails with an exception 2019-04-22 12:19:36 +02:00
Sebastiaan Janssen 344b7731ce Fix JS unit tests 2019-04-22 12:10:53 +02:00
Sebastiaan Janssen 687cc4630f Fix missing semicolon 2019-04-22 10:47:00 +02:00
Kenn Jacobsen e180bb6722 V8: Fix broken listview pagination when using the back link (#5149) 2019-04-22 10:44:29 +02:00
Kenn Jacobsen 32104fff41 V8: Add back button to listviews for members (#5158)
* Add back button to edit member

* Don't set illegal location (with querystring params)
2019-04-22 10:21:38 +02:00
Kenn Jacobsen 8b6fbee47e V8: Add back button to listviews in media (#5116) 2019-04-22 10:00:51 +02:00
Kenn Jacobsen 59df7f1399 Ensure consistency in the way panels are spaced 2019-04-22 09:57:44 +02:00
Kenn Jacobsen f55e05da79 Don't explode when passing bad parameters to log resource 2019-04-22 09:55:38 +02:00
Kenn Jacobsen 2a43170915 V8: Add toggle group (#5096)
V8: Add toggle group
2019-04-22 09:16:41 +02:00
Kenn Jacobsen 717f8c9944 Fix mapping for search results 2019-04-21 21:00:34 +02:00
Kenn Jacobsen ff4fe2cd79 Send notifications for changes in permissions 2019-04-21 13:22:49 +02:00
Mike 233f00e2d4 improvment: update tabbed focus colour to use blueExtraDark 2019-04-20 20:37:22 +01:00
Mike 18a2871419 feat: return focus to password field on password reveal toggle 2019-04-20 20:20:30 +01:00
Mike 8c954ef433 feat: add clear tabbed focus state to form inputs 2019-04-20 20:15:33 +01:00
Mike b232d3c694 feat: add a 'tabbing-active' class when a person starts tabbing 2019-04-20 20:05:18 +01:00
Kenn Jacobsen d2f727a1ba Send notifications when an item is moved or restored 2019-04-20 20:40:52 +02:00
Kenn Jacobsen 38bb98b099 Send notifications when an item is copied 2019-04-20 20:31:36 +02:00
Kenn Jacobsen d87464b8e4 Fix the style of the public access confirmation button 2019-04-18 13:48:54 +02:00
Sebastiaan Janssen aba9c89ff4 Merge pull request #5090 from deMD/temp8-5069-getTreePackageFolder-use-localeCompare
V8 Plugins: Changed treeService.getTreePackageFolder to use localeCompare
2019-04-18 12:42:17 +02:00
Sebastiaan Janssen 74f98d51cd Compare to 0 to get the desired result 2019-04-18 12:37:52 +02:00
Sebastiaan Janssen 1e475bfc6f Merge branch 'v8/dev' into pr_5090 2019-04-18 12:11:24 +02:00
Kenn Jacobsen e7f3f8da68 Remove unused translations from area"editcontenttype" 2019-04-18 12:05:17 +02:00
Kenn Jacobsen a3af3d6d2b Use "group" instead of "tab" on Nested Content config 2019-04-18 11:47:36 +02:00
Kenn Jacobsen 29a542a0dd Support stylesheets in subfolders in the RTE 2019-04-18 11:38:34 +02:00
Kenn Jacobsen 73e4c6022d Update the title of the macro view picker 2019-04-18 09:38:20 +02:00
Sebastiaan Janssen eb10d71bff Don't just Parse, the value might be null, have to use TryParse 2019-04-17 16:47:23 +02:00
Sebastiaan Janssen 9cf69d53c2 Merge branch 'v7/dev' into v8/dev
# Conflicts:
#	src/Umbraco.Core/Services/ContentService.cs
#	src/Umbraco.Core/Services/IContentService.cs
#	src/Umbraco.Core/Services/IMediaService.cs
#	src/Umbraco.Core/Services/MediaService.cs
#	src/Umbraco.Web/Editors/ContentController.cs
#	src/Umbraco.Web/Editors/MediaController.cs
2019-04-17 16:39:10 +02:00
Kenn Jacobsen 2a930e5a66 Log the ID of the current user when emptying the media recycle bin 2019-04-17 16:01:18 +02:00
Kenn Jacobsen 2d32863fc9 Audit current user when moving media + clean up a few audit related things 2019-04-17 16:00:21 +02:00
Sebastiaan Janssen 2c32fabd36 Merge pull request #5054 from kjac/fix-content-empty-trash-audit-user
V7: Log correct user ID when emptying the content recycle bin
2019-04-17 15:58:43 +02:00
Kenn Jacobsen a48d97e631 Create explicit overloads for UrlAbsolute 2019-04-17 15:38:47 +02:00
Kenn Jacobsen 4107f47588 Add optional culture parameter to UrlAbsolute extension 2019-04-17 15:38:47 +02:00
Kenn Jacobsen bdac2a4a41 Use umb-checkbox for user filters 2019-04-17 15:35:57 +02:00
Stephan 791581f502 Use ConcurrentDictionary specific methods 2019-04-17 14:52:38 +02:00
Sebastiaan Janssen 1941c0dd1c Merge branch 'v7/dev' into v8/dev
# Conflicts:
#	src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs
#	src/Umbraco.Core/Persistence/Repositories/Interfaces/IContentRepository.cs
#	src/Umbraco.Core/Services/ContentService.cs
#	src/Umbraco.Core/Services/IContentService.cs
#	src/Umbraco.Core/UriExtensions.cs
#	src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js
#	src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js
#	src/Umbraco.Web.UI.Client/src/common/resources/media.resource.js
#	src/Umbraco.Web.UI.Client/src/common/services/search.service.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/contentpicker/contentpicker.html
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.html
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.html
#	src/Umbraco.Web.UI.Client/src/views/components/content/umb-content-node-info.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/rte.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/relatedlinks/relatedlinks.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.prevalues.html
#	src/Umbraco.Web/Cache/UnpublishedPageCacheRefresher.cs
#	src/Umbraco.Web/Editors/ContentController.cs
#	src/Umbraco.Web/Editors/EntityController.cs
#	src/Umbraco.Web/Editors/MediaController.cs
#	src/Umbraco.Web/PropertyEditors/ContentPicker2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/MediaPicker2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/MultiNodeTreePicker2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/RelatedLinks2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/RichTextPreValueEditor.cs
#	src/Umbraco.Web/PublishedCache/ContextualPublishedCache.cs
#	src/Umbraco.Web/PublishedCache/ContextualPublishedContentCache.cs
#	src/Umbraco.Web/PublishedCache/ContextualPublishedMediaCache.cs
#	src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs
#	src/Umbraco.Web/Search/UmbracoTreeSearcher.cs
#	src/Umbraco.Web/Trees/ContentTreeControllerBase.cs
#	src/Umbraco.Web/Trees/TreeControllerBase.cs
#	src/Umbraco.Web/Trees/TreeQueryStringParameters.cs
#	src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs
#	src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingMediaAttribute.cs
#	src/Umbraco.Web/umbraco.presentation/content.cs
#	src/Umbraco.Web/umbraco.presentation/umbraco/preview/PreviewContent.cs
2019-04-17 14:52:35 +02:00
Sebastiaan Janssen 650ef39780 Merge branch 'v8/dev' into v8/merge/5061-from-v7 2019-04-17 14:44:10 +02:00
Sebastiaan Janssen 7db0440b5c Merge branch 'v7/dev' into v8/dev
# Conflicts:
#	src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs
#	src/Umbraco.Core/Persistence/Repositories/Interfaces/IContentRepository.cs
#	src/Umbraco.Core/Services/ContentService.cs
#	src/Umbraco.Core/Services/IContentService.cs
#	src/Umbraco.Core/UriExtensions.cs
#	src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js
#	src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js
#	src/Umbraco.Web.UI.Client/src/common/resources/media.resource.js
#	src/Umbraco.Web.UI.Client/src/common/services/search.service.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/contentpicker/contentpicker.html
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.html
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/treepicker/treepicker.html
#	src/Umbraco.Web.UI.Client/src/views/components/content/umb-content-node-info.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/rte.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/relatedlinks/relatedlinks.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.prevalues.html
#	src/Umbraco.Web/Cache/UnpublishedPageCacheRefresher.cs
#	src/Umbraco.Web/Editors/ContentController.cs
#	src/Umbraco.Web/Editors/EntityController.cs
#	src/Umbraco.Web/Editors/MediaController.cs
#	src/Umbraco.Web/PropertyEditors/ContentPicker2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/MediaPicker2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/MultiNodeTreePicker2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/RelatedLinks2PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/RichTextPreValueEditor.cs
#	src/Umbraco.Web/PublishedCache/ContextualPublishedCache.cs
#	src/Umbraco.Web/PublishedCache/ContextualPublishedContentCache.cs
#	src/Umbraco.Web/PublishedCache/ContextualPublishedMediaCache.cs
#	src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs
#	src/Umbraco.Web/Search/UmbracoTreeSearcher.cs
#	src/Umbraco.Web/Trees/ContentTreeControllerBase.cs
#	src/Umbraco.Web/Trees/TreeControllerBase.cs
#	src/Umbraco.Web/Trees/TreeQueryStringParameters.cs
#	src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs
#	src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingMediaAttribute.cs
#	src/Umbraco.Web/umbraco.presentation/content.cs
#	src/Umbraco.Web/umbraco.presentation/umbraco/preview/PreviewContent.cs
2019-04-17 14:35:59 +02:00
Shannon a2a247b413 removes the enforcement of non duplicate property type aliases for now 2019-04-17 21:00:15 +10:00
Shannon 0b6a369047 When removing a property group, we need to first remove the group and then re-assign the property types so that duplicates are not added 2019-04-17 17:12:34 +10:00
Shannon 522fdefb8c Ensures that ALL membership properties are created by the installer, removes the logic that updates a membertype while fetching it, fixes the logic of mapping membership properties when fetching and they don't exist. 2019-04-17 16:42:17 +10:00
Shannon 4d8d10f07a adds comments, ignores test for now 2019-04-17 16:03:36 +10:00
Shannon Deminick 1ad19edfbd Merge pull request #5262 from kjac/v8-fix-listview-annotation-order
V8: Tree node annotation "pending changes" should take precendence over "is listview"
2019-04-17 15:25:12 +10:00
Shannon Deminick 637cf6a608 Merge pull request #5276 from 0Neji/temp-5273
Make DropDownFlexibleConfiguration class public
2019-04-17 15:22:02 +10:00
Rasmus John Pedersen a3ee718824 Add media url provider tests 2019-04-16 15:36:21 +02:00
Rasmus John Pedersen d0701ae34e Add media url provider support 2019-04-16 15:36:21 +02:00
Kenn Jacobsen 3668b68155 Merge with v8/dev 2019-04-16 11:48:20 +02:00
Kenn Jacobsen e8e29c9390 Merge branch 'v8/dev' into v8-fix-macro-parameter-configuration 2019-04-16 11:25:48 +02:00
Kenn Jacobsen 0787824fba Pass default configuration to configuration editor for macro parameter editors 2019-04-16 11:23:22 +02:00
Ben Palmer 40d2898fb8 Make DropDownFlexibleConfiguration class public to allow configuration to be set when creating a new data type 2019-04-16 09:21:24 +01:00
Kenn Jacobsen 2c436d5ae0 Apply nicer log message wrapping 2019-04-16 09:39:54 +02:00
Shannon 6f44e4fd09 Fixes INotifyCollectionChanged collections to raise the correct events, ensures that no duplicate property type aliases can be added/updated to 2019-04-16 17:37:42 +10:00
Rasmus John Pedersen 27b4329c1e Rename udiHelper to udiParser 2019-04-16 08:50:19 +02:00
Shannon 02ddf80014 Adds a unit test 2019-04-16 15:39:28 +10:00
Shannon Deminick 9f9d24e6b3 Merge pull request #5246 from umbraco/v8/bugfix/5216-cache-getbyudi
Add GetById(Udi) to published caches
2019-04-16 12:08:39 +10:00
Shannon e4f6794c59 Merge branch 'kjac-v8-feature-tree-annotations-visibility' into v8/dev 2019-04-16 11:42:22 +10:00
Shannon 440ac40674 Merge branch 'v8-feature-tree-annotations-visibility' of https://github.com/kjac/Umbraco-CMS into kjac-v8-feature-tree-annotations-visibility 2019-04-16 11:42:04 +10:00
Elitsa Marinovska dba241ef50 Adding build script for API docs 2019-04-15 22:04:55 +02:00
Elitsa Marinovska 3b22480b5d Update with correct paths 2019-04-15 21:46:09 +02:00
Kenn Jacobsen 52bc4b04b3 Fix annotation hover background color 2019-04-15 21:16:59 +02:00
Kenn Jacobsen 3f5ccb302d Make the tree annotations easier to see 2019-04-15 21:10:09 +02:00
Stephan 6b23a8221d Bugfix Audit service 2019-04-15 16:34:01 +02:00
Rasmus John Pedersen 32197f0bd1 Add angular udi helper service 2019-04-15 10:31:10 +02:00
Stephan 6cb55789bd Fix mapper concurrency issue 2019-04-15 10:25:29 +02:00
Shannon 723d9eddd1 unbreaks a ctor change preventing 8.0.2 from being dropped into the bin 2019-04-15 18:15:52 +10:00
Shannon fa655b812c Fix composers ordering 2019-04-15 17:55:22 +10:00
Shannon Deminick 747a8cba2e Merge pull request #5175 from umbraco/v8/bugfix/5174-composer-ordering
Fix composers ordering
2019-04-15 17:54:00 +10:00
Stephan 7e64f455b2 Remove leaked Console.WriteLine 2019-04-15 08:30:04 +02:00
Shannon 576c10cd50 NuCache: fix vanishing content when refreshing content types 2019-04-15 12:56:45 +10:00
Shannon Deminick 0cf609fdce Merge pull request #5240 from umbraco/v8/bugfix/5222-nucache-vanishing-content
NuCache: fix vanishing content when refreshing content types
2019-04-15 12:55:43 +10:00
Shannon Deminick 3a26443f58 Merge pull request #5247 from umbraco/v8/bugfix/bad-local-temp-path
Fix bad local temp path
2019-04-15 12:24:41 +10:00
Kenn Jacobsen 9953aea156 Make tree item annotation "has pending changes" take precendence over "is listview" 2019-04-14 21:03:24 +02:00
Stephan aa75fcfdb3 Fix bad local temp path 2019-04-12 17:40:10 +02:00
Stephan d4ba1298d5 Add GetById(Udi) to published caches 2019-04-12 16:05:43 +02:00
Stephan 14f9445ffb Ensure entities type in content caches GetById(Udi) 2019-04-12 15:34:06 +02:00
Stephan 7f7c9d2796 Merge branch 'v7/bugfix/5216' into v7/dev 2019-04-12 15:33:21 +02:00
Warren Buckley ba4bb843de Merge pull request #5076 from umbraco/temp8-4521-umb-property-editor-css-width
4521 umb-property-editor css width-limitation
2019-04-12 13:56:31 +01:00
Warren Buckley 43fc926f1b Merge pull request #5157 from umbraco/v8/bugfix/5129-ui-app-header-focus
V8: Visually more catching focus highlighting
2019-04-12 10:49:51 +01:00
Elitsa Marinovska e06d18330c Merge pull request #4721 from kjac/v8-fix-invalid-hostname
V8: Handle invalid hostnames
2019-04-12 11:38:03 +02:00
elitsa fb3f2101f0 Merge branch 'v8/dev' into v8-fix-invalid-hostname
# Resolved Conflicts:
#	src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
2019-04-12 11:27:43 +02:00
Warren Buckley f8f28ec46a Merge branch 'v8/dev' into v8/bugfix/5129-ui-app-header-focus 2019-04-12 09:40:02 +01:00
Elitsa Marinovska 6323dfcf9c Merge pull request #5164 from kjac/v8-fix-navigation-partial-template
V8: Fix navigation partial view template
2019-04-12 10:00:39 +02:00
Elitsa Marinovska 108e3e527f Merge pull request #5178 from kjac/v8-fix-content-type-matching-template-model
V8: Use the content type model when creating a "matching template"
2019-04-12 09:48:00 +02:00
elitsa ebe4c1b3c3 Fixing formatting 2019-04-12 08:56:18 +02:00
Elitsa Marinovska 93f382fc0f Merge pull request #5159 from poornimanayar/error-message-style-hostname
Fix the colour of the error message in the domains overlay
2019-04-12 08:52:46 +02:00
Stephan 8b509656cd NuCache: fix vanishing content when refreshing content types 2019-04-11 18:55:40 +02:00
Kenn Jacobsen 179afe7e0d Add IsVisible extension on IPublishedElement 2019-04-11 17:44:16 +02:00
Niels Lyngsø 92a0ec2964 take valserver and valpropertymsg out of business if we are dealing with invariant property on non-default-language 2019-04-11 13:03:28 +02:00
Niels Lyngsø 760b7ad0ce Merge remote-tracking branch 'origin/v8/dev' into v8/bugfix/5190-invariant-property-validation 2019-04-11 11:53:27 +02:00
Kenn Jacobsen a09e612e1f V8: Fix the layout for editing datatypes in infinite edit mode (#5194)
### Prerequisites

- [x] I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes https://github.com/umbraco/Umbraco-CMS/issues/5154

### Description

This PR fixes the layout of the datatype editor when editing datatypes in infinite editing mode (see #5154 for details).

When applied the editor behaves like this:

![dataype-infinite-editing](https://user-images.githubusercontent.com/7405322/55711636-5df57780-59ed-11e9-958d-0deb05cb17bf.gif)
2019-04-10 15:31:55 +02:00
Niels Lyngsø 9ad5dad710 additional spacing added 2019-04-10 14:59:16 +02:00
Niels Lyngsø 7afd01ff5c Styling update for umb-tags 2019-04-10 14:52:54 +02:00
Niels Lyngsø f8af9fd895 correct spacing between properties 2019-04-10 14:52:39 +02:00
Niels Lyngsø ac1d462bc5 ability to remove tag by pressing delete or backspace 2019-04-10 14:52:16 +02:00
Warren Buckley a4e00b62b3 Merge pull request #5219 from umbraco/v8/bugfix/ui-doc-type-editor
bigger area for add-property + only hover-state if you can edit property
2019-04-10 14:09:03 +02:00
Niels Lyngsø ed8ba3ddcf changed inline-styling into a appearance property 2019-04-10 13:40:06 +02:00
Warren Buckley 9928b770f7 Merge pull request #5221 from umbraco/v8/bugfix/ui-make-toggle-round
Making Umb-Toggle round
2019-04-10 13:28:00 +02:00
Niels Lyngsø 43759fbef3 applied icons again 2019-04-10 12:10:01 +02:00
Niels Lyngsø 94334ff04f style updates 2019-04-10 10:42:29 +02:00
Niels Lyngsø 1fcce288da changed action into buttons for keyboard focus 2019-04-10 10:42:21 +02:00
Niels Lyngsø 5fbd455fd8 align description with title 2019-04-10 10:41:58 +02:00
Shannon be7f42c454 Don't show the recycle bin in tree pickers/dialogs 2019-04-10 09:52:06 +10:00
Shannon Deminick ff707e8768 Merge pull request #4960 from kjac/v8-fix-tree-dialog-remove-recycle-bin
V8: Don't show the recycle bin in tree pickers/dialogs
2019-04-10 09:50:42 +10:00
Ronald Barendse d2e04614c6 Added UDI support for GetById and fixed bug not using specified preview mode 2019-04-09 23:21:40 +02:00
Stephan e540a4ac23 IsVisible moves from publishde content to element 2019-04-09 21:24:55 +02:00
Stephan ed4de5b000 Merge pull request #5041 from kjac/v8-feature-element-isvisible
V8: Add IsVisible extension on IPublishedElement
2019-04-09 21:20:37 +02:00
Niels Lyngsø 699c34263e bigger area for add-property + only hover-state if you can edit property 2019-04-09 16:42:24 +02:00
Rasmus John Pedersen c96cd09dba Add RTE media url -> localLink migration 2019-04-09 15:35:42 +02:00
Rasmus John Pedersen a96bca5fab Remove isMedia workaround 2019-04-09 15:35:41 +02:00
Rasmus John Pedersen 8e5d33b15e Resolve media urls when parsing localLink 2019-04-09 15:35:37 +02:00
Niels Lyngsø b6918253c0 if invariant property then only validate if we are working on the default language. 2019-04-09 15:07:31 +02:00
Rasmus John Pedersen 0a66bbb293 Use localLink for media 2019-04-09 11:59:09 +02:00
Rasmus John Pedersen f246dd7dca Support editing media links 2019-04-09 11:59:09 +02:00
Bjarke Berg b29fd4ada3 Merge pull request #5192 from umbraco/v8/bugfix/5183-mapping-enumerables
Fix mapping of enumerable
2019-04-09 11:51:39 +02:00
Bjarke Berg b1674235e9 Merge pull request #5167 from umbraco/v8/bugfix/checkboxlist-fix
Fixing property editor "checkboxlist" to work in v8
2019-04-09 11:12:13 +02:00
Niels Lyngsø 8441d9017b Merge remote-tracking branch 'origin/v8/dev' into v8/bugfix/checkboxlist-fix 2019-04-09 08:54:02 +02:00
Shannon 7e1ee26dee Fix spelling mistake 2019-04-09 10:34:59 +10:00
Kenn Jacobsen 0f969ecdd4 Setup non-selectable nodes after the treepicker loads 2019-04-08 19:56:15 +02:00
Stephan 6c8ded6275 Better mapping of enumerable 2019-04-08 16:41:33 +02:00
Niels Lyngsø 968fc40622 Merge remote-tracking branch 'origin/v8/dev' into v8/bugfix/checkboxlist-fix 2019-04-08 15:22:59 +02:00
Stephan 9eb1415796 Fix mapping of enumerable 2019-04-08 10:05:21 +02:00
Kenn Jacobsen 1aec0e1d9c Fix exception types as per review 2019-04-08 07:24:56 +02:00
Stephan 1c9b449c46 Log more details about boot environment 2019-04-07 16:25:06 +02:00
Kenn Jacobsen 2ee8f9dea2 Use the content type model when creating a "matching template" 2019-04-06 08:00:44 +02:00
Stephan c87a9d6bfa Fix composers ordering 2019-04-05 19:00:34 +02:00
Niels Lyngsø ae853a178d Merge remote-tracking branch 'origin/v8/dev' into v8/bugfix/checkboxlist-fix 2019-04-05 14:02:21 +02:00
Niels Lyngsø a4d8f0cd55 Fixing model sync, much weird code cleaned up 2019-04-05 14:01:28 +02:00
Niels Lyngsø f141025248 Fixing checkbox list to work in v8 2019-04-05 09:43:27 +02:00
Shannon e38095b727 NuCache: fix loading the media cache from local files, was missing media 2019-04-05 10:49:19 +11:00
Shannon b5796ad237 Enable configuration of NuCache BTree block size #5114 2019-04-05 10:44:36 +11:00
Kenn Jacobsen 6e1a40e2ee When creating partial views from templates, also replace (Model.Content) with (Model) - building upon the logic in e2d41106 2019-04-04 19:41:39 +02:00
Poornima Nayar 75bba068a4 Fix the colour of the error message in the domains overlay 2019-04-04 16:39:53 +02:00
Shannon Deminick 2ae639a3ae Merge pull request #5099 from umbraco/v7/feature/5059-alt-preview
Alternate Preview Engine
2019-04-04 23:35:23 +11:00
Niels Lyngsø 30da32ee94 Visually more catching focus highlighting 2019-04-04 14:15:57 +02:00
Shannon de8f01a4b2 Merge branch 'v7/dev' into v7/feature/5059-alt-preview 2019-04-04 23:11:27 +11:00
Stephan f985c437b5 Add content.SetValue overload for posted files 2019-04-04 09:28:34 +02:00
Andrew Deans 63fb8f5933 Fix case of query parameter 2019-04-04 09:12:40 +02:00
Shannon Deminick 10f22f7848 Merge pull request #5118 from kjac/v7-fix-content-info-contenttype-alias
V7: Add content type alias to content "general" info box
2019-04-04 14:02:06 +11:00
Niels Lyngsø bc821db8eb less space for content-node and media-node 2019-04-03 15:11:55 +02:00
Niels Lyngsø 959402d545 removed permissions column 2019-04-03 15:11:36 +02:00
Niels Lyngsø df46593ef3 improved list spacing, better text-overflow & center aligned select-all-checkbox for users list 2019-04-03 15:00:00 +02:00
Niels Lyngsø 1ff67df9df Merge remote-tracking branch 'origin/v8/dev' into temp8-4521-umb-property-editor-css-width 2019-04-03 13:47:30 +02:00
Niels Lyngsø db0a069b02 move highlight css to umb-table-body__link 2019-04-03 12:40:15 +02:00
Niels Lyngsø 4e027f7c83 space correction 2019-04-03 11:19:26 +02:00
Niels Lyngsø d2ff96e7ea show checkmark icon when checked 2019-04-03 11:18:37 +02:00
Niels Lyngsø 17e9487bf0 remove end of none existing anchor element 2019-04-03 11:18:15 +02:00
Niels Lyngsø 7f61a6fe9f ability to open as a new tab 2019-04-03 10:51:01 +02:00
Niels Lyngsø 3d949c9a55 changed user groups to use umb-table 2019-04-03 10:37:31 +02:00
Shannon eb529783c4 Don't allow move in members listview 2019-04-03 16:22:13 +11:00
Shannon db867c66a3 The ImageCropperPropertyValueEditor doesn't convert values in ConvertDbToString correctly 2019-04-03 13:32:21 +11:00
Shannon a8265db5f0 Reload listview after moving items 2019-04-03 10:45:04 +11:00
Niels Lyngsø 0997fe6732 checkmark column removed 2019-04-02 10:12:21 +02:00
Kenn Jacobsen fb1f2c8af4 Add content type alias to content "general" info box 2019-04-02 08:12:46 +02:00
Stephan e6d75f27de Alt. preview: rename modes 2019-04-01 08:23:48 +02:00
Stephan 9bcd70589c Alt. preview: thread safety 2019-04-01 08:21:01 +02:00
Shannon 7dcf2b1abb infinity editing dim-layer for umb-modelcolumn 2019-04-01 17:05:13 +11:00
Stephan 514452ddb9 Better ServerMessenger configuration 2019-04-01 16:30:37 +11:00
Stephan 0676726bfc Refactor preview 2019-03-28 10:52:19 +01:00
Stephan bb43fc310a Add service-level loading of preview Xml document 2019-03-27 17:11:21 +01:00
Dave de Moel ff9179a15f Changed check to use localeCompare 2019-03-27 10:33:21 +01:00
Stephan 3524ba83a8 Merge branch 'v7/bugfix/5019-change-log-level' into dev-v7 2019-03-27 10:29:30 +01:00
Niels Lyngsø a7941b9678 setting width limit of selected property editors 2019-03-26 10:10:34 +01:00
Niels Lyngsø 31fd8066a4 fixing border color, which needs to be white. 2019-03-26 10:10:13 +01:00
Niels Lyngsø 5899f08d7f removing the default width limitation. 2019-03-26 10:09:43 +01:00
Niels Lyngsø 8a16c749e1 Mixin for limiting the width of a property-editor 2019-03-26 10:09:21 +01:00
Bjarke Berg 011d406301 https://github.com/umbraco/Umbraco-CMS/issues/5019 - Changed log level from error to debug. This will spam the log if we request with invalid parameters 2019-03-25 11:59:41 +01:00
Kenn Jacobsen 8bd9ae062d Merge with dev-v7 2019-03-24 13:37:32 +01:00
Kenn Jacobsen d51daa2a8a Make sure the correct user is registered in the log when emptying the recycle bin 2019-03-24 13:25:55 +01:00
Dan White cc9a7ff942 U4 10147 - Bypass User Security option in pickers (#2441) 2019-03-23 12:51:36 +01:00
Kenn Jacobsen 33a91bb9e9 Add IsVisible extension on IPublishedElement 2019-03-21 15:01:46 +01:00
Kenn Jacobsen 761297a2db Merged with dev-v8 2019-03-20 11:50:35 +01:00
Kenn Jacobsen 0c602567ce Don't show the recycle bin in tree pickers/dialogs 2019-03-12 10:25:51 +01:00
Shannon 34a3389c17 Updates to latest Examine 2019-03-05 12:50:51 +11:00
Bjarne Fyrstenborg 28d4f1cc44 Fix issues where table cells collapse when sorting doctypes in Nested Content config 2019-03-03 20:18:41 +01:00
Kenn Jacobsen 4851bb0534 Handle mixed variance when creating content templates from content 2019-02-27 19:13:51 +01:00
Kenn Jacobsen b9d1df0844 Return folder creation to non-active state in media picker 2019-02-24 15:28:04 +01:00
Kenn Jacobsen 32a622a6ea Add missing documentation + a bit of renaming 2019-02-24 15:10:49 +01:00
Kenn Jacobsen 7ca6739cee Clear error before (re)submitting 2019-02-24 15:01:47 +01:00
Kenn Jacobsen 214457fc04 Add translation 2019-02-24 09:50:13 +01:00
Kenn Jacobsen 30d46a6204 Merge branch 'v8-wip-invalid-hostname' into v8-fix-invalid-hostname 2019-02-24 09:40:07 +01:00
Kenn Jacobsen b94b94ea06 Add serverside validation of assigned hostnames 2019-02-24 09:37:22 +01:00
Shannon beb325eacf oops got a couple versions wrong 2018-09-28 15:01:47 +10:00
Shannon 8e45bcf23f changes targetFramework in web.config 2018-09-28 14:34:39 +10:00
Shannon 40dc49ed47 updates nuspecs 2018-09-28 14:27:03 +10:00
Shannon 4b07305dc5 Update HtmlAgilityPack 2018-09-28 14:10:45 +10:00
Shannon 2514a59e93 Latest MS libs for benchmark project 2018-09-28 14:00:03 +10:00
Shannon 6843da790c Latest MS libs for benchmark project 2018-09-28 13:57:48 +10:00
Shannon ba1a9c3758 Updates to latest compatible CodeAnalysis & DotNetCompilerPlatform libs 2018-09-28 13:54:20 +10:00
Shannon 332ad6349d Updates latest newtonsoft.json 2018-09-28 12:59:12 +10:00
Shannon 42e48426e4 Updates other MS libs: ValueTuple, Dataflow, Reflection.Metadata 2018-09-28 12:44:17 +10:00
Shannon a0cc788f27 Updates to latest Image Processor versions 2018-09-28 12:24:16 +10:00
Shannon aecf96d74d Updates to latest MVC, WebApi and Owin 2018-09-28 12:19:34 +10:00
Shannon c75938076e reinstalls all packages flagged as 'requiresReinstallation' 2018-09-28 11:54:05 +10:00
Shannon cebbcb711a csproj, etc... updates for 452 (and 462 for benchmark proj) 2018-09-28 11:29:56 +10:00
957 changed files with 21025 additions and 16611 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ thoroughly. Then, proceed by filling out the rest of the details in the issue
template below. The more details you can give us, the easier it will be for us
to determine the cause of a problem.
See: https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/.github/CONTRIBUTING.md
See: https://github.com/umbraco/Umbraco-CMS/blob/v8/dev/.github/CONTRIBUTING.md
-->
+1
View File
@@ -161,3 +161,4 @@ build/temp/
# eof
/src/Umbraco.Web.UI.Client/TESTS-*.xml
/src/ApiDocs/api/*
+6 -4
View File
@@ -14,6 +14,7 @@
<summary>Contains the core assemblies needed to run Umbraco Cms</summary>
<language>en-US</language>
<tags>umbraco</tags>
<repository type="git" url="https://github.com/umbraco/umbraco-cms" />
<dependencies>
<group targetFramework="net472">
@@ -39,10 +40,12 @@
<dependency id="Serilog.Formatting.Compact.Reader" version="[1.0.3,1.999999)" />
<dependency id="Serilog.Settings.AppSettings" version="[2.2.2,2.999999)" />
<dependency id="Serilog.Sinks.File" version="[4.0.0,4.999999)" />
<dependency id="Serilog.Sinks.Map" version="[1.0.0,1.999999)" />
<dependency id="Serilog.Sinks.Async" version="[1.3.0,1.999999)" />
<dependency id="Umbraco.SqlServerCE" version="[4.0.0.1,4.999999)" />
<dependency id="NPoco" version="[3.9.4,3.999999)" />
</group>
</dependencies>
</metadata>
<files>
@@ -50,10 +53,9 @@
<file src="$BuildTmp$\WebApp\bin\Umbraco.Core.dll" target="lib\net472\Umbraco.Core.dll" />
<!-- docs -->
<file src="$BuildTmp$\WebApp\bin\Umbraco.Core.xml" target="lib\Umbraco.Core.xml" />
<file src="$BuildTmp$\WebApp\bin\Umbraco.Core.xml" target="lib\net472\Umbraco.Core.xml" />
<!-- symbols -->
<file src="$BuildTmp$\bin\Umbraco.Core.pdb" target="lib" />
<file src="$BuildTmp$\..\src\Umbraco.Core\**\*.cs" exclude="$BuildTmp$\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Core" />
<file src="$BuildTmp$\bin\Umbraco.Core.pdb" target="lib\net472\Umbraco.Core.pdb" />
</files>
</package>
+7 -8
View File
@@ -14,6 +14,7 @@
<summary>Contains the core assemblies needed to run Umbraco Cms</summary>
<language>en-US</language>
<tags>umbraco</tags>
<repository type="git" url="https://github.com/umbraco/umbraco-cms" />
<dependencies>
<group targetFramework="net472">
@@ -43,7 +44,7 @@
<dependency id="System.Threading.Tasks.Dataflow" version="[4.9.0,4.999999)" />
</group>
</dependencies>
</metadata>
<files>
@@ -53,14 +54,12 @@
<file src="$BuildTmp$\WebApp\bin\Umbraco.Examine.dll" target="lib\net472\Umbraco.Examine.dll" />
<!-- docs -->
<file src="$BuildTmp$\WebApp\bin\Umbraco.Web.xml" target="lib\Umbraco.Web.xml" />
<file src="$BuildTmp$\WebApp\bin\Umbraco.Web.UI.xml" target="lib\Umbraco.Web.UI.xml" />
<file src="$BuildTmp$\WebApp\bin\Umbraco.Examine.xml" target="lib\Umbraco.Examine.xml" />
<file src="$BuildTmp$\WebApp\bin\Umbraco.Web.xml" target="lib\net472\Umbraco.Web.xml" />
<file src="$BuildTmp$\WebApp\bin\Umbraco.Web.UI.xml" target="lib\net472\Umbraco.Web.UI.xml" />
<file src="$BuildTmp$\WebApp\bin\Umbraco.Examine.xml" target="lib\net472\Umbraco.Examine.xml" />
<!-- symbols -->
<file src="$BuildTmp$\bin\Umbraco.Web.pdb" target="lib" />
<file src="$BuildTmp$\..\src\Umbraco.Web\**\*.cs" exclude="$BuildTmp$\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Web" />
<file src="$BuildTmp$\bin\Umbraco.Examine.pdb" target="lib" />
<file src="$BuildTmp$\..\src\Umbraco.Examine\**\*.cs" exclude="$BuildTmp$\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Examine" />
<file src="$BuildTmp$\bin\Umbraco.Web.pdb" target="lib\net472\Umbraco.Web.pdb" />
<file src="$BuildTmp$\bin\Umbraco.Examine.pdb" target="lib\net472\Umbraco.Examine.pdb" />
</files>
</package>
+3 -1
View File
@@ -14,6 +14,7 @@
<summary>Installs Umbraco Cms in your Visual Studio ASP.NET project</summary>
<language>en-US</language>
<tags>umbraco</tags>
<repository type="git" url="https://github.com/umbraco/umbraco-cms" />
<dependencies>
<group targetFramework="net472">
@@ -25,7 +26,7 @@
not want this to happen as the alpha of the next major is, really, the next major already.
-->
<dependency id="Microsoft.AspNet.SignalR.Core" version="[2.4.0, 2.999999)" />
<dependency id="Umbraco.ModelsBuilder.Ui" version="[8.0.4]" />
<dependency id="Umbraco.ModelsBuilder.Ui" version="[8.1.0]" />
<dependency id="ImageProcessor.Web" version="[4.10.0.100,4.999999)" />
<dependency id="ImageProcessor.Web.Config" version="[2.5.0.100,2.999999)" />
<dependency id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="[2.0.1,2.999999)" />
@@ -58,6 +59,7 @@
<!-- config transforms -->
<!-- beware! config transforms not supported by PackageReference -->
<file src="tools\Web.config.install.xdt" target="Content\Web.config.install.xdt" />
<file src="tools\serilog.config.install.xdt" target="Content\config\serilog.config.install.xdt" />
<file src="tools\ClientDependency.config.install.xdt" target="Content\config\ClientDependency.config.install.xdt" />
<file src="tools\umbracoSettings.config.install.xdt" target="Content\config\umbracoSettings.config.install.xdt" />
<file src="tools\Views.Web.config.install.xdt" target="Views\Web.config.install.xdt" /> <!-- FIXME: Content\ !! and then... transform?! -->
@@ -8,7 +8,7 @@
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" xdt:Locator="Match(factoryType)" xdt:Transform="SetAttributes(factoryType)" />
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" xdt:Locator="Match(factoryType)" xdt:Transform="SetAttributes(factoryType)" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="Umbraco.Web.PublishedContentModels" xdt:Transform="InsertIfMissing" />
@@ -18,13 +18,13 @@
<system.web>
<pages
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
xdt:Locator="Match(pageParserFilterType,pageBaseType,userControlBaseType)"
xdt:Transform="SetAttributes(pageParserFilterType,pageBaseType,userControlBaseType)">
<controls>
<add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" xdt:Locator="Match(namespace)" xdt:Transform="SetAttributes(assembly)" />
<add assembly="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" xdt:Locator="Match(namespace)" xdt:Transform="SetAttributes(assembly)" />
</controls>
</pages>
</system.web>
+21 -4
View File
@@ -18,9 +18,20 @@ if ($project) {
# Copy umbraco and umbraco_files from package to project folder
$umbracoFolder = Join-Path $projectPath "Umbraco"
New-Item -ItemType Directory -Force -Path $umbracoFolder
New-Item -ItemType Directory -Force -Path $umbracoFolder
$umbracoFolderSource = Join-Path $installPath "UmbracoFiles\Umbraco"
robocopy $umbracoFolderSource $umbracoFolder /is /it /e /xf UI.xml /LOG:$copyLogsPath\UmbracoCopy.log
Write-Host "copying files to $umbracoFolder ..."
# see https://support.microsoft.com/en-us/help/954404/return-codes-that-are-used-by-the-robocopy-utility-in-windows-server-2
robocopy $umbracoFolderSource $umbracoFolder /is /it /e
if (($lastexitcode -eq 1) -or ($lastexitcode -eq 3) -or ($lastexitcode -eq 5) -or ($lastexitcode -eq 7))
{
write-host "Copy succeeded!"
}
else
{
write-host "Copy failed with exit code:" $lastexitcode
}
$copyWebconfig = $true
$destinationWebConfig = Join-Path $projectPath "Web.config"
@@ -40,7 +51,11 @@ if ($project) {
}
}
}
Catch { }
Catch
{
Write-Host "An error occurred:"
Write-Host $_
}
}
if($copyWebconfig -eq $true)
@@ -74,7 +89,9 @@ if ($project) {
}
Catch
{
# Not a big problem if this fails, let it go
# Not a big problem if this fails, let it go
# Write-Host "An error occurred:"
# Write-Host $_
}
}
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">>
<appSettings>
<add key="serilog:using:File" value="Umbraco.Core" xdt:Transform="SetAttributes(value)" xdt:Locator="Match(key)"/>
<add key="serilog:write-to:File.shared" xdt:Transform="Remove" xdt:Locator="Match(key)"/>
</appSettings>
</configuration>
+44
View File
@@ -0,0 +1,44 @@
$uenv=build/build.ps1 -get
$src = "$($uenv.SolutionRoot)\src"
$tmp = $uenv.BuildTemp
$out = $uenv.BuildOutput
$DocFxJson = "$src\ApiDocs\docfx.json"
$DocFxSiteOutput = "$tmp\_site\*.*"
################ Do the UI docs
$uenv.CompileBelle()
"Moving to Umbraco.Web.UI.Client folder"
cd .\src\Umbraco.Web.UI.Client
"Generating the docs and waiting before executing the next commands"
& gulp docs | Out-Null
# change baseUrl
$BaseUrl = "https://our.umbraco.com/apidocs/v8/ui/"
$IndexPath = "./docs/api/index.html"
(Get-Content $IndexPath).replace('location.href.replace(rUrl, indexFile)', "`'" + $BaseUrl + "`'") | Set-Content $IndexPath
# zip it
& $uenv.BuildEnv.Zip a -tzip -r "$out\ui-docs.zip" "$src\Umbraco.Web.UI.Client\docs\api\*.*"
################ Do the c# docs
# Build the solution in debug mode
$SolutionPath = Join-Path -Path $src -ChildPath "umbraco.sln"
#$uenv.CompileUmbraco()
#restore nuget packages
$uenv.RestoreNuGet()
# run DocFx
$DocFx = $uenv.BuildEnv.DocFx
Write-Host "$DocFxJson"
& $DocFx metadata $DocFxJson
& $DocFx build $DocFxJson
# zip it
& $uenv.BuildEnv.Zip a -tzip -r "$out\csharp-docs.zip" $DocFxSiteOutput
+56 -3
View File
@@ -11,6 +11,11 @@
[Alias("loc")]
[switch] $local = $false,
# enable docfx
[Parameter(Mandatory=$false)]
[Alias("doc")]
[switch] $docfx = $false,
# keep the build directories, don't clear them
[Parameter(Mandatory=$false)]
[Alias("c")]
@@ -31,7 +36,7 @@
$ubuild = &"$PSScriptRoot\build-bootstrap.ps1"
if (-not $?) { return }
$ubuild.Boot($PSScriptRoot,
@{ Local = $local; },
@{ Local = $local; WithDocFx = $docfx },
@{ Continue = $continue })
if ($ubuild.OnError()) { return }
@@ -387,13 +392,13 @@
&$this.BuildEnv.NuGet Pack "$nuspecs\UmbracoCms.Core.nuspec" `
-Properties BuildTmp="$($this.BuildTemp)" `
-Version "$($this.Version.Semver.ToString())" `
-Symbols -Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.cmscore.log"
-Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.cmscore.log"
if (-not $?) { throw "Failed to pack NuGet UmbracoCms.Core." }
&$this.BuildEnv.NuGet Pack "$nuspecs\UmbracoCms.Web.nuspec" `
-Properties BuildTmp="$($this.BuildTemp)" `
-Version "$($this.Version.Semver.ToString())" `
-Symbols -Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.cmsweb.log"
-Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.cmsweb.log"
if (-not $?) { throw "Failed to pack NuGet UmbracoCms.Web." }
&$this.BuildEnv.NuGet Pack "$nuspecs\UmbracoCms.nuspec" `
@@ -425,6 +430,53 @@
$this.CopyFile("$($this.SolutionRoot)\build\Azure\azuregalleryrelease.ps1", $this.BuildOutput)
})
$ubuild.DefineMethod("PrepareCSharpDocs",
{
Write-Host "Prepare C# Documentation"
$src = "$($this.SolutionRoot)\src"
$tmp = $this.BuildTemp
$out = $this.BuildOutput
$DocFxJson = Join-Path -Path $src "\ApiDocs\docfx.json"
$DocFxSiteOutput = Join-Path -Path $tmp "\_site\*.*"
#restore nuget packages
$this.RestoreNuGet()
# run DocFx
$DocFx = $this.BuildEnv.DocFx
& $DocFx metadata $DocFxJson
& $DocFx build $DocFxJson
# zip it
& $this.BuildEnv.Zip a -tzip -r "$out\csharp-docs.zip" $DocFxSiteOutput
})
$ubuild.DefineMethod("PrepareAngularDocs",
{
Write-Host "Prepare Angular Documentation"
$src = "$($this.SolutionRoot)\src"
$out = $this.BuildOutput
$this.CompileBelle()
"Moving to Umbraco.Web.UI.Client folder"
cd .\src\Umbraco.Web.UI.Client
"Generating the docs and waiting before executing the next commands"
& gulp docs | Out-Null
# change baseUrl
$BaseUrl = "https://our.umbraco.com/apidocs/v8/ui/"
$IndexPath = "./docs/api/index.html"
(Get-Content $IndexPath).replace('location.href.replace(rUrl, indexFile)', "`'" + $BaseUrl + "`'") | Set-Content $IndexPath
# zip it
& $this.BuildEnv.Zip a -tzip -r "$out\ui-docs.zip" "$src\Umbraco.Web.UI.Client\docs\api\*.*"
})
$ubuild.DefineMethod("Build",
{
$error.Clear()
@@ -456,6 +508,7 @@
if ($this.OnError()) { return }
$this.PostPackageHook()
if ($this.OnError()) { return }
Write-Host "Done"
})
+10 -24
View File
@@ -2,21 +2,20 @@
"metadata": [
{
"src": [
{
{
"src": "../",
"files": [
"Umbraco.Core/Umbraco.Core.csproj",
"Umbraco.Web/Umbraco.Web.csproj"
],
"exclude": [
"**/obj/**",
"**/bin/**",
"_site/**"
],
"cwd": "../src"
"**/bin/**"
]
}
],
"dest": "../apidocs/api",
"filter": "../apidocs/docfx.filter.yml"
"dest": "api",
"filter": "docfx.filter.yml"
}
],
"build": {
@@ -35,19 +34,7 @@
"*.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"resource": [
{
"files": [
"images/**"
],
"exclude": [
"obj/**",
"_site/**"
"obj/**"
]
}
],
@@ -57,8 +44,7 @@
"**.md"
],
"exclude": [
"obj/**",
"_site/**"
"obj/**"
]
}
],
@@ -67,9 +53,9 @@
"_enableSearch": true,
"_disableContribution": false
},
"dest": "_site",
"dest": "../../build.tmp/_site",
"template": [
"default", "umbracotemplate"
]
}
}
}
+2 -2
View File
@@ -18,5 +18,5 @@ using System.Resources;
[assembly: AssemblyVersion("8.0.0")]
// these are FYI and changed automatically
[assembly: AssemblyFileVersion("8.1.0")]
[assembly: AssemblyInformationalVersion("8.1.0")]
[assembly: AssemblyFileVersion("8.2.0")]
[assembly: AssemblyInformationalVersion("8.2.0")]
+25 -22
View File
@@ -67,31 +67,34 @@ namespace Umbraco.Core
: new NamedSemaphoreReleaser(_semaphore2);
}
public Task<IDisposable> LockAsync()
{
var wait = _semaphore != null
? _semaphore.WaitAsync()
: _semaphore2.WaitOneAsync();
//NOTE: We don't use the "Async" part of this lock at all
//TODO: Remove this and rename this class something like SystemWideLock, then we can re-instate this logic if we ever need an Async lock again
return wait.IsCompleted
? _releaserTask ?? Task.FromResult(CreateReleaser()) // anonymous vs named
: wait.ContinueWith((_, state) => (((AsyncLock) state).CreateReleaser()),
this, CancellationToken.None,
TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
}
//public Task<IDisposable> LockAsync()
//{
// var wait = _semaphore != null
// ? _semaphore.WaitAsync()
// : _semaphore2.WaitOneAsync();
public Task<IDisposable> LockAsync(int millisecondsTimeout)
{
var wait = _semaphore != null
? _semaphore.WaitAsync(millisecondsTimeout)
: _semaphore2.WaitOneAsync(millisecondsTimeout);
// return wait.IsCompleted
// ? _releaserTask ?? Task.FromResult(CreateReleaser()) // anonymous vs named
// : wait.ContinueWith((_, state) => (((AsyncLock) state).CreateReleaser()),
// this, CancellationToken.None,
// TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
//}
return wait.IsCompleted
? _releaserTask ?? Task.FromResult(CreateReleaser()) // anonymous vs named
: wait.ContinueWith((_, state) => (((AsyncLock)state).CreateReleaser()),
this, CancellationToken.None,
TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
}
//public Task<IDisposable> LockAsync(int millisecondsTimeout)
//{
// var wait = _semaphore != null
// ? _semaphore.WaitAsync(millisecondsTimeout)
// : _semaphore2.WaitOneAsync(millisecondsTimeout);
// return wait.IsCompleted
// ? _releaserTask ?? Task.FromResult(CreateReleaser()) // anonymous vs named
// : wait.ContinueWith((_, state) => (((AsyncLock)state).CreateReleaser()),
// this, CancellationToken.None,
// TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
//}
public IDisposable Lock()
{
@@ -44,21 +44,22 @@ namespace Umbraco.Core.Compose
public void Terminate()
{ }
internal static IUser UnknownUser => new User { Id = Constants.Security.UnknownUserId, Name = Constants.Security.UnknownUserName, Email = "" };
private IUser CurrentPerformingUser
{
get
{
var identity = Thread.CurrentPrincipal?.GetUmbracoIdentity();
return identity == null
? new User { Id = 0, Name = "SYSTEM", Email = "" }
: _userService.GetUserById(Convert.ToInt32(identity.Id));
var user = identity == null ? null : _userService.GetUserById(Convert.ToInt32(identity.Id));
return user ?? UnknownUser;
}
}
private IUser GetPerformingUser(int userId)
{
var found = userId >= 0 ? _userService.GetUserById(userId) : null;
return found ?? new User {Id = 0, Name = "SYSTEM", Email = ""};
return found ?? UnknownUser;
}
private string PerformingIp
+95 -38
View File
@@ -70,7 +70,23 @@ namespace Umbraco.Core.Composing
}
}
private IEnumerable<Type> PrepareComposerTypes()
internal IEnumerable<Type> PrepareComposerTypes()
{
var requirements = GetRequirements();
// only for debugging, this is verbose
//_logger.Debug<Composers>(GetComposersReport(requirements));
var sortedComposerTypes = SortComposers(requirements);
// bit verbose but should help for troubleshooting
//var text = "Ordered Composers: " + Environment.NewLine + string.Join(Environment.NewLine, sortedComposerTypes) + Environment.NewLine;
_logger.Debug<Composers>("Ordered Composers: {SortedComposerTypes}", sortedComposerTypes);
return sortedComposerTypes;
}
internal Dictionary<Type, List<Type>> GetRequirements(bool throwOnMissing = true)
{
// create a list, remove those that cannot be enabled due to runtime level
var composerTypeList = _composerTypes
@@ -89,25 +105,69 @@ namespace Umbraco.Core.Composing
// enable or disable composers
EnableDisableComposers(composerTypeList);
// sort the composers according to their dependencies
var requirements = new Dictionary<Type, List<Type>>();
foreach (var type in composerTypeList) requirements[type] = null;
foreach (var type in composerTypeList)
void GatherInterfaces<TAttribute>(Type type, Func<TAttribute, Type> getTypeInAttribute, HashSet<Type> iset, List<Type> set2)
where TAttribute : Attribute
{
GatherRequirementsFromRequireAttribute(type, composerTypeList, requirements);
GatherRequirementsFromRequiredByAttribute(type, composerTypeList, requirements);
foreach (var attribute in type.GetCustomAttributes<TAttribute>())
{
var typeInAttribute = getTypeInAttribute(attribute);
if (typeInAttribute != null && // if the attribute references a type ...
typeInAttribute.IsInterface && // ... which is an interface ...
typeof(IComposer).IsAssignableFrom(typeInAttribute) && // ... which implements IComposer ...
!iset.Contains(typeInAttribute)) // ... which is not already in the list
{
// add it to the new list
iset.Add(typeInAttribute);
set2.Add(typeInAttribute);
// add all its interfaces implementing IComposer
foreach (var i in typeInAttribute.GetInterfaces().Where(x => typeof(IComposer).IsAssignableFrom(x)))
{
iset.Add(i);
set2.Add(i);
}
}
}
}
// only for debugging, this is verbose
//_logger.Debug<Composers>(GetComposersReport(requirements));
// gather interfaces too
var interfaces = new HashSet<Type>(composerTypeList.SelectMany(x => x.GetInterfaces().Where(y => typeof(IComposer).IsAssignableFrom(y))));
composerTypeList.AddRange(interfaces);
var list1 = composerTypeList;
while (list1.Count > 0)
{
var list2 = new List<Type>();
foreach (var t in list1)
{
GatherInterfaces<ComposeAfterAttribute>(t, a => a.RequiredType, interfaces, list2);
GatherInterfaces<ComposeBeforeAttribute>(t, a => a.RequiringType, interfaces, list2);
}
composerTypeList.AddRange(list2);
list1 = list2;
}
// sort the composers according to their dependencies
var requirements = new Dictionary<Type, List<Type>>();
foreach (var type in composerTypeList)
requirements[type] = null;
foreach (var type in composerTypeList)
{
GatherRequirementsFromAfterAttribute(type, composerTypeList, requirements, throwOnMissing);
GatherRequirementsFromBeforeAttribute(type, composerTypeList, requirements);
}
return requirements;
}
internal IEnumerable<Type> SortComposers(Dictionary<Type, List<Type>> requirements)
{
// sort composers
var graph = new TopoGraph<Type, KeyValuePair<Type, List<Type>>>(kvp => kvp.Key, kvp => kvp.Value);
graph.AddItems(requirements);
List<Type> sortedComposerTypes;
try
{
sortedComposerTypes = graph.GetSortedItems().Select(x => x.Key).ToList();
sortedComposerTypes = graph.GetSortedItems().Select(x => x.Key).Where(x => !x.IsInterface).ToList();
}
catch (Exception e)
{
@@ -117,40 +177,37 @@ namespace Umbraco.Core.Composing
throw;
}
// bit verbose but should help for troubleshooting
//var text = "Ordered Composers: " + Environment.NewLine + string.Join(Environment.NewLine, sortedComposerTypes) + Environment.NewLine;
_logger.Debug<Composers>("Ordered Composers: {SortedComposerTypes}", sortedComposerTypes);
return sortedComposerTypes;
}
private static string GetComposersReport(Dictionary<Type, List<Type>> requirements)
internal static string GetComposersReport(Dictionary<Type, List<Type>> requirements)
{
var text = new StringBuilder();
text.AppendLine("Composers & Dependencies:");
text.AppendLine(" < compose before");
text.AppendLine(" > compose after");
text.AppendLine(" : implements");
text.AppendLine(" = depends");
text.AppendLine();
bool HasReq(IEnumerable<Type> types, Type type)
=> types.Any(x => type.IsAssignableFrom(x) && !x.IsInterface);
foreach (var kvp in requirements)
{
var type = kvp.Key;
text.AppendLine(type.FullName);
foreach (var attribute in type.GetCustomAttributes<ComposeAfterAttribute>())
text.AppendLine(" -> " + attribute.RequiredType + (attribute.Weak.HasValue
? (attribute.Weak.Value ? " (weak)" : (" (strong" + (requirements.ContainsKey(attribute.RequiredType) ? ", missing" : "") + ")"))
: ""));
foreach (var attribute in type.GetCustomAttributes<ComposeBeforeAttribute>())
text.AppendLine(" -< " + attribute.RequiringType);
foreach (var i in type.GetInterfaces())
{
text.AppendLine(" : " + i.FullName);
foreach (var attribute in i.GetCustomAttributes<ComposeAfterAttribute>())
text.AppendLine(" -> " + attribute.RequiredType + (attribute.Weak.HasValue
? (attribute.Weak.Value ? " (weak)" : (" (strong" + (requirements.ContainsKey(attribute.RequiredType) ? ", missing" : "") + ")"))
: ""));
foreach (var attribute in i.GetCustomAttributes<ComposeBeforeAttribute>())
text.AppendLine(" -< " + attribute.RequiringType);
var weak = !(attribute.RequiredType.IsInterface ? attribute.Weak == false : attribute.Weak != true);
text.AppendLine(" > " + attribute.RequiredType +
(weak ? " (weak" : " (strong") + (HasReq(requirements.Keys, attribute.RequiredType) ? ", found" : ", missing") + ")");
}
foreach (var attribute in type.GetCustomAttributes<ComposeBeforeAttribute>())
text.AppendLine(" < " + attribute.RequiringType);
foreach (var i in type.GetInterfaces())
text.AppendLine(" : " + i.FullName);
if (kvp.Value != null)
foreach (var t in kvp.Value)
text.AppendLine(" = " + t);
@@ -221,16 +278,16 @@ namespace Umbraco.Core.Composing
types.Remove(kvp.Key);
}
private static void GatherRequirementsFromRequireAttribute(Type type, ICollection<Type> types, IDictionary<Type, List<Type>> requirements)
private static void GatherRequirementsFromAfterAttribute(Type type, ICollection<Type> types, IDictionary<Type, List<Type>> requirements, bool throwOnMissing = true)
{
// get 'require' attributes
// these attributes are *not* inherited because we want to "custom-inherit" for interfaces only
var requireAttributes = type
var afterAttributes = type
.GetInterfaces().SelectMany(x => x.GetCustomAttributes<ComposeAfterAttribute>()) // those marking interfaces
.Concat(type.GetCustomAttributes<ComposeAfterAttribute>()); // those marking the composer
// what happens in case of conflicting attributes (different strong/weak for same type) is not specified.
foreach (var attr in requireAttributes)
foreach (var attr in afterAttributes)
{
if (attr.RequiredType == type) continue; // ignore self-requirements (+ exclude in implems, below)
@@ -238,13 +295,13 @@ namespace Umbraco.Core.Composing
// unless strong, and then require at least one enabled composer implementing that interface
if (attr.RequiredType.IsInterface)
{
var implems = types.Where(x => x != type && attr.RequiredType.IsAssignableFrom(x)).ToList();
var implems = types.Where(x => x != type && attr.RequiredType.IsAssignableFrom(x) && !x.IsInterface).ToList();
if (implems.Count > 0)
{
if (requirements[type] == null) requirements[type] = new List<Type>();
requirements[type].AddRange(implems);
}
else if (attr.Weak == false) // if explicitly set to !weak, is strong, else is weak
else if (attr.Weak == false && throwOnMissing) // if explicitly set to !weak, is strong, else is weak
throw new Exception($"Broken composer dependency: {type.FullName} -> {attr.RequiredType.FullName}.");
}
// requiring a class = require that the composer is enabled
@@ -256,28 +313,28 @@ namespace Umbraco.Core.Composing
if (requirements[type] == null) requirements[type] = new List<Type>();
requirements[type].Add(attr.RequiredType);
}
else if (attr.Weak != true) // if not explicitly set to weak, is strong
else if (attr.Weak != true && throwOnMissing) // if not explicitly set to weak, is strong
throw new Exception($"Broken composer dependency: {type.FullName} -> {attr.RequiredType.FullName}.");
}
}
}
private static void GatherRequirementsFromRequiredByAttribute(Type type, ICollection<Type> types, IDictionary<Type, List<Type>> requirements)
private static void GatherRequirementsFromBeforeAttribute(Type type, ICollection<Type> types, IDictionary<Type, List<Type>> requirements)
{
// get 'required' attributes
// these attributes are *not* inherited because we want to "custom-inherit" for interfaces only
var requiredAttributes = type
var beforeAttributes = type
.GetInterfaces().SelectMany(x => x.GetCustomAttributes<ComposeBeforeAttribute>()) // those marking interfaces
.Concat(type.GetCustomAttributes<ComposeBeforeAttribute>()); // those marking the composer
foreach (var attr in requiredAttributes)
foreach (var attr in beforeAttributes)
{
if (attr.RequiringType == type) continue; // ignore self-requirements (+ exclude in implems, below)
// required by an interface = by any enabled composer implementing this that interface
if (attr.RequiringType.IsInterface)
{
var implems = types.Where(x => x != type && attr.RequiringType.IsAssignableFrom(x)).ToList();
var implems = types.Where(x => x != type && attr.RequiringType.IsAssignableFrom(x) && !x.IsInterface).ToList();
foreach (var implem in implems)
{
if (requirements[implem] == null) requirements[implem] = new List<Type>();
@@ -6,30 +6,50 @@ namespace Umbraco.Core.Composing
/// <summary>
/// Provides a base class for collections of types.
/// </summary>
public abstract class TypeCollectionBuilderBase<TCollection, TConstraint> : ICollectionBuilder<TCollection, Type>
public abstract class TypeCollectionBuilderBase<TBuilder, TCollection, TConstraint> : ICollectionBuilder<TCollection, Type>
where TBuilder : TypeCollectionBuilderBase<TBuilder, TCollection, TConstraint>
where TCollection : class, IBuilderCollection<Type>
{
private readonly HashSet<Type> _types = new HashSet<Type>();
private Type Validate(Type type, string action)
protected abstract TBuilder This { get; }
private static Type Validate(Type type, string action)
{
if (!typeof(TConstraint).IsAssignableFrom(type))
throw new InvalidOperationException($"Cannot {action} type {type.FullName} as it does not inherit from/implement {typeof(TConstraint).FullName}.");
return type;
}
public void Add(Type type) => _types.Add(Validate(type, "add"));
public void Add<T>() => Add(typeof(T));
public void Add(IEnumerable<Type> types)
public TBuilder Add(Type type)
{
foreach (var type in types) Add(type);
_types.Add(Validate(type, "add"));
return This;
}
public void Remove(Type type) => _types.Remove(Validate(type, "remove"));
public TBuilder Add<T>()
{
Add(typeof(T));
return This;
}
public void Remove<T>() => Remove(typeof(T));
public TBuilder Add(IEnumerable<Type> types)
{
foreach (var type in types) Add(type);
return This;
}
public TBuilder Remove(Type type)
{
_types.Remove(Validate(type, "remove"));
return This;
}
public TBuilder Remove<T>()
{
Remove(typeof(T));
return This;
}
public TCollection CreateCollection(IFactory factory)
{
+2 -2
View File
@@ -42,8 +42,8 @@ namespace Umbraco.Core.Composing
private string _currentAssembliesHash;
private IEnumerable<Assembly> _assemblies;
private bool _reportedChange;
private static string _localTempPath;
private static string _fileBasePath;
private readonly string _localTempPath;
private string _fileBasePath;
/// <summary>
/// Initializes a new instance of the <see cref="TypeLoader"/> class.
+9 -1
View File
@@ -4,6 +4,7 @@ using Umbraco.Core.Composing;
using Umbraco.Core.Dictionary;
using Umbraco.Core.IO;
using Umbraco.Core.Logging.Viewer;
using Umbraco.Core.Manifest;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.PackageActions;
using Umbraco.Core.Persistence.Mappers;
@@ -66,9 +67,16 @@ namespace Umbraco.Core
/// Gets the validators collection builder.
/// </summary>
/// <param name="composition">The composition.</param>
internal static ManifestValueValidatorCollectionBuilder Validators(this Composition composition)
internal static ManifestValueValidatorCollectionBuilder ManifestValueValidators(this Composition composition)
=> composition.WithCollectionBuilder<ManifestValueValidatorCollectionBuilder>();
/// <summary>
/// Gets the manifest filter collection builder.
/// </summary>
/// <param name="composition">The composition.</param>
public static ManifestFilterCollectionBuilder ManifestFilters(this Composition composition)
=> composition.WithCollectionBuilder<ManifestFilterCollectionBuilder>();
/// <summary>
/// Gets the components collection builder.
/// </summary>
+7 -1
View File
@@ -7,6 +7,7 @@ using Umbraco.Core.Configuration.HealthChecks;
using Umbraco.Core.Configuration.UmbracoSettings;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Manifest;
namespace Umbraco.Core
{
@@ -41,7 +42,12 @@ namespace Umbraco.Core
configs.Add(() => new CoreDebug());
// GridConfig depends on runtime caches, manifest parsers... and cannot be available during composition
configs.Add<IGridConfig>(factory => new GridConfig(factory.GetInstance<ILogger>(), factory.GetInstance<AppCaches>(), configDir, factory.GetInstance<IRuntimeState>().Debug));
configs.Add<IGridConfig>(factory => new GridConfig(
factory.GetInstance<ILogger>(),
factory.GetInstance<AppCaches>(),
configDir,
factory.GetInstance<ManifestParser>(),
factory.GetInstance<IRuntimeState>().Debug));
}
}
}
@@ -315,7 +315,7 @@ namespace Umbraco.Core.Configuration
var hash = hashString.GenerateHash();
var siteTemp = System.IO.Path.Combine(Environment.ExpandEnvironmentVariables("%temp%"), "UmbracoData", hash);
return _localTempPath = System.IO.Path.Combine(siteTemp, "umbraco.config");
return _localTempPath = siteTemp;
//case LocalTempStorage.Default:
//case LocalTempStorage.Unknown:
@@ -1,14 +1,15 @@
using System.IO;
using Umbraco.Core.Cache;
using Umbraco.Core.Logging;
using Umbraco.Core.Manifest;
namespace Umbraco.Core.Configuration.Grid
{
class GridConfig : IGridConfig
{
public GridConfig(ILogger logger, AppCaches appCaches, DirectoryInfo configFolder, bool isDebug)
public GridConfig(ILogger logger, AppCaches appCaches, DirectoryInfo configFolder, ManifestParser manifestParser, bool isDebug)
{
EditorsConfig = new GridEditorsConfig(logger, appCaches, configFolder, isDebug);
EditorsConfig = new GridEditorsConfig(logger, appCaches, configFolder, manifestParser, isDebug);
}
public IGridEditorsConfig EditorsConfig { get; }
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using Newtonsoft.Json.Linq;
using Umbraco.Core.Cache;
using Umbraco.Core.Composing;
using Umbraco.Core.Logging;
using Umbraco.Core.Manifest;
using Umbraco.Core.PropertyEditors;
@@ -15,13 +13,15 @@ namespace Umbraco.Core.Configuration.Grid
private readonly ILogger _logger;
private readonly AppCaches _appCaches;
private readonly DirectoryInfo _configFolder;
private readonly ManifestParser _manifestParser;
private readonly bool _isDebug;
public GridEditorsConfig(ILogger logger, AppCaches appCaches, DirectoryInfo configFolder, bool isDebug)
public GridEditorsConfig(ILogger logger, AppCaches appCaches, DirectoryInfo configFolder, ManifestParser manifestParser, bool isDebug)
{
_logger = logger;
_appCaches = appCaches;
_configFolder = configFolder;
_manifestParser = manifestParser;
_isDebug = isDebug;
}
@@ -31,9 +31,6 @@ namespace Umbraco.Core.Configuration.Grid
{
List<GridEditor> GetResult()
{
// TODO: should use the common one somehow! + ignoring _appPlugins here!
var parser = new ManifestParser(_appCaches, Current.ManifestValidators, _logger);
var editors = new List<GridEditor>();
var gridConfig = Path.Combine(_configFolder.FullName, "grid.editors.config.js");
if (File.Exists(gridConfig))
@@ -42,7 +39,7 @@ namespace Umbraco.Core.Configuration.Grid
try
{
editors.AddRange(parser.ParseGridEditors(sourceString));
editors.AddRange(_manifestParser.ParseGridEditors(sourceString));
}
catch (Exception ex)
{
@@ -51,7 +48,7 @@ namespace Umbraco.Core.Configuration.Grid
}
// add manifest editors, skip duplicates
foreach (var gridEditor in parser.Manifest.GridEditors)
foreach (var gridEditor in _manifestParser.Manifest.GridEditors)
{
if (editors.Contains(gridEditor) == false) editors.Add(gridEditor);
}
+350 -2
View File
@@ -1,27 +1,375 @@
namespace Umbraco.Core
using System;
namespace Umbraco.Core
{
public static partial class Constants
{
public static class DataTypes
{
public const int LabelString = -92;
//NOTE: unfortunately due to backwards compat we can't move/rename these, with the addition of the GUID
//constants, it would make more sense to have these suffixed with "ID" or in a Subclass called "INT", for
//now all we can do is make a subclass called Guids to put the GUID IDs.
public const int LabelString = System.DefaultLabelDataTypeId;
public const int LabelInt = -91;
public const int LabelBigint = -93;
public const int LabelDateTime = -94;
public const int LabelTime = -98;
public const int LabelDecimal = -99;
public const int Textarea = -89;
public const int Textbox = -88;
public const int RichtextEditor = -87;
public const int Boolean = -49;
public const int DateTime = -36;
public const int DropDownSingle = -39;
public const int DropDownMultiple = -42;
public const int Upload = -90;
public const int DefaultContentListView = -95;
public const int DefaultMediaListView = -96;
public const int DefaultMembersListView = -97;
public const int ImageCropper = 1043;
public const int Tags = 1041;
public static class ReservedPreValueKeys
{
public const string IgnoreUserStartNodes = "ignoreUserStartNodes";
}
/// <summary>
/// Defines the identifiers for Umbraco data types as constants for easy centralized access/management.
/// </summary>
public static class Guids
{
/// <summary>
/// Guid for Content Picker as string
/// </summary>
public const string ContentPicker = "FD1E0DA5-5606-4862-B679-5D0CF3A52A59";
/// <summary>
/// Guid for Content Picker
/// </summary>
public static readonly Guid ContentPickerGuid = new Guid(ContentPicker);
/// <summary>
/// Guid for Member Picker as string
/// </summary>
public const string MemberPicker = "1EA2E01F-EBD8-4CE1-8D71-6B1149E63548";
/// <summary>
/// Guid for Member Picker
/// </summary>
public static readonly Guid MemberPickerGuid = new Guid(MemberPicker);
/// <summary>
/// Guid for Media Picker as string
/// </summary>
public const string MediaPicker = "135D60E0-64D9-49ED-AB08-893C9BA44AE5";
/// <summary>
/// Guid for Media Picker
/// </summary>
public static readonly Guid MediaPickerGuid = new Guid(MediaPicker);
/// <summary>
/// Guid for Multiple Media Picker as string
/// </summary>
public const string MultipleMediaPicker = "9DBBCBBB-2327-434A-B355-AF1B84E5010A";
/// <summary>
/// Guid for Multiple Media Picker
/// </summary>
public static readonly Guid MultipleMediaPickerGuid = new Guid(MultipleMediaPicker);
/// <summary>
/// Guid for Related Links as string
/// </summary>
public const string RelatedLinks = "B4E3535A-1753-47E2-8568-602CF8CFEE6F";
/// <summary>
/// Guid for Related Links
/// </summary>
public static readonly Guid RelatedLinksGuid = new Guid(RelatedLinks);
/// <summary>
/// Guid for Member as string
/// </summary>
public const string Member = "d59be02f-1df9-4228-aa1e-01917d806cda";
/// <summary>
/// Guid for Member
/// </summary>
public static readonly Guid MemberGuid = new Guid(Member);
/// <summary>
/// Guid for Image Cropper as string
/// </summary>
public const string ImageCropper = "1df9f033-e6d4-451f-b8d2-e0cbc50a836f";
/// <summary>
/// Guid for Image Cropper
/// </summary>
public static readonly Guid ImageCropperGuid = new Guid(ImageCropper);
/// <summary>
/// Guid for Tags as string
/// </summary>
public const string Tags = "b6b73142-b9c1-4bf8-a16d-e1c23320b549";
/// <summary>
/// Guid for Tags
/// </summary>
public static readonly Guid TagsGuid = new Guid(Tags);
/// <summary>
/// Guid for List View - Content as string
/// </summary>
public const string ListViewContent = "C0808DD3-8133-4E4B-8CE8-E2BEA84A96A4";
/// <summary>
/// Guid for List View - Content
/// </summary>
public static readonly Guid ListViewContentGuid = new Guid(ListViewContent);
/// <summary>
/// Guid for List View - Media as string
/// </summary>
public const string ListViewMedia = "3A0156C4-3B8C-4803-BDC1-6871FAA83FFF";
/// <summary>
/// Guid for List View - Media
/// </summary>
public static readonly Guid ListViewMediaGuid = new Guid(ListViewMedia);
/// <summary>
/// Guid for List View - Members as string
/// </summary>
public const string ListViewMembers = "AA2C52A0-CE87-4E65-A47C-7DF09358585D";
/// <summary>
/// Guid for List View - Members
/// </summary>
public static readonly Guid ListViewMembersGuid = new Guid(ListViewMembers);
/// <summary>
/// Guid for Date Picker with time as string
/// </summary>
public const string DatePickerWithTime = "e4d66c0f-b935-4200-81f0-025f7256b89a";
/// <summary>
/// Guid for Date Picker with time
/// </summary>
public static readonly Guid DatePickerWithTimeGuid = new Guid(DatePickerWithTime);
/// <summary>
/// Guid for Approved Color as string
/// </summary>
public const string ApprovedColor = "0225af17-b302-49cb-9176-b9f35cab9c17";
/// <summary>
/// Guid for Approved Color
/// </summary>
public static readonly Guid ApprovedColorGuid = new Guid(ApprovedColor);
/// <summary>
/// Guid for Dropdown multiple as string
/// </summary>
public const string DropdownMultiple = "f38f0ac7-1d27-439c-9f3f-089cd8825a53";
/// <summary>
/// Guid for Dropdown multiple
/// </summary>
public static readonly Guid DropdownMultipleGuid = new Guid(DropdownMultiple);
/// <summary>
/// Guid for Radiobox as string
/// </summary>
public const string Radiobox = "bb5f57c9-ce2b-4bb9-b697-4caca783a805";
/// <summary>
/// Guid for Radiobox
/// </summary>
public static readonly Guid RadioboxGuid = new Guid(Radiobox);
/// <summary>
/// Guid for Date Picker as string
/// </summary>
public const string DatePicker = "5046194e-4237-453c-a547-15db3a07c4e1";
/// <summary>
/// Guid for Date Picker
/// </summary>
public static readonly Guid DatePickerGuid = new Guid(DatePicker);
/// <summary>
/// Guid for Dropdown as string
/// </summary>
public const string Dropdown = "0b6a45e7-44ba-430d-9da5-4e46060b9e03";
/// <summary>
/// Guid for Dropdown
/// </summary>
public static readonly Guid DropdownGuid = new Guid(Dropdown);
/// <summary>
/// Guid for Checkbox list as string
/// </summary>
public const string CheckboxList = "fbaf13a8-4036-41f2-93a3-974f678c312a";
/// <summary>
/// Guid for Checkbox list
/// </summary>
public static readonly Guid CheckboxListGuid = new Guid(CheckboxList);
/// <summary>
/// Guid for Checkbox as string
/// </summary>
public const string Checkbox = "92897bc6-a5f3-4ffe-ae27-f2e7e33dda49";
/// <summary>
/// Guid for Checkbox
/// </summary>
public static readonly Guid CheckboxGuid = new Guid(Checkbox);
/// <summary>
/// Guid for Numeric as string
/// </summary>
public const string Numeric = "2e6d3631-066e-44b8-aec4-96f09099b2b5";
/// <summary>
/// Guid for Dropdown
/// </summary>
public static readonly Guid NumericGuid = new Guid(Numeric);
/// <summary>
/// Guid for Richtext editor as string
/// </summary>
public const string RichtextEditor = "ca90c950-0aff-4e72-b976-a30b1ac57dad";
/// <summary>
/// Guid for Richtext editor
/// </summary>
public static readonly Guid RichtextEditorGuid = new Guid(RichtextEditor);
/// <summary>
/// Guid for Textstring as string
/// </summary>
public const string Textstring = "0cc0eba1-9960-42c9-bf9b-60e150b429ae";
/// <summary>
/// Guid for Textstring
/// </summary>
public static readonly Guid TextstringGuid = new Guid(Textstring);
/// <summary>
/// Guid for Textarea as string
/// </summary>
public const string Textarea = "c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3";
/// <summary>
/// Guid for Dropdown
/// </summary>
public static readonly Guid TextareaGuid = new Guid(Textarea);
/// <summary>
/// Guid for Upload as string
/// </summary>
public const string Upload = "84c6b441-31df-4ffe-b67e-67d5bc3ae65a";
/// <summary>
/// Guid for Upload
/// </summary>
public static readonly Guid UploadGuid = new Guid(Upload);
/// <summary>
/// Guid for Label as string
/// </summary>
public const string LabelString = "f0bc4bfb-b499-40d6-ba86-058885a5178c";
/// <summary>
/// Guid for Label string
/// </summary>
public static readonly Guid LabelStringGuid = new Guid(LabelString);
/// <summary>
/// Guid for Label as int
/// </summary>
public const string LabelInt = "8e7f995c-bd81-4627-9932-c40e568ec788";
/// <summary>
/// Guid for Label int
/// </summary>
public static readonly Guid LabelIntGuid = new Guid(LabelInt);
/// <summary>
/// Guid for Label as big int
/// </summary>
public const string LabelBigInt = "930861bf-e262-4ead-a704-f99453565708";
/// <summary>
/// Guid for Label big int
/// </summary>
public static readonly Guid LabelBigIntGuid = new Guid(LabelBigInt);
/// <summary>
/// Guid for Label as date time
/// </summary>
public const string LabelDateTime = "0e9794eb-f9b5-4f20-a788-93acd233a7e4";
/// <summary>
/// Guid for Label date time
/// </summary>
public static readonly Guid LabelDateTimeGuid = new Guid(LabelDateTime);
/// <summary>
/// Guid for Label as time
/// </summary>
public const string LabelTime = "a97cec69-9b71-4c30-8b12-ec398860d7e8";
/// <summary>
/// Guid for Label time
/// </summary>
public static readonly Guid LabelTimeGuid = new Guid(LabelTime);
/// <summary>
/// Guid for Label as decimal
/// </summary>
public const string LabelDecimal = "8f1ef1e1-9de4-40d3-a072-6673f631ca64";
/// <summary>
/// Guid for Label decimal
/// </summary>
public static readonly Guid LabelDecimalGuid = new Guid(LabelDecimal);
}
}
}
}
+56 -6
View File
@@ -5,39 +5,89 @@
public static class Icons
{
/// <summary>
/// System contenttype icon
/// System default icon
/// </summary>
public const string ContentType = "icon-arrangement";
public const string DefaultIcon = Content;
/// <summary>
/// System datatype icon
/// System content icon
/// </summary>
public const string Content = "icon-document";
/// <summary>
/// System content type icon
/// </summary>
public const string ContentType = "icon-item-arrangement";
/// <summary>
/// System data type icon
/// </summary>
public const string DataType = "icon-autofill";
/// <summary>
/// System property editor icon
/// System list view icon
/// </summary>
public const string PropertyEditor = "icon-autofill";
public const string ListView = "icon-thumbnail-list";
/// <summary>
/// System macro icon
/// </summary>
public const string Macro = "icon-settings-alt";
/// <summary>
/// System media file icon
/// </summary>
public const string MediaFile = "icon-document";
/// <summary>
/// System media folder icon
/// </summary>
public const string MediaFolder = "icon-folder";
/// <summary>
/// System media image icon
/// </summary>
public const string MediaImage = "icon-picture";
/// <summary>
/// System media type icon
/// </summary>
public const string MediaType = "icon-thumbnails";
/// <summary>
/// System member icon
/// </summary>
public const string Member = "icon-user";
/// <summary>
/// System member icon
/// System member group icon
/// </summary>
public const string MemberGroup = "icon-users-alt";
/// <summary>
/// System member type icon
/// </summary>
public const string MemberType = "icon-users";
/// <summary>
/// System property editor icon
/// </summary>
public const string PropertyEditor = "icon-autofill";
/// <summary>
/// System member icon
/// </summary>
public const string Template = "icon-layout";
/// <summary>
/// System user icon
/// </summary>
public const string User = "icon-user";
/// <summary>
/// System user group icon
/// </summary>
public const string UserGroup = "icon-users";
}
}
}
@@ -14,6 +14,23 @@ namespace Umbraco.Core
/// </summary>
public const string InternalGenericPropertiesPrefix = "_umb_";
public static class Legacy
{
public static class Aliases
{
public const string Textbox = "Umbraco.Textbox";
public const string Date = "Umbraco.Date";
public const string ContentPicker2 = "Umbraco.ContentPicker2";
public const string MediaPicker2 = "Umbraco.MediaPicker2";
public const string MemberPicker2 = "Umbraco.MemberPicker2";
public const string MultiNodeTreePicker2 = "Umbraco.MultiNodeTreePicker2";
public const string TextboxMultiple = "Umbraco.TextboxMultiple";
public const string RelatedLinks2 = "Umbraco.RelatedLinks2";
public const string RelatedLinks = "Umbraco.RelatedLinks";
}
}
/// <summary>
/// Defines Umbraco built-in property editor aliases.
/// </summary>
@@ -186,6 +203,24 @@ namespace Umbraco.Core
/// <remarks>Must be a valid <see cref="ValueTypes"/> value.</remarks>
public const string DataValueType = "umbracoDataValueType";
}
/// <summary>
/// Defines Umbraco's built-in property editor groups.
/// </summary>
public static class Groups
{
public const string Common = "Common";
public const string Lists = "Lists";
public const string Media = "Media";
public const string People = "People";
public const string Pickers = "Pickers";
public const string RichContent = "Rich Content";
}
}
}
}
+6 -1
View File
@@ -15,13 +15,18 @@ namespace Umbraco.Core
public const int SuperUserId = -1;
/// <summary>
/// The id for the 'unknown' user
/// The id for the 'unknown' user.
/// </summary>
/// <remarks>
/// This is a user row that exists in the DB only for referential integrity but the user is never returned from any of the services
/// </remarks>
public const int UnknownUserId = 0;
/// <summary>
/// The name of the 'unknown' user.
/// </summary>
public const string UnknownUserName = "SYTEM";
public const string AdminGroupAlias = "admin";
public const string SensitiveDataGroupAlias = "sensitiveData";
public const string TranslatorGroupAlias = "translator";
@@ -66,44 +66,44 @@ namespace Umbraco.Core
/// <summary>
/// Determines whether the content type is invariant.
/// </summary>
public static bool VariesByNothing(this PublishedContentType contentType) => contentType.Variations.VariesByNothing();
public static bool VariesByNothing(this IPublishedContentType contentType) => contentType.Variations.VariesByNothing();
/// <summary>
/// Determines whether the content type varies by culture.
/// </summary>
/// <remarks>And then it could also vary by segment.</remarks>
public static bool VariesByCulture(this PublishedContentType contentType) => contentType.Variations.VariesByCulture();
public static bool VariesByCulture(this IPublishedContentType contentType) => contentType.Variations.VariesByCulture();
/// <summary>
/// Determines whether the content type varies by segment.
/// </summary>
/// <remarks>And then it could also vary by culture.</remarks>
public static bool VariesBySegment(this PublishedContentType contentType) => contentType.Variations.VariesBySegment();
public static bool VariesBySegment(this IPublishedContentType contentType) => contentType.Variations.VariesBySegment();
/// <summary>
/// Determines whether the content type varies by culture and segment.
/// </summary>
public static bool VariesByCultureAndSegment(this PublishedContentType contentType) => contentType.Variations.VariesByCultureAndSegment();
public static bool VariesByCultureAndSegment(this IPublishedContentType contentType) => contentType.Variations.VariesByCultureAndSegment();
/// <summary>
/// Determines whether the property type is invariant.
/// </summary>
public static bool VariesByNothing(this PublishedPropertyType propertyType) => propertyType.Variations.VariesByNothing();
public static bool VariesByNothing(this IPublishedPropertyType propertyType) => propertyType.Variations.VariesByNothing();
/// <summary>
/// Determines whether the property type varies by culture.
/// </summary>
public static bool VariesByCulture(this PublishedPropertyType propertyType) => propertyType.Variations.VariesByCulture();
public static bool VariesByCulture(this IPublishedPropertyType propertyType) => propertyType.Variations.VariesByCulture();
/// <summary>
/// Determines whether the property type varies by segment.
/// </summary>
public static bool VariesBySegment(this PublishedPropertyType propertyType) => propertyType.Variations.VariesBySegment();
public static bool VariesBySegment(this IPublishedPropertyType propertyType) => propertyType.Variations.VariesBySegment();
/// <summary>
/// Determines whether the property type varies by culture and segment.
/// </summary>
public static bool VariesByCultureAndSegment(this PublishedPropertyType propertyType) => propertyType.Variations.VariesByCultureAndSegment();
public static bool VariesByCultureAndSegment(this IPublishedPropertyType propertyType) => propertyType.Variations.VariesByCultureAndSegment();
/// <summary>
/// Determines whether a variation is invariant.
+14 -1
View File
@@ -10,6 +10,20 @@ namespace Umbraco.Core
///</summary>
public static class EnumerableExtensions
{
internal static bool IsCollectionEmpty<T>(this IReadOnlyCollection<T> list) => list == null || list.Count == 0;
internal static bool HasDuplicates<T>(this IEnumerable<T> items, bool includeNull)
{
var hs = new HashSet<T>();
foreach (var item in items)
{
if ((item != null || includeNull) && !hs.Add(item))
return true;
}
return false;
}
/// <summary>
/// Wraps this object instance into an IEnumerable{T} consisting of a single item.
/// </summary>
@@ -100,7 +114,6 @@ namespace Umbraco.Core
}
}
/// <summary>
/// Returns true if all items in the other collection exist in this collection
/// </summary>
@@ -1,7 +1,11 @@
using System;
using System.Text;
using System.Web;
using Serilog;
using Serilog.Configuration;
using Serilog.Core;
using Serilog.Events;
using Serilog.Formatting;
using Serilog.Formatting.Compact;
using Umbraco.Core.Logging.Serilog.Enrichers;
@@ -9,6 +13,7 @@ namespace Umbraco.Core.Logging.Serilog
{
public static class LoggerConfigExtensions
{
private const string AppDomainId = "AppDomainId";
/// <summary>
/// This configures Serilog with some defaults
/// Such as adding ProcessID, Thread, AppDomain etc
@@ -28,14 +33,14 @@ namespace Umbraco.Core.Logging.Serilog
.Enrich.WithProcessId()
.Enrich.WithProcessName()
.Enrich.WithThreadId()
.Enrich.WithProperty("AppDomainId", AppDomain.CurrentDomain.Id)
.Enrich.WithProperty(AppDomainId, AppDomain.CurrentDomain.Id)
.Enrich.WithProperty("AppDomainAppId", HttpRuntime.AppDomainAppId.ReplaceNonAlphanumericChars(string.Empty))
.Enrich.WithProperty("MachineName", Environment.MachineName)
.Enrich.With<Log4NetLevelMapperEnricher>()
.Enrich.With<HttpSessionIdEnricher>()
.Enrich.With<HttpRequestNumberEnricher>()
.Enrich.With<HttpRequestIdEnricher>();
return logConfig;
}
@@ -50,15 +55,51 @@ namespace Umbraco.Core.Logging.Serilog
//Main .txt logfile - in similar format to older Log4Net output
//Ends with ..txt as Date is inserted before file extension substring
logConfig.WriteTo.File($@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\UmbracoTraceLog.{Environment.MachineName}..txt",
shared: true,
rollingInterval: RollingInterval.Day,
restrictedToMinimumLevel: minimumLevel,
retainedFileCountLimit: null, //Setting to null means we keep all files - default is 31 days
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss,fff} [P{ProcessId}/D{AppDomainId}/T{ThreadId}] {Log4NetLevel} {SourceContext} - {Message:lj}{NewLine}{Exception}");
shared: true,
rollingInterval: RollingInterval.Day,
restrictedToMinimumLevel: minimumLevel,
retainedFileCountLimit: null, //Setting to null means we keep all files - default is 31 days
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss,fff} [P{ProcessId}/D{AppDomainId}/T{ThreadId}] {Log4NetLevel} {SourceContext} - {Message:lj}{NewLine}{Exception}");
return logConfig;
}
/// <remarks>
/// Used in config - If renamed or moved to other assembly the config file also has be updated.
/// </remarks>
public static LoggerConfiguration File(this LoggerSinkConfiguration configuration, ITextFormatter formatter,
string path,
LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose,
LoggingLevelSwitch levelSwitch = null,
long? fileSizeLimitBytes = 1073741824,
TimeSpan? flushToDiskInterval = null,
RollingInterval rollingInterval = RollingInterval.Infinite,
bool rollOnFileSizeLimit = false,
int? retainedFileCountLimit = 31,
Encoding encoding = null
)
{
return configuration.Async(
asyncConfiguration => asyncConfiguration.Map(AppDomainId, (_,mapConfiguration) =>
mapConfiguration.File(
formatter,
path,
restrictedToMinimumLevel,
fileSizeLimitBytes,
levelSwitch,
buffered:true,
shared:false,
flushToDiskInterval,
rollingInterval,
rollOnFileSizeLimit,
retainedFileCountLimit,
encoding),
sinkMapCountLimit:0)
);
}
/// <summary>
/// Outputs a CLEF format JSON log at /App_Data/Logs/
/// </summary>
@@ -13,7 +13,7 @@ namespace Umbraco.Core.Logging.Serilog
///<summary>
/// Implements <see cref="ILogger"/> on top of Serilog.
///</summary>
public class SerilogLogger : ILogger
public class SerilogLogger : ILogger, IDisposable
{
/// <summary>
/// Initialize a new instance of the <see cref="SerilogLogger"/> class with a configuration file.
@@ -271,5 +271,10 @@ namespace Umbraco.Core.Logging.Serilog
{
LoggerFor(reporting).Verbose(messageTemplate, propertyValues);
}
public void Dispose()
{
Log.CloseAndFlush();
}
}
}
@@ -26,26 +26,26 @@ namespace Umbraco.Core.Logging.Viewer
/// A count of number of errors
/// By counting Warnings with Exceptions, Errors & Fatal messages
/// </summary>
int GetNumberOfErrors(DateTimeOffset startDate, DateTimeOffset endDate);
int GetNumberOfErrors(LogTimePeriod logTimePeriod);
/// <summary>
/// Returns a number of the different log level entries
/// </summary>
LogLevelCounts GetLogLevelCounts(DateTimeOffset startDate, DateTimeOffset endDate);
LogLevelCounts GetLogLevelCounts(LogTimePeriod logTimePeriod);
/// <summary>
/// Returns a list of all unique message templates and their counts
/// </summary>
IEnumerable<LogTemplate> GetMessageTemplates(DateTimeOffset startDate, DateTimeOffset endDate);
IEnumerable<LogTemplate> GetMessageTemplates(LogTimePeriod logTimePeriod);
bool CanHandleLargeLogs { get; }
bool CheckCanOpenLogs(DateTimeOffset startDate, DateTimeOffset endDate);
bool CheckCanOpenLogs(LogTimePeriod logTimePeriod);
/// <summary>
/// Returns the collection of logs
/// </summary>
PagedResult<LogMessage> GetLogs(DateTimeOffset startDate, DateTimeOffset endDate,
PagedResult<LogMessage> GetLogs(LogTimePeriod logTimePeriod,
int pageNumber = 1,
int pageSize = 100,
Direction orderDirection = Direction.Descending,
@@ -26,7 +26,7 @@ namespace Umbraco.Core.Logging.Viewer
public override bool CanHandleLargeLogs => false;
public override bool CheckCanOpenLogs(DateTimeOffset startDate, DateTimeOffset endDate)
public override bool CheckCanOpenLogs(LogTimePeriod logTimePeriod)
{
//Log Directory
var logDirectory = _logsPath;
@@ -36,10 +36,10 @@ namespace Umbraco.Core.Logging.Viewer
//foreach full day in the range - see if we can find one or more filenames that end with
//yyyyMMdd.json - Ends with due to MachineName in filenames - could be 1 or more due to load balancing
for (var day = startDate.Date; day.Date <= endDate.Date; day = day.AddDays(1))
for (var day = logTimePeriod.StartTime.Date; day.Date <= logTimePeriod.EndTime.Date; day = day.AddDays(1))
{
//Filename ending to search for (As could be multiple)
var filesToFind = $"*{day:yyyyMMdd}.json";
var filesToFind = GetSearchPattern(day);
var filesForCurrentDay = Directory.GetFiles(logDirectory, filesToFind);
@@ -52,7 +52,12 @@ namespace Umbraco.Core.Logging.Viewer
return logSizeAsMegabytes <= FileSizeCap;
}
protected override IReadOnlyList<LogEvent> GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, ILogFilter filter, int skip, int take)
private string GetSearchPattern(DateTime day)
{
return $"*{day:yyyyMMdd}*.json";
}
protected override IReadOnlyList<LogEvent> GetLogs(LogTimePeriod logTimePeriod, ILogFilter filter, int skip, int take)
{
var logs = new List<LogEvent>();
@@ -63,10 +68,10 @@ namespace Umbraco.Core.Logging.Viewer
//foreach full day in the range - see if we can find one or more filenames that end with
//yyyyMMdd.json - Ends with due to MachineName in filenames - could be 1 or more due to load balancing
for (var day = startDate.Date; day.Date <= endDate.Date; day = day.AddDays(1))
for (var day = logTimePeriod.StartTime.Date; day.Date <= logTimePeriod.EndTime.Date; day = day.AddDays(1))
{
//Filename ending to search for (As could be multiple)
var filesToFind = $"*{day:yyyyMMdd}.json";
var filesToFind = GetSearchPattern(day);
var filesForCurrentDay = Directory.GetFiles(logDirectory, filesToFind);
@@ -0,0 +1,16 @@
using System;
namespace Umbraco.Core.Logging.Viewer
{
public class LogTimePeriod
{
public LogTimePeriod(DateTime startTime, DateTime endTime)
{
StartTime = startTime;
EndTime = endTime;
}
public DateTime StartTime { get; }
public DateTime EndTime { get; }
}
}
@@ -27,9 +27,9 @@ namespace Umbraco.Core.Logging.Viewer
/// <summary>
/// Get all logs from your chosen data source back as Serilog LogEvents
/// </summary>
protected abstract IReadOnlyList<LogEvent> GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, ILogFilter filter, int skip, int take);
protected abstract IReadOnlyList<LogEvent> GetLogs(LogTimePeriod logTimePeriod, ILogFilter filter, int skip, int take);
public abstract bool CheckCanOpenLogs(DateTimeOffset startDate, DateTimeOffset endDate);
public abstract bool CheckCanOpenLogs(LogTimePeriod logTimePeriod);
public virtual IReadOnlyList<SavedLogSearch> GetSavedSearches()
{
@@ -82,24 +82,24 @@ namespace Umbraco.Core.Logging.Viewer
return searches;
}
public int GetNumberOfErrors(DateTimeOffset startDate, DateTimeOffset endDate)
public int GetNumberOfErrors(LogTimePeriod logTimePeriod)
{
var errorCounter = new ErrorCounterFilter();
GetLogs(startDate, endDate, errorCounter, 0, int.MaxValue);
GetLogs(logTimePeriod, errorCounter, 0, int.MaxValue);
return errorCounter.Count;
}
public LogLevelCounts GetLogLevelCounts(DateTimeOffset startDate, DateTimeOffset endDate)
public LogLevelCounts GetLogLevelCounts(LogTimePeriod logTimePeriod)
{
var counter = new CountingFilter();
GetLogs(startDate, endDate, counter, 0, int.MaxValue);
GetLogs(logTimePeriod, counter, 0, int.MaxValue);
return counter.Counts;
}
public IEnumerable<LogTemplate> GetMessageTemplates(DateTimeOffset startDate, DateTimeOffset endDate)
public IEnumerable<LogTemplate> GetMessageTemplates(LogTimePeriod logTimePeriod)
{
var messageTemplates = new MessageTemplateFilter();
GetLogs(startDate, endDate, messageTemplates, 0, int.MaxValue);
GetLogs(logTimePeriod, messageTemplates, 0, int.MaxValue);
var templates = messageTemplates.Counts.
Select(x => new LogTemplate { MessageTemplate = x.Key, Count = x.Value })
@@ -108,14 +108,14 @@ namespace Umbraco.Core.Logging.Viewer
return templates;
}
public PagedResult<LogMessage> GetLogs(DateTimeOffset startDate, DateTimeOffset endDate,
public PagedResult<LogMessage> GetLogs(LogTimePeriod logTimePeriod,
int pageNumber = 1, int pageSize = 100,
Direction orderDirection = Direction.Descending,
string filterExpression = null,
string[] logLevels = null)
{
var expression = new ExpressionFilter(filterExpression);
var filteredLogs = GetLogs(startDate, endDate, expression, 0, int.MaxValue);
var filteredLogs = GetLogs(logTimePeriod, expression, 0, int.MaxValue);
//This is user used the checkbox UI to toggle which log levels they wish to see
//If an empty array or null - its implied all levels to be viewed
+6 -1
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Web.Hosting;
@@ -113,7 +114,7 @@ namespace Umbraco.Core
lock (_locko)
{
_logger.Debug<MainDom>("Signaled {Signaled} ({SignalSource})", _signaled ? "(again)" : string.Empty, source);
_logger.Debug<MainDom>("Signaled ({Signaled}) ({SignalSource})", _signaled ? "again" : "first", source);
if (_signaled) return;
if (_isMainDom == false) return; // probably not needed
_signaled = true;
@@ -171,6 +172,7 @@ namespace Umbraco.Core
// if more than 1 instance reach that point, one will get the lock
// and the other one will timeout, which is accepted
//TODO: This can throw a TimeoutException - in which case should this be in a try/finally to ensure the signal is always reset?
_asyncLocker = _asyncLock.Lock(LockTimeoutMilliseconds);
_isMainDom = true;
@@ -181,6 +183,9 @@ namespace Umbraco.Core
// which is accepted
_signal.Reset();
//WaitOneAsync (ext method) will wait for a signal without blocking the main thread, the waiting is done on a background thread
_signal.WaitOneAsync()
.ContinueWith(_ => OnSignal("signal"));
@@ -0,0 +1,19 @@
using System.Collections.Generic;
namespace Umbraco.Core.Manifest
{
/// <summary>
/// Provides filtering for package manifests.
/// </summary>
public interface IManifestFilter
{
/// <summary>
/// Filters package manifests.
/// </summary>
/// <param name="manifests">The package manifests.</param>
/// <remarks>
/// <para>It is possible to remove, change, or add manifests.</para>
/// </remarks>
void Filter(List<PackageManifest> manifests);
}
}
@@ -0,0 +1,28 @@
using System.Collections.Generic;
using Umbraco.Core.Composing;
namespace Umbraco.Core.Manifest
{
/// <summary>
/// Contains the manifest filters.
/// </summary>
public class ManifestFilterCollection : BuilderCollectionBase<IManifestFilter>
{
/// <summary>
/// Initializes a new instance of the <see cref="ManifestFilterCollection"/> class.
/// </summary>
public ManifestFilterCollection(IEnumerable<IManifestFilter> items)
: base(items)
{ }
/// <summary>
/// Filters package manifests.
/// </summary>
/// <param name="manifests">The package manifests.</param>
public void Filter(List<PackageManifest> manifests)
{
foreach (var filter in this)
filter.Filter(manifests);
}
}
}
@@ -0,0 +1,12 @@
using Umbraco.Core.Composing;
namespace Umbraco.Core.Manifest
{
public class ManifestFilterCollectionBuilder : OrderedCollectionBuilderBase<ManifestFilterCollectionBuilder, ManifestFilterCollection, IManifestFilter>
{
protected override ManifestFilterCollectionBuilder This => this;
// do NOT cache this, it's only used once
protected override Lifetime CollectionLifetime => Lifetime.Transient;
}
}
+8 -3
View File
@@ -22,24 +22,26 @@ namespace Umbraco.Core.Manifest
private readonly IAppPolicyCache _cache;
private readonly ILogger _logger;
private readonly ManifestValueValidatorCollection _validators;
private readonly ManifestFilterCollection _filters;
private string _path;
/// <summary>
/// Initializes a new instance of the <see cref="ManifestParser"/> class.
/// </summary>
public ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, ILogger logger)
: this(appCaches, validators, "~/App_Plugins", logger)
public ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, ManifestFilterCollection filters, ILogger logger)
: this(appCaches, validators, filters, "~/App_Plugins", logger)
{ }
/// <summary>
/// Initializes a new instance of the <see cref="ManifestParser"/> class.
/// </summary>
private ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, string path, ILogger logger)
private ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, ManifestFilterCollection filters, string path, ILogger logger)
{
if (appCaches == null) throw new ArgumentNullException(nameof(appCaches));
_cache = appCaches.RuntimeCache;
_validators = validators ?? throw new ArgumentNullException(nameof(validators));
_filters = filters ?? throw new ArgumentNullException(nameof(filters));
if (string.IsNullOrWhiteSpace(path)) throw new ArgumentNullOrEmptyException(nameof(path));
Path = path;
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
@@ -78,6 +80,7 @@ namespace Umbraco.Core.Manifest
if (string.IsNullOrWhiteSpace(text))
continue;
var manifest = ParseManifest(text);
manifest.Source = path;
manifests.Add(manifest);
}
catch (Exception e)
@@ -86,6 +89,8 @@ namespace Umbraco.Core.Manifest
}
}
_filters.Filter(manifests);
return manifests;
}
@@ -9,6 +9,16 @@ namespace Umbraco.Core.Manifest
/// </summary>
public class PackageManifest
{
/// <summary>
/// Gets the source path of the manifest.
/// </summary>
/// <remarks>
/// <para>Gets the full absolute file path of the manifest,
/// using system directory separators.</para>
/// </remarks>
[JsonIgnore]
public string Source { get; set; }
/// <summary>
/// Gets or sets the scripts listed in the manifest.
/// </summary>
+13
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Umbraco.Core.Mapping
{
@@ -112,6 +113,18 @@ namespace Umbraco.Core.Mapping
}
*/
/// <summary>
/// Maps an enumerable of source objects to a new list of target objects.
/// </summary>
/// <typeparam name="TSourceElement">The type of the source objects.</typeparam>
/// <typeparam name="TTargetElement">The type of the target objects.</typeparam>
/// <param name="source">The source objects.</param>
/// <returns>A list containing the target objects.</returns>
public List<TTargetElement> MapEnumerable<TSourceElement, TTargetElement>(IEnumerable<TSourceElement> source)
{
return source.Select(Map<TSourceElement, TTargetElement>).ToList();
}
#endregion
}
}
+59 -13
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
@@ -29,11 +30,16 @@ namespace Umbraco.Core.Mapping
/// </remarks>
public class UmbracoMapper
{
private readonly Dictionary<Type, Dictionary<Type, Func<object, MapperContext, object>>> _ctors
= new Dictionary<Type, Dictionary<Type, Func<object, MapperContext, object>>>();
// note
//
// the outer dictionary *can* be modified, see GetCtor and GetMap, hence have to be ConcurrentDictionary
// the inner dictionaries are never modified and therefore can be simple Dictionary
private readonly Dictionary<Type, Dictionary<Type, Action<object, object, MapperContext>>> _maps
= new Dictionary<Type, Dictionary<Type, Action<object, object, MapperContext>>>();
private readonly ConcurrentDictionary<Type, Dictionary<Type, Func<object, MapperContext, object>>> _ctors
= new ConcurrentDictionary<Type, Dictionary<Type, Func<object, MapperContext, object>>>();
private readonly ConcurrentDictionary<Type, Dictionary<Type, Action<object, object, MapperContext>>> _maps
= new ConcurrentDictionary<Type, Dictionary<Type, Action<object, object, MapperContext>>>();
/// <summary>
/// Initializes a new instance of the <see cref="UmbracoMapper"/> class.
@@ -101,16 +107,12 @@ namespace Umbraco.Core.Mapping
private Dictionary<Type, Func<object, MapperContext, object>> DefineCtors(Type sourceType)
{
if (!_ctors.TryGetValue(sourceType, out var sourceCtor))
sourceCtor = _ctors[sourceType] = new Dictionary<Type, Func<object, MapperContext, object>>();
return sourceCtor;
return _ctors.GetOrAdd(sourceType, _ => new Dictionary<Type, Func<object, MapperContext, object>>());
}
private Dictionary<Type, Action<object, object, MapperContext>> DefineMaps(Type sourceType)
{
if (!_maps.TryGetValue(sourceType, out var sourceMap))
sourceMap = _maps[sourceType] = new Dictionary<Type, Action<object, object, MapperContext>>();
return sourceMap;
return _maps.GetOrAdd(sourceType, _ => new Dictionary<Type, Action<object, object, MapperContext>>());
}
#endregion
@@ -189,7 +191,7 @@ namespace Umbraco.Core.Mapping
private TTarget Map<TTarget>(object source, Type sourceType, MapperContext context)
{
if (source == null)
throw new ArgumentNullException(nameof(source));
return default;
var targetType = typeof(TTarget);
@@ -229,7 +231,7 @@ namespace Umbraco.Core.Mapping
if (ctor != null && map != null)
{
// register (for next time) and do it now (for this time)
object NCtor(object s, MapperContext c) => MapEnumerable<TTarget>((IEnumerable) s, targetGenericArg, ctor, map, c);
object NCtor(object s, MapperContext c) => MapEnumerableInternal<TTarget>((IEnumerable) s, targetGenericArg, ctor, map, c);
DefineCtors(sourceType)[targetType] = NCtor;
DefineMaps(sourceType)[targetType] = Identity;
return (TTarget) NCtor(source, context);
@@ -241,7 +243,7 @@ namespace Umbraco.Core.Mapping
throw new InvalidOperationException($"Don't know how to map {sourceType.FullName} to {targetType.FullName}.");
}
private TTarget MapEnumerable<TTarget>(IEnumerable source, Type targetGenericArg, Func<object, MapperContext, object> ctor, Action<object, object, MapperContext> map, MapperContext context)
private TTarget MapEnumerableInternal<TTarget>(IEnumerable source, Type targetGenericArg, Func<object, MapperContext, object> ctor, Action<object, object, MapperContext> map, MapperContext context)
{
var targetList = (IList)Activator.CreateInstance(typeof(List<>).MakeGenericType(targetGenericArg));
@@ -326,6 +328,8 @@ namespace Umbraco.Core.Mapping
if (_ctors.TryGetValue(sourceType, out var sourceCtor) && sourceCtor.TryGetValue(targetType, out var ctor))
return ctor;
// we *may* run this more than once but it does not matter
ctor = null;
foreach (var (stype, sctors) in _ctors)
{
@@ -347,6 +351,8 @@ namespace Umbraco.Core.Mapping
if (_maps.TryGetValue(sourceType, out var sourceMap) && sourceMap.TryGetValue(targetType, out var map))
return map;
// we *may* run this more than once but it does not matter
map = null;
foreach (var (stype, smap) in _maps)
{
@@ -379,6 +385,46 @@ namespace Umbraco.Core.Mapping
throw new Exception("panic");
}
/// <summary>
/// Maps an enumerable of source objects to a new list of target objects.
/// </summary>
/// <typeparam name="TSourceElement">The type of the source objects.</typeparam>
/// <typeparam name="TTargetElement">The type of the target objects.</typeparam>
/// <param name="source">The source objects.</param>
/// <returns>A list containing the target objects.</returns>
public List<TTargetElement> MapEnumerable<TSourceElement, TTargetElement>(IEnumerable<TSourceElement> source)
{
return source.Select(Map<TSourceElement, TTargetElement>).ToList();
}
/// <summary>
/// Maps an enumerable of source objects to a new list of target objects.
/// </summary>
/// <typeparam name="TSourceElement">The type of the source objects.</typeparam>
/// <typeparam name="TTargetElement">The type of the target objects.</typeparam>
/// <param name="source">The source objects.</param>
/// <param name="f">A mapper context preparation method.</param>
/// <returns>A list containing the target objects.</returns>
public List<TTargetElement> MapEnumerable<TSourceElement, TTargetElement>(IEnumerable<TSourceElement> source, Action<MapperContext> f)
{
var context = new MapperContext(this);
f(context);
return source.Select(x => Map<TSourceElement, TTargetElement>(x, context)).ToList();
}
/// <summary>
/// Maps an enumerable of source objects to a new list of target objects.
/// </summary>
/// <typeparam name="TSourceElement">The type of the source objects.</typeparam>
/// <typeparam name="TTargetElement">The type of the target objects.</typeparam>
/// <param name="source">The source objects.</param>
/// <param name="context">A mapper context.</param>
/// <returns>A list containing the target objects.</returns>
public List<TTargetElement> MapEnumerable<TSourceElement, TTargetElement>(IEnumerable<TSourceElement> source, MapperContext context)
{
return source.Select(x => Map<TSourceElement, TTargetElement>(x, context)).ToList();
}
#endregion
}
}
@@ -83,17 +83,25 @@ namespace Umbraco.Core.Migrations.Expressions.Create
}
/// <inheritdoc />
public ICreateConstraintOnTableBuilder PrimaryKey()
public ICreateConstraintOnTableBuilder PrimaryKey() => PrimaryKey(true);
/// <inheritdoc />
public ICreateConstraintOnTableBuilder PrimaryKey(bool clustered)
{
var expression = new CreateConstraintExpression(_context, ConstraintType.PrimaryKey);
expression.Constraint.IsPrimaryKeyClustered = clustered;
return new CreateConstraintBuilder(expression);
}
/// <inheritdoc />
public ICreateConstraintOnTableBuilder PrimaryKey(string primaryKeyName)
public ICreateConstraintOnTableBuilder PrimaryKey(string primaryKeyName) => PrimaryKey(primaryKeyName, true);
/// <inheritdoc />
public ICreateConstraintOnTableBuilder PrimaryKey(string primaryKeyName, bool clustered)
{
var expression = new CreateConstraintExpression(_context, ConstraintType.PrimaryKey);
expression.Constraint.ConstraintName = primaryKeyName;
expression.Constraint.IsPrimaryKeyClustered = clustered;
return new CreateConstraintBuilder(expression);
}
@@ -19,7 +19,7 @@ namespace Umbraco.Core.Migrations.Expressions.Create.Expressions
var constraintType = (Constraint.IsPrimaryKeyConstraint) ? "PRIMARY KEY" : "UNIQUE";
if (Constraint.IsPrimaryKeyConstraint && SqlSyntax.SupportsClustered())
constraintType += " CLUSTERED";
constraintType += Constraint.IsPrimaryKeyClustered ? " CLUSTERED" : " NONCLUSTERED";
if (Constraint.IsNonUniqueConstraint)
constraintType = string.Empty;
@@ -68,6 +68,16 @@ namespace Umbraco.Core.Migrations.Expressions.Create
/// </summary>
ICreateConstraintOnTableBuilder PrimaryKey(string primaryKeyName);
/// <summary>
/// Builds a Create Primary Key expression.
/// </summary>
ICreateConstraintOnTableBuilder PrimaryKey(bool clustered);
/// <summary>
/// Builds a Create Primary Key expression.
/// </summary>
ICreateConstraintOnTableBuilder PrimaryKey(string primaryKeyName, bool clustered);
/// <summary>
/// Builds a Create Unique Constraint expression.
/// </summary>
@@ -25,11 +25,25 @@ namespace Umbraco.Core.Migrations.Expressions.Create.KeysAndIndexes
var syntax = _context.SqlContext.SqlSyntax;
var tableDefinition = DefinitionFactory.GetTableDefinition(TypeOfDto, syntax);
// note: of course we are creating the keys and indexes as per the DTO, so
// changing the DTO may break old migrations - or, better, these migrations
// should capture a copy of the DTO class that will not change
ExecuteSql(syntax.FormatPrimaryKey(tableDefinition));
foreach (var sql in syntax.Format(tableDefinition.Indexes))
ExecuteSql(sql);
foreach (var sql in syntax.Format(tableDefinition.ForeignKeys))
ExecuteSql(sql);
// note: we do *not* create the DF_ default constraints
/*
foreach (var column in tableDefinition.Columns)
{
var sql = syntax.FormatDefaultConstraint(column);
if (!sql.IsNullOrWhiteSpace())
ExecuteSql(sql);
}
*/
}
private void ExecuteSql(string sql)
@@ -10,9 +10,13 @@ namespace Umbraco.Core.Migrations.Expressions.Delete.DefaultConstraint
IDeleteDefaultConstraintOnTableBuilder,
IDeleteDefaultConstraintOnColumnBuilder
{
public DeleteDefaultConstraintBuilder(DeleteDefaultConstraintExpression expression)
private readonly IMigrationContext _context;
public DeleteDefaultConstraintBuilder(IMigrationContext context, DeleteDefaultConstraintExpression expression)
: base(expression)
{ }
{
_context = context;
}
/// <inheritdoc />
public IDeleteDefaultConstraintOnColumnBuilder OnTable(string tableName)
@@ -25,6 +29,9 @@ namespace Umbraco.Core.Migrations.Expressions.Delete.DefaultConstraint
public IExecutableBuilder OnColumn(string columnName)
{
Expression.ColumnName = columnName;
Expression.HasDefaultConstraint = _context.SqlContext.SqlSyntax.TryGetDefaultConstraint(_context.Database, Expression.TableName, columnName, out var constraintName);
Expression.ConstraintName = constraintName ?? string.Empty;
return new ExecutableBuilder(Expression);
}
}
@@ -1,4 +1,4 @@
using NPoco;
using Umbraco.Core.Exceptions;
using Umbraco.Core.Migrations.Expressions.Common;
using Umbraco.Core.Migrations.Expressions.Delete.Column;
using Umbraco.Core.Migrations.Expressions.Delete.Constraint;
@@ -29,9 +29,19 @@ namespace Umbraco.Core.Migrations.Expressions.Delete
}
/// <inheritdoc />
public IExecutableBuilder KeysAndIndexes(string tableName = null)
public IExecutableBuilder KeysAndIndexes<TDto>(bool local = true, bool foreign = true)
{
return new DeleteKeysAndIndexesBuilder(_context) { TableName = tableName };
var syntax = _context.SqlContext.SqlSyntax;
var tableDefinition = DefinitionFactory.GetTableDefinition(typeof(TDto), syntax);
return KeysAndIndexes(tableDefinition.Name, local, foreign);
}
/// <inheritdoc />
public IExecutableBuilder KeysAndIndexes(string tableName, bool local = true, bool foreign = true)
{
if (tableName.IsNullOrWhiteSpace())
throw new ArgumentNullOrEmptyException(nameof(tableName));
return new DeleteKeysAndIndexesBuilder(_context) { TableName = tableName, DeleteLocal = local, DeleteForeign = foreign };
}
/// <inheritdoc />
@@ -100,7 +110,7 @@ namespace Umbraco.Core.Migrations.Expressions.Delete
public IDeleteDefaultConstraintOnTableBuilder DefaultConstraint()
{
var expression = new DeleteDefaultConstraintExpression(_context);
return new DeleteDefaultConstraintBuilder(expression);
return new DeleteDefaultConstraintBuilder(_context, expression);
}
}
}
@@ -10,12 +10,17 @@ namespace Umbraco.Core.Migrations.Expressions.Delete.Expressions
public virtual string TableName { get; set; }
public virtual string ColumnName { get; set; }
public virtual string ConstraintName { get; set; }
public virtual bool HasDefaultConstraint { get; set; }
protected override string GetSql()
{
return string.Format(SqlSyntax.DeleteDefaultConstraint,
SqlSyntax.GetQuotedTableName(TableName),
SqlSyntax.GetQuotedColumnName(ColumnName));
return HasDefaultConstraint
? string.Format(SqlSyntax.DeleteDefaultConstraint,
SqlSyntax.GetQuotedTableName(TableName),
SqlSyntax.GetQuotedColumnName(ColumnName),
SqlSyntax.GetQuotedName(ConstraintName))
: string.Empty;
}
}
}
@@ -19,9 +19,14 @@ namespace Umbraco.Core.Migrations.Expressions.Delete
IExecutableBuilder Table(string tableName);
/// <summary>
/// Specifies the table to delete keys and indexes for.
/// Builds a Delete Keys and Indexes expression, and executes.
/// </summary>
IExecutableBuilder KeysAndIndexes(string tableName = null);
IExecutableBuilder KeysAndIndexes<TDto>(bool local = true, bool foreign = true);
/// <summary>
/// Builds a Delete Keys and Indexes expression, and executes.
/// </summary>
IExecutableBuilder KeysAndIndexes(string tableName, bool local = true, bool foreign = true);
/// <summary>
/// Specifies the column to delete.
@@ -18,34 +18,38 @@ namespace Umbraco.Core.Migrations.Expressions.Delete.KeysAndIndexes
public string TableName { get; set; }
public bool DeleteLocal { get; set; }
public bool DeleteForeign { get; set; }
/// <inheritdoc />
public void Do()
{
if (TableName == null)
{
// drop keys
var keys = _context.SqlContext.SqlSyntax.GetConstraintsPerTable(_context.Database).DistinctBy(x => x.Item2).ToArray();
foreach (var key in keys.Where(x => x.Item2.StartsWith("FK_")))
Delete.ForeignKey(key.Item2).OnTable(key.Item1).Do();
foreach (var key in keys.Where(x => x.Item2.StartsWith("PK_")))
Delete.PrimaryKey(key.Item2).FromTable(key.Item1).Do();
_context.BuildingExpression = false;
// drop indexes
var indexes = _context.SqlContext.SqlSyntax.GetDefinedIndexesDefinitions(_context.Database).DistinctBy(x => x.IndexName).ToArray();
foreach (var index in indexes)
Delete.Index(index.IndexName).OnTable(index.TableName).Do();
// drop keys
if (DeleteLocal || DeleteForeign)
{
// table, constraint
var tableKeys = _context.SqlContext.SqlSyntax.GetConstraintsPerTable(_context.Database).DistinctBy(x => x.Item2).ToList();
if (DeleteForeign)
{
foreach (var key in tableKeys.Where(x => x.Item1 == TableName && x.Item2.StartsWith("FK_")))
Delete.ForeignKey(key.Item2).OnTable(key.Item1).Do();
}
if (DeleteLocal)
{
foreach (var key in tableKeys.Where(x => x.Item1 == TableName && x.Item2.StartsWith("PK_")))
Delete.PrimaryKey(key.Item2).FromTable(key.Item1).Do();
// note: we do *not* delete the DEFAULT constraints
}
}
else
{
// drop keys
var keys = _context.SqlContext.SqlSyntax.GetConstraintsPerTable(_context.Database).DistinctBy(x => x.Item2).ToArray();
foreach (var key in keys.Where(x => x.Item1 == TableName && x.Item2.StartsWith("FK_")))
Delete.ForeignKey(key.Item2).OnTable(key.Item1).Do();
foreach (var key in keys.Where(x => x.Item1 == TableName && x.Item2.StartsWith("PK_")))
Delete.PrimaryKey(key.Item2).FromTable(key.Item1).Do();
// drop indexes
var indexes = _context.SqlContext.SqlSyntax.GetDefinedIndexesDefinitions(_context.Database).DistinctBy(x => x.IndexName).ToArray();
// drop indexes
if (DeleteLocal)
{
var indexes = _context.SqlContext.SqlSyntax.GetDefinedIndexesDefinitions(_context.Database).DistinctBy(x => x.IndexName).ToList();
foreach (var index in indexes.Where(x => x.TableName == TableName))
Delete.Index(index.IndexName).OnTable(index.TableName).Do();
}
@@ -36,7 +36,7 @@ namespace Umbraco.Core.Migrations
bool BuildingExpression { get; set; }
/// <summary>
/// Adds a post-migrations.
/// Adds a post-migration.
/// </summary>
void AddPostMigration<TMigration>()
where TMigration : IMigration;
@@ -389,7 +389,7 @@ namespace Umbraco.Core.Migrations.Install
private DatabaseSchemaResult ValidateSchema(IScope scope)
{
if (_databaseFactory.Configured == false)
if (_databaseFactory.Initialized == false)
return new DatabaseSchemaResult(_databaseFactory.SqlContext.SqlSyntax);
if (_databaseSchemaValidationResult != null)
@@ -513,7 +513,7 @@ namespace Umbraco.Core.Migrations.Install
private Attempt<Result> CheckReadyForInstall()
{
if (_databaseFactory.Configured == false)
if (_databaseFactory.CanConnect == false)
{
return Attempt.Fail(new Result
{
@@ -539,7 +539,7 @@ namespace Umbraco.Core.Migrations.Install
{
Message =
"The database configuration failed with the following message: " + ex.Message +
"\n Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')",
"\n Please check log file for additional information (can be found in '/App_Data/Logs/')",
Success = false,
Percentage = "90"
};
@@ -101,33 +101,33 @@ namespace Umbraco.Core.Migrations.Install
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -1, Trashed = false, ParentId = -1, UserId = -1, Level = 0, Path = "-1", SortOrder = 0, UniqueId = new Guid("916724a5-173d-4619-b97e-b9de133dd6f5"), Text = "SYSTEM DATA: umbraco master root", NodeObjectType = Constants.ObjectTypes.SystemRoot, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -20, Trashed = false, ParentId = -1, UserId = -1, Level = 0, Path = "-1,-20", SortOrder = 0, UniqueId = new Guid("0F582A79-1E41-4CF0-BFA0-76340651891A"), Text = "Recycle Bin", NodeObjectType = Constants.ObjectTypes.ContentRecycleBin, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -21, Trashed = false, ParentId = -1, UserId = -1, Level = 0, Path = "-1,-21", SortOrder = 0, UniqueId = new Guid("BF7C7CBC-952F-4518-97A2-69E9C7B33842"), Text = "Recycle Bin", NodeObjectType = Constants.ObjectTypes.MediaRecycleBin, CreateDate = DateTime.Now });
InsertDataTypeNodeDto(Constants.DataTypes.LabelString, 35, "f0bc4bfb-b499-40d6-ba86-058885a5178c", "Label");
InsertDataTypeNodeDto(Constants.DataTypes.LabelInt, 36, "8e7f995c-bd81-4627-9932-c40e568ec788", "Label (integer)");
InsertDataTypeNodeDto(Constants.DataTypes.LabelBigint, 36, "930861bf-e262-4ead-a704-f99453565708", "Label (bigint)");
InsertDataTypeNodeDto(Constants.DataTypes.LabelDateTime, 37, "0e9794eb-f9b5-4f20-a788-93acd233a7e4", "Label (datetime)");
InsertDataTypeNodeDto(Constants.DataTypes.LabelTime, 38, "a97cec69-9b71-4c30-8b12-ec398860d7e8", "Label (time)");
InsertDataTypeNodeDto(Constants.DataTypes.LabelDecimal, 39, "8f1ef1e1-9de4-40d3-a072-6673f631ca64", "Label (decimal)");
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -90, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-90", SortOrder = 34, UniqueId = new Guid("84c6b441-31df-4ffe-b67e-67d5bc3ae65a"), Text = "Upload", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -89, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-89", SortOrder = 33, UniqueId = new Guid("c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3"), Text = "Textarea", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -88, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-88", SortOrder = 32, UniqueId = new Guid("0cc0eba1-9960-42c9-bf9b-60e150b429ae"), Text = "Textstring", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -87, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-87", SortOrder = 4, UniqueId = new Guid("ca90c950-0aff-4e72-b976-a30b1ac57dad"), Text = "Richtext editor", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -51, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-51", SortOrder = 2, UniqueId = new Guid("2e6d3631-066e-44b8-aec4-96f09099b2b5"), Text = "Numeric", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -49, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-49", SortOrder = 2, UniqueId = new Guid("92897bc6-a5f3-4ffe-ae27-f2e7e33dda49"), Text = "True/false", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -43, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-43", SortOrder = 2, UniqueId = new Guid("fbaf13a8-4036-41f2-93a3-974f678c312a"), Text = "Checkbox list", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DropDownSingle, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DropDownSingle}", SortOrder = 2, UniqueId = new Guid("0b6a45e7-44ba-430d-9da5-4e46060b9e03"), Text = "Dropdown", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -41, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-41", SortOrder = 2, UniqueId = new Guid("5046194e-4237-453c-a547-15db3a07c4e1"), Text = "Date Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -40, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-40", SortOrder = 2, UniqueId = new Guid("bb5f57c9-ce2b-4bb9-b697-4caca783a805"), Text = "Radiobox", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DropDownMultiple, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DropDownMultiple}", SortOrder = 2, UniqueId = new Guid("f38f0ac7-1d27-439c-9f3f-089cd8825a53"), Text = "Dropdown multiple", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -37, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-37", SortOrder = 2, UniqueId = new Guid("0225af17-b302-49cb-9176-b9f35cab9c17"), Text = "Approved Color", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -36, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-36", SortOrder = 2, UniqueId = new Guid("e4d66c0f-b935-4200-81f0-025f7256b89a"), Text = "Date Picker with time", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DefaultContentListView, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DefaultContentListView}", SortOrder = 2, UniqueId = new Guid("C0808DD3-8133-4E4B-8CE8-E2BEA84A96A4"), Text = Constants.Conventions.DataTypes.ListViewPrefix + "Content", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DefaultMediaListView, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DefaultMediaListView}", SortOrder = 2, UniqueId = new Guid("3A0156C4-3B8C-4803-BDC1-6871FAA83FFF"), Text = Constants.Conventions.DataTypes.ListViewPrefix + "Media", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DefaultMembersListView, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DefaultMembersListView}", SortOrder = 2, UniqueId = new Guid("AA2C52A0-CE87-4E65-A47C-7DF09358585D"), Text = Constants.Conventions.DataTypes.ListViewPrefix + "Members", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
InsertDataTypeNodeDto(Constants.DataTypes.LabelString, 35, Constants.DataTypes.Guids.LabelString, "Label (string)");
InsertDataTypeNodeDto(Constants.DataTypes.LabelInt, 36, Constants.DataTypes.Guids.LabelInt, "Label (integer)");
InsertDataTypeNodeDto(Constants.DataTypes.LabelBigint, 36, Constants.DataTypes.Guids.LabelBigInt, "Label (bigint)");
InsertDataTypeNodeDto(Constants.DataTypes.LabelDateTime, 37, Constants.DataTypes.Guids.LabelDateTime, "Label (datetime)");
InsertDataTypeNodeDto(Constants.DataTypes.LabelTime, 38, Constants.DataTypes.Guids.LabelTime, "Label (time)");
InsertDataTypeNodeDto(Constants.DataTypes.LabelDecimal, 39, Constants.DataTypes.Guids.LabelDecimal, "Label (decimal)");
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.Upload, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.Upload}", SortOrder = 34, UniqueId = Constants.DataTypes.Guids.UploadGuid, Text = "Upload", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.Textarea, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.Textarea}", SortOrder = 33, UniqueId = Constants.DataTypes.Guids.TextareaGuid, Text = "Textarea", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.Textbox, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.Textbox}", SortOrder = 32, UniqueId = Constants.DataTypes.Guids.TextstringGuid, Text = "Textstring", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.RichtextEditor, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.RichtextEditor}", SortOrder = 4, UniqueId = Constants.DataTypes.Guids.RichtextEditorGuid, Text = "Richtext editor", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -51, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-51", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.NumericGuid, Text = "Numeric", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.Boolean, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.Boolean}", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.CheckboxGuid, Text = "True/false", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -43, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-43", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.CheckboxListGuid, Text = "Checkbox list", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DropDownSingle, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DropDownSingle}", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.DropdownGuid, Text = "Dropdown", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -41, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-41", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.DatePickerGuid, Text = "Date Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -40, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-40", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.RadioboxGuid, Text = "Radiobox", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DropDownMultiple, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DropDownMultiple}", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.DropdownMultipleGuid, Text = "Dropdown multiple", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -37, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-37", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.ApprovedColorGuid, Text = "Approved Color", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DateTime, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DateTime}", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.DatePickerWithTimeGuid, Text = "Date Picker with time", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DefaultContentListView, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DefaultContentListView}", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.ListViewContentGuid, Text = Constants.Conventions.DataTypes.ListViewPrefix + "Content", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DefaultMediaListView, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DefaultMediaListView}", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.ListViewMediaGuid, Text = Constants.Conventions.DataTypes.ListViewPrefix + "Media", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DefaultMembersListView, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DefaultMembersListView}", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.ListViewMembersGuid, Text = Constants.Conventions.DataTypes.ListViewPrefix + "Members", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1031, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1031", SortOrder = 2, UniqueId = new Guid("f38bd2d7-65d0-48e6-95dc-87ce06ec2d3d"), Text = Constants.Conventions.MediaTypes.Folder, NodeObjectType = Constants.ObjectTypes.MediaType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1032, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1032", SortOrder = 2, UniqueId = new Guid("cc07b313-0843-4aa8-bbda-871c8da728c8"), Text = Constants.Conventions.MediaTypes.Image, NodeObjectType = Constants.ObjectTypes.MediaType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1033, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1033", SortOrder = 2, UniqueId = new Guid("4c52d8ab-54e6-40cd-999c-7a5f24903e4d"), Text = Constants.Conventions.MediaTypes.File, NodeObjectType = Constants.ObjectTypes.MediaType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1041, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1041", SortOrder = 2, UniqueId = new Guid("b6b73142-b9c1-4bf8-a16d-e1c23320b549"), Text = "Tags", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1043, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1043", SortOrder = 2, UniqueId = new Guid("1df9f033-e6d4-451f-b8d2-e0cbc50a836f"), Text = "Image Cropper", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.Tags, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.Tags}", SortOrder = 2, UniqueId = new Guid("b6b73142-b9c1-4bf8-a16d-e1c23320b549"), Text = "Tags", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.ImageCropper, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.ImageCropper}", SortOrder = 2, UniqueId = new Guid("1df9f033-e6d4-451f-b8d2-e0cbc50a836f"), Text = "Image Cropper", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now });
_database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1044, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1044", SortOrder = 0, UniqueId = new Guid("d59be02f-1df9-4228-aa1e-01917d806cda"), Text = Constants.Conventions.MemberTypes.DefaultAlias, NodeObjectType = Constants.ObjectTypes.MemberType, CreateDate = DateTime.Now });
//New UDI pickers with newer Ids
@@ -155,10 +155,10 @@ namespace Umbraco.Core.Migrations.Install
private void CreateContentTypeData()
{
_database.Insert(Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 532, NodeId = 1031, Alias = Constants.Conventions.MediaTypes.Folder, Icon = "icon-folder", Thumbnail = "icon-folder", IsContainer = false, AllowAtRoot = true, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 533, NodeId = 1032, Alias = Constants.Conventions.MediaTypes.Image, Icon = "icon-picture", Thumbnail = "icon-picture", AllowAtRoot = true, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 534, NodeId = 1033, Alias = Constants.Conventions.MediaTypes.File, Icon = "icon-document", Thumbnail = "icon-document", AllowAtRoot = true, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 531, NodeId = 1044, Alias = Constants.Conventions.MemberTypes.DefaultAlias, Icon = "icon-user", Thumbnail = "icon-user", Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 532, NodeId = 1031, Alias = Constants.Conventions.MediaTypes.Folder, Icon = Constants.Icons.MediaFolder, Thumbnail = Constants.Icons.MediaFolder, IsContainer = false, AllowAtRoot = true, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 533, NodeId = 1032, Alias = Constants.Conventions.MediaTypes.Image, Icon = Constants.Icons.MediaImage, Thumbnail = Constants.Icons.MediaImage, AllowAtRoot = true, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 534, NodeId = 1033, Alias = Constants.Conventions.MediaTypes.File, Icon = Constants.Icons.MediaFile, Thumbnail = Constants.Icons.MediaFile, AllowAtRoot = true, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 531, NodeId = 1044, Alias = Constants.Conventions.MemberTypes.DefaultAlias, Icon = Constants.Icons.Member, Thumbnail = Constants.Icons.Member, Variations = (byte) ContentVariation.Nothing });
}
private void CreateUserData()
@@ -210,22 +210,24 @@ namespace Umbraco.Core.Migrations.Install
private void CreatePropertyTypeData()
{
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 6, UniqueId = 6.ToGuid(), DataTypeId = 1043, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.File, Name = "Upload image", SortOrder = 0, Mandatory = true, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 6, UniqueId = 6.ToGuid(), DataTypeId = Constants.DataTypes.ImageCropper, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.File, Name = "Upload image", SortOrder = 0, Mandatory = true, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 7, UniqueId = 7.ToGuid(), DataTypeId = Constants.DataTypes.LabelInt, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Width, Name = "Width", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = "in pixels", Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 8, UniqueId = 8.ToGuid(), DataTypeId = Constants.DataTypes.LabelInt, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Height, Name = "Height", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = "in pixels", Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 9, UniqueId = 9.ToGuid(), DataTypeId = Constants.DataTypes.LabelBigint, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = "in bytes", Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 10, UniqueId = 10.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Extension, Name = "Type", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 24, UniqueId = 24.ToGuid(), DataTypeId = -90, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.File, Name = "Upload file", SortOrder = 0, Mandatory = true, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 24, UniqueId = 24.ToGuid(), DataTypeId = Constants.DataTypes.Upload, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.File, Name = "Upload file", SortOrder = 0, Mandatory = true, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 25, UniqueId = 25.ToGuid(), DataTypeId = -92, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.Extension, Name = "Type", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 26, UniqueId = 26.ToGuid(), DataTypeId = Constants.DataTypes.LabelBigint, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = "in bytes", Variations = (byte) ContentVariation.Nothing });
//membership property types
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 28, UniqueId = 28.ToGuid(), DataTypeId = -89, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.Comments, Name = Constants.Conventions.Member.CommentsLabel, SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 28, UniqueId = 28.ToGuid(), DataTypeId = Constants.DataTypes.Textarea, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.Comments, Name = Constants.Conventions.Member.CommentsLabel, SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 29, UniqueId = 29.ToGuid(), DataTypeId = Constants.DataTypes.LabelInt, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.FailedPasswordAttempts, Name = Constants.Conventions.Member.FailedPasswordAttemptsLabel, SortOrder = 1, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 30, UniqueId = 30.ToGuid(), DataTypeId = -49, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.IsApproved, Name = Constants.Conventions.Member.IsApprovedLabel, SortOrder = 2, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 31, UniqueId = 31.ToGuid(), DataTypeId = -49, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.IsLockedOut, Name = Constants.Conventions.Member.IsLockedOutLabel, SortOrder = 3, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 30, UniqueId = 30.ToGuid(), DataTypeId = Constants.DataTypes.Boolean, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.IsApproved, Name = Constants.Conventions.Member.IsApprovedLabel, SortOrder = 2, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 31, UniqueId = 31.ToGuid(), DataTypeId = Constants.DataTypes.Boolean, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.IsLockedOut, Name = Constants.Conventions.Member.IsLockedOutLabel, SortOrder = 3, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 32, UniqueId = 32.ToGuid(), DataTypeId = Constants.DataTypes.LabelDateTime, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastLockoutDate, Name = Constants.Conventions.Member.LastLockoutDateLabel, SortOrder = 4, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 33, UniqueId = 33.ToGuid(), DataTypeId = Constants.DataTypes.LabelDateTime, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastLoginDate, Name = Constants.Conventions.Member.LastLoginDateLabel, SortOrder = 5, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 34, UniqueId = 34.ToGuid(), DataTypeId = Constants.DataTypes.LabelDateTime, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastPasswordChangeDate, Name = Constants.Conventions.Member.LastPasswordChangeDateLabel, SortOrder = 6, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 35, UniqueId = 35.ToGuid(), DataTypeId = Constants.DataTypes.LabelDateTime, ContentTypeId = 1044, PropertyTypeGroupId = null, Alias = Constants.Conventions.Member.PasswordQuestion, Name = Constants.Conventions.Member.PasswordQuestionLabel, SortOrder = 7, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte)ContentVariation.Nothing });
_database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 36, UniqueId = 36.ToGuid(), DataTypeId = Constants.DataTypes.LabelDateTime, ContentTypeId = 1044, PropertyTypeGroupId = null, Alias = Constants.Conventions.Member.PasswordAnswer, Name = Constants.Conventions.Member.PasswordAnswerLabel, SortOrder = 8, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte)ContentVariation.Nothing });
}
@@ -264,30 +266,30 @@ namespace Umbraco.Core.Migrations.Install
const string layouts = "[" + cardLayout + "," + listLayout + "]";
// TODO: Check which of the DataTypeIds below doesn't exist in umbracoNode, which results in a foreign key constraint errors.
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -49, EditorAlias = Constants.PropertyEditors.Aliases.Boolean, DbType = "Integer" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.Boolean, EditorAlias = Constants.PropertyEditors.Aliases.Boolean, DbType = "Integer" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -51, EditorAlias = Constants.PropertyEditors.Aliases.Integer, DbType = "Integer" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -87, EditorAlias = Constants.PropertyEditors.Aliases.TinyMce, DbType = "Ntext",
Configuration = "{\"value\":\",code,undo,redo,cut,copy,mcepasteword,stylepicker,bold,italic,bullist,numlist,outdent,indent,mcelink,unlink,mceinsertanchor,mceimage,umbracomacro,mceinserttable,umbracoembed,mcecharmap,|1|1,2,3,|0|500,400|1049,|true|\"}" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -88, EditorAlias = Constants.PropertyEditors.Aliases.TextBox, DbType = "Nvarchar" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -89, EditorAlias = Constants.PropertyEditors.Aliases.TextArea, DbType = "Ntext" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -90, EditorAlias = Constants.PropertyEditors.Aliases.UploadField, DbType = "Nvarchar" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.Textbox, EditorAlias = Constants.PropertyEditors.Aliases.TextBox, DbType = "Nvarchar" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.Textarea, EditorAlias = Constants.PropertyEditors.Aliases.TextArea, DbType = "Ntext" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.Upload, EditorAlias = Constants.PropertyEditors.Aliases.UploadField, DbType = "Nvarchar" });
InsertDataTypeDto(Constants.DataTypes.LabelString, Constants.PropertyEditors.Aliases.Label, "Nvarchar", "{\"umbracoDataValueType\":\"STRING\"}");
InsertDataTypeDto(Constants.DataTypes.LabelInt, Constants.PropertyEditors.Aliases.Label, "Integer", "{\"umbracoDataValueType\":\"INT\"}");
InsertDataTypeDto(Constants.DataTypes.LabelBigint, Constants.PropertyEditors.Aliases.Label, "Nvarchar", "{\"umbracoDataValueType\":\"BIGINT\"}");
InsertDataTypeDto(Constants.DataTypes.LabelDateTime, Constants.PropertyEditors.Aliases.Label, "Date", "{\"umbracoDataValueType\":\"DATETIME\"}");
InsertDataTypeDto(Constants.DataTypes.LabelDecimal, Constants.PropertyEditors.Aliases.Label, "Decimal", "{\"umbracoDataValueType\":\"DECIMAL\"}");
InsertDataTypeDto(Constants.DataTypes.LabelTime, Constants.PropertyEditors.Aliases.Label, "Date", "{\"umbracoDataValueType\":\"TIME\"}");
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -36, EditorAlias = Constants.PropertyEditors.Aliases.DateTime, DbType = "Date" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.DateTime, EditorAlias = Constants.PropertyEditors.Aliases.DateTime, DbType = "Date" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -37, EditorAlias = Constants.PropertyEditors.Aliases.ColorPicker, DbType = "Nvarchar" });
InsertDataTypeDto(Constants.DataTypes.DropDownSingle, Constants.PropertyEditors.Aliases.DropDownListFlexible, "Nvarchar", "{\"multiple\":false}");
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -40, EditorAlias = Constants.PropertyEditors.Aliases.RadioButtonList, DbType = "Nvarchar" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -41, EditorAlias = "Umbraco.DateTime", DbType = "Date", Configuration = "{\"format\":\"YYYY-MM-DD\"}" });
InsertDataTypeDto(Constants.DataTypes.DropDownMultiple, Constants.PropertyEditors.Aliases.DropDownListFlexible, "Nvarchar", "{\"multiple\":true}");
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -43, EditorAlias = Constants.PropertyEditors.Aliases.CheckBoxList, DbType = "Nvarchar" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1041, EditorAlias = Constants.PropertyEditors.Aliases.Tags, DbType = "Ntext",
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.Tags, EditorAlias = Constants.PropertyEditors.Aliases.Tags, DbType = "Ntext",
Configuration = "{\"group\":\"default\", \"storageType\":\"Json\"}"
});
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1043, EditorAlias = Constants.PropertyEditors.Aliases.ImageCropper, DbType = "Ntext" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.ImageCropper, EditorAlias = Constants.PropertyEditors.Aliases.ImageCropper, DbType = "Ntext" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.DefaultContentListView, EditorAlias = Constants.PropertyEditors.Aliases.ListView, DbType = "Nvarchar",
Configuration = "{\"pageSize\":100, \"orderBy\":\"updateDate\", \"orderDirection\":\"desc\", \"layouts\":" + layouts + ", \"includeProperties\":[{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1},{\"alias\":\"owner\",\"header\":\"Updated by\",\"isSystem\":1}]}" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.DefaultMediaListView, EditorAlias = Constants.PropertyEditors.Aliases.ListView, DbType = "Nvarchar",
@@ -41,6 +41,7 @@ namespace Umbraco.Core.Migrations
public void AddPostMigration<TMigration>()
where TMigration : IMigration
{
// just adding - will be de-duplicated when executing
PostMigrations.Add(typeof(TMigration));
}
}
@@ -92,6 +92,7 @@ namespace Umbraco.Core.Migrations
if (_executed)
throw new InvalidOperationException("This expression has already been executed.");
_executed = true;
Context.BuildingExpression = false;
if (sql == null)
{
+19 -4
View File
@@ -240,7 +240,8 @@ namespace Umbraco.Core.Migrations
if (finalState == null)
finalState = kvp.Key;
else
throw new Exception("Multiple final states have been detected.");
throw new InvalidOperationException($"Multiple final states have been detected in the plan (\"{finalState}\", \"{kvp.Key}\")."
+ " Make sure the plan contains only one final state.");
}
// now check for loops
@@ -254,7 +255,8 @@ namespace Umbraco.Core.Migrations
while (nextTransition != null && !verified.Contains(nextTransition.SourceState))
{
if (visited.Contains(nextTransition.SourceState))
throw new Exception("A loop has been detected.");
throw new InvalidOperationException($"A loop has been detected in the plan around state \"{nextTransition.SourceState}\"."
+ " Make sure the plan does not contain circular transition paths.");
visited.Add(nextTransition.SourceState);
nextTransition = _transitions[nextTransition.TargetState];
}
@@ -264,6 +266,14 @@ namespace Umbraco.Core.Migrations
_finalState = finalState;
}
/// <summary>
/// Throws an exception when the initial state is unknown.
/// </summary>
protected virtual void ThrowOnUnknownInitialState(string state)
{
throw new InvalidOperationException($"The migration plan does not support migrating from state \"{state}\".");
}
/// <summary>
/// Executes the plan.
/// </summary>
@@ -287,13 +297,15 @@ namespace Umbraco.Core.Migrations
logger.Info<MigrationPlan>("At {OrigState}", string.IsNullOrWhiteSpace(origState) ? "origin": origState);
if (!_transitions.TryGetValue(origState, out var transition))
throw new Exception($"Unknown state \"{origState}\".");
ThrowOnUnknownInitialState(origState);
var context = new MigrationContext(scope.Database, logger);
context.PostMigrations.AddRange(_postMigrationTypes);
while (transition != null)
{
logger.Info<MigrationPlan>("Execute {MigrationType}", transition.MigrationType.Name);
var migration = migrationBuilder.Build(transition.MigrationType, context);
migration.Migrate();
@@ -302,6 +314,8 @@ namespace Umbraco.Core.Migrations
logger.Info<MigrationPlan>("At {OrigState}", origState);
// throw a raw exception here: this should never happen as the plan has
// been validated - this is just a paranoid safety test
if (!_transitions.TryGetValue(origState, out transition))
throw new Exception($"Unknown state \"{origState}\".");
}
@@ -322,7 +336,8 @@ namespace Umbraco.Core.Migrations
logger.Info<MigrationPlan>("Done (pending scope completion).");
// safety check
// safety check - again, this should never happen as the plan has been validated,
// and this is just a paranoid safety test
if (origState != _finalState)
throw new Exception($"Internal error, reached state {origState} which is not final state {_finalState}");
@@ -0,0 +1,21 @@
using Umbraco.Core.Migrations.Install;
namespace Umbraco.Core.Migrations.Upgrade.Common
{
public class CreateKeysAndIndexes : MigrationBase
{
public CreateKeysAndIndexes(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
// remove those that may already have keys
Delete.KeysAndIndexes(Constants.DatabaseSchema.Tables.KeyValue).Do();
// re-create *all* keys and indexes
foreach (var x in DatabaseSchemaCreator.OrderedTables)
Create.KeysAndIndexes(x).Do();
}
}
}
@@ -0,0 +1,75 @@
namespace Umbraco.Core.Migrations.Upgrade.Common
{
public class DeleteKeysAndIndexes : MigrationBase
{
public DeleteKeysAndIndexes(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
// all v7.14 tables
var tables = new[]
{
"cmsContent",
"cmsContentType",
"cmsContentType2ContentType",
"cmsContentTypeAllowedContentType",
"cmsContentVersion",
"cmsContentXml",
"cmsDataType",
"cmsDataTypePreValues",
"cmsDictionary",
"cmsDocument",
"cmsDocumentType",
"cmsLanguageText",
"cmsMacro",
"cmsMacroProperty",
"cmsMedia",
"cmsMember",
"cmsMember2MemberGroup",
"cmsMemberType",
"cmsPreviewXml",
"cmsPropertyData",
"cmsPropertyType",
"cmsPropertyTypeGroup",
"cmsTagRelationship",
"cmsTags",
"cmsTask",
"cmsTaskType",
"cmsTemplate",
"umbracoAccess",
"umbracoAccessRule",
"umbracoAudit",
"umbracoCacheInstruction",
"umbracoConsent",
"umbracoDomains",
"umbracoExternalLogin",
"umbracoLanguage",
"umbracoLock",
"umbracoLog",
"umbracoMigration",
"umbracoNode",
"umbracoRedirectUrl",
"umbracoRelation",
"umbracoRelationType",
"umbracoServer",
"umbracoUser",
"umbracoUser2NodeNotify",
"umbracoUser2UserGroup",
"umbracoUserGroup",
"umbracoUserGroup2App",
"umbracoUserGroup2NodePermission",
"umbracoUserLogin",
"umbracoUserStartNode",
};
// delete *all* keys and indexes - because of FKs
// on known v7 tables only
foreach (var table in tables)
Delete.KeysAndIndexes(table, false, true).Do();
foreach (var table in tables)
Delete.KeysAndIndexes(table, true, false).Do();
}
}
}
@@ -2,10 +2,10 @@
using System.Configuration;
using Semver;
using Umbraco.Core.Configuration;
using Umbraco.Core.Migrations.Upgrade.V_7_12_0;
using Umbraco.Core.Migrations.Upgrade.V_7_14_0;
using Umbraco.Core.Migrations.Upgrade.Common;
using Umbraco.Core.Migrations.Upgrade.V_8_0_0;
using Umbraco.Core.Migrations.Upgrade.V_8_0_1;
using Umbraco.Core.Migrations.Upgrade.V_8_1_0;
namespace Umbraco.Core.Migrations.Upgrade
{
@@ -14,6 +14,9 @@ namespace Umbraco.Core.Migrations.Upgrade
/// </summary>
public class UmbracoPlan : MigrationPlan
{
private const string InitPrefix = "{init-";
private const string InitSuffix = "}";
/// <summary>
/// Initializes a new instance of the <see cref="UmbracoPlan"/> class.
/// </summary>
@@ -23,6 +26,27 @@ namespace Umbraco.Core.Migrations.Upgrade
DefinePlan();
}
/// <summary>
/// Gets the initial state corresponding to a version.
/// </summary>
private static string GetInitState(SemVersion version)
=> InitPrefix + version + InitSuffix;
/// <summary>
/// Tries to extract a version from an initial state.
/// </summary>
private static bool TryGetInitStateVersion(string state, out string version)
{
if (state.StartsWith(InitPrefix) && state.EndsWith(InitSuffix))
{
version = state.TrimStart(InitPrefix).TrimEnd(InitSuffix);
return true;
}
version = null;
return false;
}
/// <inheritdoc />
/// <remarks>
/// <para>The default initial state in plans is string.Empty.</para>
@@ -40,23 +64,37 @@ namespace Umbraco.Core.Migrations.Upgrade
if (!SemVersion.TryParse(ConfigurationManager.AppSettings[Constants.AppSettings.ConfigurationStatus], out var currentVersion))
throw new InvalidOperationException($"Could not get current version from web.config {Constants.AppSettings.ConfigurationStatus} appSetting.");
// we currently support upgrading from 7.10.0 and later
if (currentVersion < new SemVersion(7, 10))
throw new InvalidOperationException($"Version {currentVersion} cannot be migrated to {UmbracoVersion.SemanticVersion}.");
// cannot go back in time
if (currentVersion > UmbracoVersion.SemanticVersion)
throw new InvalidOperationException($"Version {currentVersion} cannot be downgraded to {UmbracoVersion.SemanticVersion}.");
// upgrading from version 7 => initial state is eg "{init-7.10.0}"
// anything else is not supported - ie if 8 and above, we should have an initial state already
if (currentVersion.Major != 7)
throw new InvalidOperationException($"Version {currentVersion} is not supported by the migration plan.");
// only from 7.14.0 and above
var minVersion = new SemVersion(7, 14);
if (currentVersion < minVersion)
throw new InvalidOperationException($"Version {currentVersion} cannot be migrated to {UmbracoVersion.SemanticVersion}."
+ $" Please upgrade first to at least {minVersion}.");
return "{init-" + currentVersion + "}";
// Force versions between 7.14.*-7.15.* into into 7.14 initial state. Because there is no db-changes,
// and we don't want users to workaround my putting in version 7.14.0 them self.
if (minVersion <= currentVersion && currentVersion < new SemVersion(7, 16))
return GetInitState(minVersion);
// initial state is eg "{init-7.14.0}"
return GetInitState(currentVersion);
}
}
protected override void ThrowOnUnknownInitialState(string state)
{
if (TryGetInitStateVersion(state, out var initVersion))
{
throw new InvalidOperationException($"Version {UmbracoVersion.SemanticVersion} does not support migrating from {initVersion}."
+ $" Please verify which versions support migrating from {initVersion}.");
}
base.ThrowOnUnknownInitialState(state);
}
// define the plan
protected void DefinePlan()
{
@@ -69,21 +107,23 @@ namespace Umbraco.Core.Migrations.Upgrade
//
// If the new migration causes a merge conflict, because someone else also added another
// new migration, you NEED to fix the conflict by providing one default path, and paths
// out of the conflict states (see example below).
// out of the conflict states (see examples below).
//
// * Porting from version 7:
// Append the ported migration to the main chain, using a new guid (same as above).
// Create a new special chain from the {init-...} state to the main chain (see example
// below).
// Create a new special chain from the {init-...} state to the main chain.
// plan starts at 7.10.0 (anything before 7.10.0 is not supported)
// upgrades from 7 to 8, and then takes care of all eventual upgrades
// plan starts at 7.14.0 (anything before 7.14.0 is not supported)
//
From("{init-7.10.0}");
From(GetInitState(new SemVersion(7, 14, 0)));
// begin migrating from v7 - remove all keys and indexes
To<DeleteKeysAndIndexes>("{B36B9ABD-374E-465B-9C5F-26AB0D39326F}");
To<AddLockObjects>("{7C447271-CA3F-4A6A-A913-5D77015655CB}");
To<AddContentNuTable>("{CBFF58A2-7B50-4F75-8E98-249920DB0F37}");
To<RefactorXmlColumns>("{3D18920C-E84D-405C-A06A-B7CEE52FE5DD}");
To<RenameMediaVersionTable>("{5CB66059-45F4-48BA-BCBD-C5035D79206B}");
To<VariantsMigration>("{FB0A5429-587E-4BD0-8A67-20F0E7E62FF7}");
To<DropMigrationsTable>("{F0C42457-6A3B-4912-A7EA-F27ED85A2092}");
To<DataTypeMigration>("{8640C9E4-A1C0-4C59-99BB-609B4E604981}");
@@ -94,90 +134,55 @@ namespace Umbraco.Core.Migrations.Upgrade
ToWithReplace<AddVariationTables2, AddVariationTables1A>("{941B2ABA-2D06-4E04-81F5-74224F1DB037}", "{76DF5CD7-A884-41A5-8DC6-7860D95B1DF5}"); // kill AddVariationTable1
To<RefactorMacroColumns>("{A7540C58-171D-462A-91C5-7A9AA5CB8BFD}");
Merge().To<UserForeignKeys>("{3E44F712-E2E3-473A-AE49-5D7F8E67CE3F}") // shannon added that one
.With().To<AddTypedLabels>("{65D6B71C-BDD5-4A2E-8D35-8896325E9151}") // stephan added that one
Merge()
.To<UserForeignKeys>("{3E44F712-E2E3-473A-AE49-5D7F8E67CE3F}")
.With()
.To<AddTypedLabels>("{65D6B71C-BDD5-4A2E-8D35-8896325E9151}")
.As("{4CACE351-C6B9-4F0C-A6BA-85A02BBD39E4}");
To<ContentVariationMigration>("{1350617A-4930-4D61-852F-E3AA9E692173}");
To<UpdateUmbracoConsent>("{39E5B1F7-A50B-437E-B768-1723AEC45B65}"); // from 7.12.0
Merge()
.To<AddRelationTypeForMediaFolderOnDelete>("{0541A62B-EF87-4CA2-8225-F0EB98ECCC9F}") // from 7.12.0
.To<IncreaseLanguageIsoCodeColumnLength>("{EB34B5DC-BB87-4005-985E-D983EA496C38}") // from 7.12.0
.To<RenameTrueFalseField>("{517CE9EA-36D7-472A-BF4B-A0D6FB1B8F89}") // from 7.12.0
.To<SetDefaultTagsStorageType>("{BBD99901-1545-40E4-8A5A-D7A675C7D2F2}") // from 7.12.0
.With()
.To<FallbackLanguage>("{CF51B39B-9B9A-4740-BB7C-EAF606A7BFBF}") // andy added that one
.As("{8B14CEBD-EE47-4AAD-A841-93551D917F11}");
ToWithReplace<UpdateDefaultMandatoryLanguage>("{2C87AA47-D1BC-4ECB-8A73-2D8D1046C27F}", "{5F4597F4-A4E0-4AFE-90B5-6D2F896830EB}"); // merge
ToWithReplace<RefactorVariantsModel>("{B19BF0F2-E1C6-4AEB-A146-BC559D97A2C6}", "{290C18EE-B3DE-4769-84F1-1F467F3F76DA}"); // merge
To<FallbackLanguage>("{CF51B39B-9B9A-4740-BB7C-EAF606A7BFBF}");
To<UpdateDefaultMandatoryLanguage>("{5F4597F4-A4E0-4AFE-90B5-6D2F896830EB}");
To<RefactorVariantsModel>("{290C18EE-B3DE-4769-84F1-1F467F3F76DA}");
To<DropTaskTables>("{6A2C7C1B-A9DB-4EA9-B6AB-78E7D5B722A7}");
To<FixLockTablePrimaryKey>("{77874C77-93E5-4488-A404-A630907CEEF0}");
To<AddLogTableColumns>("{8804D8E8-FE62-4E3A-B8A2-C047C2118C38}");
To<DropPreValueTable>("{23275462-446E-44C7-8C2C-3B8C1127B07D}");
To<DropDownPropertyEditorsMigration>("{6B251841-3069-4AD5-8AE9-861F9523E8DA}");
To<TagsMigrationFix>("{EE429F1B-9B26-43CA-89F8-A86017C809A3}");
To<DropTemplateDesignColumn>("{08919C4B-B431-449C-90EC-2B8445B5C6B1}");
To<TablesForScheduledPublishing>("{7EB0254C-CB8B-4C75-B15B-D48C55B449EB}");
To<DropTaskTables>("{648A2D5F-7467-48F8-B309-E99CEEE00E2A}"); // fixed version
To<MakeTagsVariant>("{C39BF2A7-1454-4047-BBFE-89E40F66ED63}");
To<MakeRedirectUrlVariant>("{64EBCE53-E1F0-463A-B40B-E98EFCCA8AE2}");
To<AddContentTypeIsElementColumn>("{0009109C-A0B8-4F3F-8FEB-C137BBDDA268}");
To<UpdateMemberGroupPickerData>("{8A027815-D5CD-4872-8B88-9A51AB5986A6}"); // from 7.14.0
To<ConvertRelatedLinksToMultiUrlPicker>("{ED28B66A-E248-4D94-8CDB-9BDF574023F0}");
To<UpdatePickerIntegerValuesToUdi>("{38C809D5-6C34-426B-9BEA-EFD39162595C}");
To<RenameUmbracoDomainsTable>("{6017F044-8E70-4E10-B2A3-336949692ADD}");
To<AddUserLoginDtoDateIndex>("{98339BEF-E4B2-48A8-B9D1-D173DC842BBE}");
Merge()
.To<DropXmlTables>("{CDBEDEE4-9496-4903-9CF2-4104E00FF960}")
.With()
.To<RadioAndCheckboxAndDropdownPropertyEditorsMigration>("{940FD19A-00A8-4D5C-B8FF-939143585726}")
.To<RadioAndCheckboxPropertyEditorsMigration>("{940FD19A-00A8-4D5C-B8FF-939143585726}")
.As("{0576E786-5C30-4000-B969-302B61E90CA3}");
To<FixLanguageIsoCodeLength>("{48AD6CCD-C7A4-4305-A8AB-38728AD23FC5}");
// finish migrating from v7 - recreate all keys and indexes
To<CreateKeysAndIndexes>("{3F9764F5-73D0-4D45-8804-1240A66E43A2}");
To<RenameLabelAndRichTextPropertyEditorAliases>("{E0CBE54D-A84F-4A8F-9B13-900945FD7ED9}");
To<MergeDateAndDateTimePropertyEditor>("{78BAF571-90D0-4D28-8175-EF96316DA789}");
// release-8.0.0
// to 8.0.1...
To<ChangeNuCacheJsonFormat>("{80C0A0CB-0DD5-4573-B000-C4B7C313C70D}");
// release-8.0.1
// to 8.1.0...
To<ConvertTinyMceAndGridMediaUrlsToLocalLink>("{B69B6E8C-A769-4044-A27E-4A4E18D1645A}");
To<RenameUserLoginDtoDateIndex>("{0372A42B-DECF-498D-B4D1-6379E907EB94}");
To<FixContentNuCascade>("{5B1E0D93-F5A3-449B-84BA-65366B84E2D4}");
//FINAL
// and then, need to support upgrading from more recent 7.x
//
From("{init-7.10.1}").To("{init-7.10.0}"); // same as 7.10.0
From("{init-7.10.2}").To("{init-7.10.0}"); // same as 7.10.0
From("{init-7.10.3}").To("{init-7.10.0}"); // same as 7.10.0
From("{init-7.10.4}").To("{init-7.10.0}"); // same as 7.10.0
From("{init-7.10.5}").To("{init-7.10.0}"); // same as 7.10.0
From("{init-7.11.0}").To("{init-7.10.0}"); // same as 7.10.0
From("{init-7.11.1}").To("{init-7.10.0}"); // same as 7.10.0
From("{init-7.11.2}").To("{init-7.10.0}"); // same as 7.10.0
// 7.12.0 has migrations, define a custom chain which copies the chain
// going from {init-7.10.0} to former final (1350617A) , and then goes straight to
// main chain, skipping the migrations
//
From("{init-7.12.0}");
// clone start / clone stop / target
ToWithClone("{init-7.10.0}", "{1350617A-4930-4D61-852F-E3AA9E692173}", "{BBD99901-1545-40E4-8A5A-D7A675C7D2F2}");
From("{init-7.12.1}").To("{init-7.10.0}"); // same as 7.12.0
From("{init-7.12.2}").To("{init-7.10.0}"); // same as 7.12.0
From("{init-7.12.3}").To("{init-7.10.0}"); // same as 7.12.0
From("{init-7.12.4}").To("{init-7.10.0}"); // same as 7.12.0
From("{init-7.13.0}").To("{init-7.10.0}"); // same as 7.12.0
From("{init-7.13.1}").To("{init-7.10.0}"); // same as 7.12.0
// 7.14.0 has migrations, handle it...
// clone going from 7.10 to 1350617A (the last one before we started to merge 7.12 migrations), then
// clone going from CF51B39B (after 7.12 migrations) to 0009109C (the last one before we started to merge 7.12 migrations),
// ending in 8A027815 (after 7.14 migrations)
From("{init-7.14.0}")
.ToWithClone("{init-7.10.0}", "{1350617A-4930-4D61-852F-E3AA9E692173}", "{9109B8AF-6B34-46EE-9484-7434196D0C79}")
.ToWithClone("{CF51B39B-9B9A-4740-BB7C-EAF606A7BFBF}", "{0009109C-A0B8-4F3F-8FEB-C137BBDDA268}", "{8A027815-D5CD-4872-8B88-9A51AB5986A6}");
}
}
}
@@ -1,36 +0,0 @@
using System.IO;
using Umbraco.Core.IO;
using File = System.IO.File;
namespace Umbraco.Core.Migrations.Upgrade.V_7_10_0
{
/// <summary>
/// Renames the preview folder containing static HTML files to ensure it does not interfere with the MVC route
/// that is now supposed to render these views dynamically. We don't want to delete as people may have made
/// customizations to these files that would need to be migrated to the new .cshtml view files.
/// </summary>
public class RenamePreviewFolder : MigrationBase
{
public RenamePreviewFolder(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var previewFolderPath = IOHelper.MapPath(SystemDirectories.Umbraco + "/preview");
if (Directory.Exists(previewFolderPath))
{
var newPath = previewFolderPath.Replace("preview", "preview.old");
if (Directory.Exists(newPath) == false)
{
Directory.Move(previewFolderPath, newPath);
var readmeText =
$"Static HTML files used for preview and canvas editing functionality no longer live in this directory.\r\n" +
$"Instead they have been recreated as MVC views and can now be found in '~/Umbraco/Views/Preview'.\r\n" +
$"See issue: http://issues.umbraco.org/issue/U4-11090";
File.WriteAllText(Path.Combine(newPath, "readme.txt"), readmeText);
}
}
}
}
}
@@ -1,33 +0,0 @@
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
{
public class AddRelationTypeForMediaFolderOnDelete : MigrationBase
{
public AddRelationTypeForMediaFolderOnDelete(IMigrationContext context) : base(context)
{
}
public override void Migrate()
{
var relationTypeCount = Context.Database.ExecuteScalar<int>("SELECT COUNT(*) FROM umbracoRelationType WHERE alias=@alias",
new { alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias });
if (relationTypeCount > 0)
return;
var uniqueId = (Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias + "____" + Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName).ToGuid();
Insert.IntoTable("umbracoRelationType").Row(new
{
typeUniqueId = uniqueId,
alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias,
name = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName,
childObjectType = Constants.ObjectTypes.MediaType,
parentObjectType = Constants.ObjectTypes.MediaType,
dual = false
}).Do();
}
}
}
@@ -1,46 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
{
public class IncreaseLanguageIsoCodeColumnLength : MigrationBase
{
public IncreaseLanguageIsoCodeColumnLength(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
// Some people seem to have a constraint in their DB instead of an index, we'd need to drop that one
// See: https://our.umbraco.com/forum/using-umbraco-and-getting-started/93282-upgrade-from-711-to-712-fails
var constraints = SqlSyntax.GetConstraintsPerTable(Context.Database).Distinct().ToArray();
if (constraints.Any(x => x.Item2.InvariantEquals("IX_umbracoLanguage_languageISOCode")))
{
Delete.UniqueConstraint("IX_umbracoLanguage_languageISOCode").FromTable("umbracoLanguage").Do();
}
//Now check for indexes of that name and drop that if it exists
var dbIndexes = SqlSyntax.GetDefinedIndexesDefinitions(Context.Database);
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoLanguage_languageISOCode")))
{
Delete.Index("IX_umbracoLanguage_languageISOCode").OnTable("umbracoLanguage").Do();
}
Alter.Table("umbracoLanguage")
.AlterColumn("languageISOCode")
.AsString(14)
.Nullable()
.Do();
Create.Index("IX_umbracoLanguage_languageISOCode")
.OnTable("umbracoLanguage")
.OnColumn("languageISOCode")
.Ascending()
.WithOptions()
.Unique()
.Do();
}
}
}
@@ -1,19 +0,0 @@
using Umbraco.Core.Logging;
using Umbraco.Core.Persistence.Dtos;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
{
public class RenameTrueFalseField : MigrationBase
{
public RenameTrueFalseField(IMigrationContext context) : base(context)
{
}
public override void Migrate()
{
//rename the existing true/false field
Update.Table(NodeDto.TableName).Set(new { text = "Checkbox" }).Where(new { id = Constants.DataTypes.Boolean }).Do();
}
}
}
@@ -1,51 +0,0 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Umbraco.Core.Models;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.Dtos;
using Umbraco.Core.PropertyEditors;
namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
{
/// <summary>
/// Set the default storageType for the tags datatype to "CSV" to ensure backwards compatibility since the default is going to be JSON in new versions.
/// </summary>
public class SetDefaultTagsStorageType : MigrationBase
{
public SetDefaultTagsStorageType(IMigrationContext context)
: base(context)
{ }
// dummy editor for deserialization
private class TagConfigurationEditor : ConfigurationEditor<TagConfiguration>
{ }
public override void Migrate()
{
// get all Umbraco.Tags datatypes
var dataTypeDtos = Database.Fetch<DataTypeDto>(Context.SqlContext.Sql()
.Select<DataTypeDto>()
.From<DataTypeDto>()
.Where<DataTypeDto>(x => x.EditorAlias == Constants.PropertyEditors.Aliases.Tags));
// get a dummy editor for deserialization
var editor = new TagConfigurationEditor();
foreach (var dataTypeDto in dataTypeDtos)
{
// need to check storageType on raw dictionary, as TagConfiguration would have a default value
var dictionary = JsonConvert.DeserializeObject<JObject>(dataTypeDto.Configuration);
// if missing, use TagConfiguration to properly update the configuration
// due to ... reasons ... the key can start with a lower or upper 'S'
if (!dictionary.ContainsKey("storageType") && !dictionary.ContainsKey("StorageType"))
{
var configuration = (TagConfiguration)editor.FromDatabase(dataTypeDto.Configuration);
configuration.StorageType = TagsStorageType.Csv;
dataTypeDto.Configuration = ConfigurationEditor.ToDatabase(configuration);
Database.Update(dataTypeDto);
}
}
}
}
}
@@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
{ public class UpdateUmbracoConsent : MigrationBase {
public UpdateUmbracoConsent(IMigrationContext context)
: base(context)
{ }
public override void Migrate() { Alter.Table(Constants.DatabaseSchema.Tables.Consent).AlterColumn("comment").AsString().Nullable().Do(); }
}
}
@@ -1,29 +0,0 @@
namespace Umbraco.Core.Migrations.Upgrade.V_7_14_0
{
/// <summary>
/// Migrates member group picker properties from NVarchar to NText. See https://github.com/umbraco/Umbraco-CMS/issues/3268.
/// </summary>
public class UpdateMemberGroupPickerData : MigrationBase
{
/// <summary>
/// Migrates member group picker properties from NVarchar to NText. See https://github.com/umbraco/Umbraco-CMS/issues/3268.
/// </summary>
public UpdateMemberGroupPickerData(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
Database.Execute($@"UPDATE umbracoPropertyData SET textValue = varcharValue, varcharValue = NULL
WHERE textValue IS NULL AND id IN (
SELECT id FROM umbracoPropertyData WHERE propertyTypeId in (
SELECT id from cmsPropertyType where dataTypeId IN (
SELECT nodeId FROM umbracoDataType WHERE propertyEditorAlias = '{Constants.PropertyEditors.Aliases.MemberGroupPicker}'
)
)
)");
Database.Execute($"UPDATE umbracoDataType SET dbType = 'Ntext' WHERE propertyEditorAlias = '{Constants.PropertyEditors.Aliases.MemberGroupPicker}'");
}
}
}
@@ -1,50 +0,0 @@
using System.Linq;
namespace Umbraco.Core.Migrations.Upgrade.V_7_5_0
{
public class AddRedirectUrlTable : MigrationBase
{
public AddRedirectUrlTable(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var database = Database;
var umbracoRedirectUrlTableName = "umbracoRedirectUrl";
var tables = SqlSyntax.GetTablesInSchema(database).ToArray();
if (tables.InvariantContains(umbracoRedirectUrlTableName))
{
var columns = SqlSyntax.GetColumnsInSchema(database).ToArray();
if (columns.Any(x => x.TableName.InvariantEquals(umbracoRedirectUrlTableName) && x.ColumnName.InvariantEquals("id") && x.DataType == "uniqueidentifier"))
return;
Delete.Table(umbracoRedirectUrlTableName).Do();
}
Create.Table(umbracoRedirectUrlTableName)
.WithColumn("id").AsGuid().NotNullable().PrimaryKey("PK_" + umbracoRedirectUrlTableName)
.WithColumn("createDateUtc").AsDateTime().NotNullable()
.WithColumn("url").AsString(2048).NotNullable()
.WithColumn("contentKey").AsGuid().NotNullable()
.WithColumn("urlHash").AsString(40).NotNullable()
.Do();
Create.Index("IX_" + umbracoRedirectUrlTableName).OnTable(umbracoRedirectUrlTableName)
.OnColumn("urlHash")
.Ascending()
.OnColumn("contentKey")
.Ascending()
.OnColumn("createDateUtc")
.Descending()
.WithOptions().NonClustered()
.Do();
Create.ForeignKey("FK_" + umbracoRedirectUrlTableName)
.FromTable(umbracoRedirectUrlTableName).ForeignColumn("contentKey")
.ToTable("umbracoNode").PrimaryColumn("uniqueID")
.Do();
}
}
}
@@ -1,40 +0,0 @@
using System;
using System.Linq;
namespace Umbraco.Core.Migrations.Upgrade.V_7_5_0
{
/// <summary>
/// This is here to re-remove these tables, we dropped them in 7.3 but new installs created them again so we're going to re-drop them
/// </summary>
public class RemoveStylesheetDataAndTablesAgain : MigrationBase
{
public RemoveStylesheetDataAndTablesAgain(IMigrationContext context)
: base(context)
{
}
public override void Migrate()
{
// these have been obsoleted, need to copy the values here
var stylesheetPropertyObjectType = new Guid("5555da4f-a123-42b2-4488-dcdfb25e4111");
var stylesheetObjectType = new Guid("9F68DA4F-A3A8-44C2-8226-DCBD125E4840");
//Clear all stylesheet data if the tables exist
var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToArray();
if (tables.InvariantContains("cmsStylesheetProperty"))
{
Delete.FromTable("cmsStylesheetProperty").AllRows().Do();
Delete.FromTable("umbracoNode").Row(new { nodeObjectType = stylesheetPropertyObjectType }).Do();
Delete.Table("cmsStylesheetProperty").Do();
}
if (tables.InvariantContains("cmsStylesheet"))
{
Delete.FromTable("cmsStylesheet").AllRows().Do();
Delete.FromTable("umbracoNode").Row(new { nodeObjectType = stylesheetObjectType }).Do();
Delete.Table("cmsStylesheet").Do();
}
}
}
}
@@ -1,44 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Migrations.Upgrade.V_7_5_0
{
/// <summary>
/// See: http://issues.umbraco.org/issue/U4-8522
/// </summary>
public class UpdateUniqueIndexOnPropertyData : MigrationBase
{
public UpdateUniqueIndexOnPropertyData(IMigrationContext context)
: base(context)
{
}
public override void Migrate()
{
//Clear all stylesheet data if the tables exist
//tuple = tablename, indexname, columnname, unique
var indexes = SqlSyntax.GetDefinedIndexes(Context.Database).ToArray();
var found = indexes.FirstOrDefault(
x => x.Item1.InvariantEquals("cmsPropertyData")
&& x.Item2.InvariantEquals("IX_cmsPropertyData_1")
//we're searching for the old index which is not unique
&& x.Item4 == false);
if (found != null)
{
Database.Execute("DELETE FROM cmsPropertyData WHERE id NOT IN (SELECT MIN(id) FROM cmsPropertyData GROUP BY nodeId, versionId, propertytypeid HAVING MIN(id) IS NOT NULL)");
//we need to re create this index
Delete.Index("IX_cmsPropertyData_1").OnTable("cmsPropertyData").Do();
Create.Index("IX_cmsPropertyData_1").OnTable("cmsPropertyData")
.OnColumn("nodeId").Ascending()
.OnColumn("versionId").Ascending()
.OnColumn("propertytypeid").Ascending()
.WithOptions().NonClustered()
.WithOptions().Unique()
.Do();
}
}
}
}
@@ -1,17 +0,0 @@
namespace Umbraco.Core.Migrations.Upgrade.V_7_5_5
{
/// <summary>
/// See: http://issues.umbraco.org/issue/U4-4196
/// </summary>
public class UpdateAllowedMediaTypesAtRoot : MigrationBase
{
public UpdateAllowedMediaTypesAtRoot(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
Database.Execute("UPDATE cmsContentType SET allowAtRoot = 1 WHERE nodeId = 1032 OR nodeId = 1033");
}
}
}
@@ -1,41 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0
{
public class AddIndexToCmsMemberLoginName : MigrationBase
{
public AddIndexToCmsMemberLoginName(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var database = Database;
//Now we need to check if we can actually d6 this because we won't be able to if there's data in there that is too long
//http://issues.umbraco.org/issue/U4-9758
var colLen = database.ExecuteScalar<int?>("select max(datalength(LoginName)) from cmsMember");
if (colLen < 900 == false && colLen != null)
{
return;
}
var dbIndexes = SqlSyntax.GetDefinedIndexesDefinitions(Context.Database);
//make sure it doesn't already exist
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_cmsMember_LoginName")) == false)
{
//we can apply the index
Create.Index("IX_cmsMember_LoginName").OnTable("cmsMember")
.OnColumn("LoginName")
.Ascending()
.WithOptions()
.NonClustered()
.Do();
}
}
}
}
@@ -1,28 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0
{
public class AddIndexToUmbracoNodePath : MigrationBase
{
public AddIndexToUmbracoNodePath(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var dbIndexes = SqlSyntax.GetDefinedIndexesDefinitions(Context.Database);
//make sure it doesn't already exist
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoNodePath")) == false)
{
Create.Index("IX_umbracoNodePath").OnTable("umbracoNode")
.OnColumn("path")
.Ascending()
.WithOptions()
.NonClustered()
.Do();
}
}
}
}
@@ -1,28 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0
{
public class AddIndexToUser2NodePermission : MigrationBase
{
public AddIndexToUser2NodePermission(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var dbIndexes = SqlSyntax.GetDefinedIndexesDefinitions(Context.Database);
//make sure it doesn't already exist
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoUser2NodePermission_nodeId")) == false)
{
Create.Index("IX_umbracoUser2NodePermission_nodeId").OnTable("umbracoUser2NodePermission")
.OnColumn("nodeId")
.Ascending()
.WithOptions()
.NonClustered()
.Do();
}
}
}
}
@@ -1,85 +0,0 @@
using System;
using System.Linq;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0
{
public class AddIndexesToUmbracoRelationTables : MigrationBase
{
public AddIndexesToUmbracoRelationTables(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var dbIndexes = SqlSyntax.GetDefinedIndexesDefinitions(Context.Database).ToArray();
//make sure it doesn't already exist
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoRelation_parentChildType")) == false)
{
//This will remove any corrupt/duplicate data in the relation table before the index is applied
//Ensure this executes in a deferred block which will be done inside of the migration transaction
var database = Database;
//We need to check if this index has corrupted data and then clear that data
var duplicates = database.Fetch<dynamic>("SELECT parentId,childId,relType FROM umbracoRelation GROUP BY parentId,childId,relType HAVING COUNT(*) > 1");
if (duplicates.Count > 0)
{
//need to fix this there cannot be duplicates so we'll take the latest entries, it's really not going to matter though
foreach (var duplicate in duplicates)
{
var ids = database.Fetch<int>("SELECT id FROM umbracoRelation WHERE parentId=@parentId AND childId=@childId AND relType=@relType ORDER BY datetime DESC",
new { parentId = duplicate.parentId, childId = duplicate.childId, relType = duplicate.relType });
if (ids.Count == 1)
{
//this is just a safety check, this should absolutely never happen
throw new InvalidOperationException("Duplicates were detected but could not be discovered");
}
//delete the others
ids = ids.Skip(0).ToList();
//iterate in groups of 2000 to avoid the max sql parameter limit
foreach (var idGroup in ids.InGroupsOf(2000))
{
database.Execute("DELETE FROM umbracoRelation WHERE id IN (@ids)", new { ids = idGroup });
}
}
}
//unique index to prevent duplicates - and for better perf
Create.Index("IX_umbracoRelation_parentChildType").OnTable("umbracoRelation")
.OnColumn("parentId").Ascending()
.OnColumn("childId").Ascending()
.OnColumn("relType").Ascending()
.WithOptions()
.Unique()
.Do();
}
//need indexes on alias and name for relation type since these are queried against
//make sure it doesn't already exist
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoRelationType_alias")) == false)
{
Create.Index("IX_umbracoRelationType_alias").OnTable("umbracoRelationType")
.OnColumn("alias")
.Ascending()
.WithOptions()
.NonClustered()
.Do();
}
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoRelationType_name")) == false)
{
Create.Index("IX_umbracoRelationType_name").OnTable("umbracoRelationType")
.OnColumn("name")
.Ascending()
.WithOptions()
.NonClustered()
.Do();
}
}
}
}
@@ -1,27 +0,0 @@
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0
{
public class AddLockObjects : MigrationBase
{
public AddLockObjects(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
EnsureLockObject(Constants.Locks.Servers, "Servers");
}
private void EnsureLockObject(int id, string name)
{
var db = Database;
var exists = db.Exists<LockDto>(id);
if (exists) return;
// be safe: delete old umbracoNode lock objects if any
db.Execute("DELETE FROM umbracoNode WHERE id=@id;", new { id });
// then create umbracoLock object
db.Execute("INSERT umbracoLock (id, name, value) VALUES (@id, @name, 1);", new { id, name });
}
}
}
@@ -1,24 +0,0 @@
using System.Linq;
namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0
{
public class AddLockTable : MigrationBase
{
public AddLockTable(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToArray();
if (tables.InvariantContains("umbracoLock") == false)
{
Create.Table("umbracoLock")
.WithColumn("id").AsInt32().PrimaryKey("PK_umbracoLock")
.WithColumn("value").AsInt32().NotNullable()
.WithColumn("name").AsString(64).NotNullable()
.Do();
}
}
}
}
@@ -1,68 +0,0 @@
using System;
using System.Linq;
namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0
{
public class AddMacroUniqueIdColumn : MigrationBase
{
public AddMacroUniqueIdColumn(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray();
if (columns.Any(x => x.TableName.InvariantEquals("cmsMacro") && x.ColumnName.InvariantEquals("uniqueId")) == false)
{
Create.Column("uniqueId").OnTable("cmsMacro").AsGuid().Nullable().Do();
UpdateMacroGuids();
Alter.Table("cmsMacro").AlterColumn("uniqueId").AsGuid().NotNullable().Do();
Create.Index("IX_cmsMacro_UniqueId").OnTable("cmsMacro").OnColumn("uniqueId")
.Ascending()
.WithOptions().NonClustered()
.WithOptions().Unique()
.Do();
}
if (columns.Any(x => x.TableName.InvariantEquals("cmsMacroProperty") && x.ColumnName.InvariantEquals("uniquePropertyId")) == false)
{
Create.Column("uniquePropertyId").OnTable("cmsMacroProperty").AsGuid().Nullable().Do();
UpdateMacroPropertyGuids();
Alter.Table("cmsMacroProperty").AlterColumn("uniquePropertyId").AsGuid().NotNullable().Do();
Create.Index("IX_cmsMacroProperty_UniquePropertyId").OnTable("cmsMacroProperty").OnColumn("uniquePropertyId")
.Ascending()
.WithOptions().NonClustered()
.WithOptions().Unique()
.Do();
}
}
private void UpdateMacroGuids()
{
var database = Database;
var updates = database.Query<dynamic>("SELECT id, macroAlias FROM cmsMacro")
.Select(macro => Tuple.Create((int) macro.id, ("macro____" + (string) macro.macroAlias).ToGuid()))
.ToList();
foreach (var update in updates)
database.Execute("UPDATE cmsMacro set uniqueId=@guid WHERE id=@id", new { guid = update.Item2, id = update.Item1 });
}
private void UpdateMacroPropertyGuids()
{
var database = Database;
var updates = database.Query<dynamic>(@"SELECT cmsMacroProperty.id id, macroPropertyAlias propertyAlias, cmsMacro.macroAlias macroAlias
FROM cmsMacroProperty
JOIN cmsMacro ON cmsMacroProperty.macro=cmsMacro.id")
.Select(prop => Tuple.Create((int) prop.id, ("macro____" + (string) prop.macroAlias + "____" + (string) prop.propertyAlias).ToGuid()))
.ToList();
foreach (var update in updates)
database.Execute("UPDATE cmsMacroProperty set uniquePropertyId=@guid WHERE id=@id", new { guid = update.Item2, id = update.Item1 });
}
}
}
@@ -1,40 +0,0 @@
using System;
using System.Linq;
namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0
{
public class AddRelationTypeUniqueIdColumn : MigrationBase
{
public AddRelationTypeUniqueIdColumn(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray();
if (columns.Any(x => x.TableName.InvariantEquals("umbracoRelationType") && x.ColumnName.InvariantEquals("typeUniqueId")) == false)
{
Create.Column("typeUniqueId").OnTable("umbracoRelationType").AsGuid().Nullable().Do();
UpdateRelationTypeGuids();
Alter.Table("umbracoRelationType").AlterColumn("typeUniqueId").AsGuid().NotNullable().Do();
Create.Index("IX_umbracoRelationType_UniqueId").OnTable("umbracoRelationType").OnColumn("typeUniqueId")
.Ascending()
.WithOptions().NonClustered()
.WithOptions().Unique()
.Do();
}
}
private void UpdateRelationTypeGuids()
{
var database = Database;
var updates = database.Query<dynamic>("SELECT id, alias, name FROM umbracoRelationType")
.Select(relationType => Tuple.Create((int) relationType.id, ("relationType____" + (string) relationType.alias + "____" + (string) relationType.name).ToGuid()))
.ToList();
foreach (var update in updates)
database.Execute("UPDATE umbracoRelationType set typeUniqueId=@guid WHERE id=@id", new { guid = update.Item2, id = update.Item1 });
}
}
}
@@ -1,37 +0,0 @@
using System;
using System.Linq;
namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0
{
public class NormalizeTemplateGuids : MigrationBase
{
public NormalizeTemplateGuids(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var database = Database;
// we need this migration because ppl running pre-7.6 on Cloud and Courier have templates in different
// environments having different GUIDs (Courier does not sync template GUIDs) and we need to normalize
// these GUIDs so templates with the same alias on different environments have the same GUID.
// however, if already running a prerelease version of 7.6, we do NOT want to normalize the GUIDs as quite
// probably, we are already running Deploy and the GUIDs are OK. assuming noone is running a prerelease
// of 7.6 on Courier.
// so... testing if we already have a 7.6.0 version installed. not pretty but...?
//
var version = database.FirstOrDefault<string>("SELECT version FROM umbracoMigration WHERE name=@name ORDER BY version DESC", new { name = Constants.System.UmbracoUpgradePlanName });
if (version != null && version.StartsWith("7.6.0")) return;
var updates = database.Query<dynamic>(@"SELECT umbracoNode.id, cmsTemplate.alias FROM umbracoNode
JOIN cmsTemplate ON umbracoNode.id=cmsTemplate.nodeId
WHERE nodeObjectType = @guid", new { guid = Constants.ObjectTypes.TemplateType })
.Select(template => Tuple.Create((int) template.id, ("template____" + (string) template.alias).ToGuid()))
.ToList();
foreach (var update in updates)
database.Execute("UPDATE umbracoNode set uniqueId=@guid WHERE id=@id", new { guid = update.Item2, id = update.Item1 });
}
}
}
@@ -1,41 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0
{
public class ReduceLoginNameColumnsSize : MigrationBase
{
public ReduceLoginNameColumnsSize(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
//Now we need to check if we can actually d6 this because we won't be able to if there's data in there that is too long
//http://issues.umbraco.org/issue/U4-9758
var database = Database;
var dbIndexes = SqlSyntax.GetDefinedIndexesDefinitions(database);
var colLen = database.ExecuteScalar<int?>("select max(datalength(LoginName)) from cmsMember");
if (colLen < 900 == false) return;
//if an index exists on this table we need to drop it. Normally we'd check via index name but in some odd cases (i.e. Our)
//the index name is something odd (starts with "mi_"). In any case, the index cannot exist if we want to alter the column
//so we'll drop whatever index is there and add one with the correct name after.
var loginNameIndex = dbIndexes.FirstOrDefault(x => x.TableName.InvariantEquals("cmsMember") && x.ColumnName.InvariantEquals("LoginName"));
if (loginNameIndex != null)
{
Delete.Index(loginNameIndex.IndexName).OnTable("cmsMember").Do();
}
//we can apply the col length change
Alter.Table("cmsMember")
.AlterColumn("LoginName")
.AsString(225)
.NotNullable()
.Do();
}
}
}
@@ -1,29 +0,0 @@
using System.Linq;
namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0
{
/// <summary>
/// See: http://issues.umbraco.org/issue/U4-9188
/// </summary>
public class UpdateUniqueIndexOnPropertyData : MigrationBase
{
public UpdateUniqueIndexOnPropertyData(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
//tuple = tablename, indexname, columnname, unique
var indexes = SqlSyntax.GetDefinedIndexes(Context.Database).ToArray();
var found = indexes.FirstOrDefault(
x => x.Item1.InvariantEquals("cmsPropertyData")
&& x.Item2.InvariantEquals("IX_cmsPropertyData"));
if (found != null)
{
//drop the index
Delete.Index("IX_cmsPropertyData").OnTable("cmsPropertyData").Do();
}
}
}
}
@@ -1,30 +0,0 @@
using System.Linq;
namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0
{
public class RemoveUmbracoDeployTables : MigrationBase
{
public RemoveUmbracoDeployTables(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToArray();
// there are two versions of umbracoDeployDependency,
// 1. one created by 7.4 and never used, we need to remove it (has a sourceId column)
// 2. one created by Deploy itself, we need to keep it (has a sourceUdi column)
if (tables.InvariantContains("umbracoDeployDependency"))
{
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray();
if (columns.Any(x => x.TableName.InvariantEquals("umbracoDeployDependency") && x.ColumnName.InvariantEquals("sourceId")))
Delete.Table("umbracoDeployDependency").Do();
}
// always remove umbracoDeployChecksum
if (tables.InvariantContains("umbracoDeployChecksum"))
Delete.Table("umbracoDeployChecksum").Do();
}
}
}
@@ -1,38 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0
{
public class AddIndexToDictionaryKeyColumn : MigrationBase
{
public AddIndexToDictionaryKeyColumn(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var database = Database;
//Now we need to check if we can actually do this because we won't be able to if there's data in there that is too long
var colLen = database.ExecuteScalar<int?>(string.Format("select max(datalength({0})) from cmsDictionary", SqlSyntax.GetQuotedColumnName("key")));
if (colLen < 900 == false && colLen != null)
{
return;
}
var dbIndexes = SqlSyntax.GetDefinedIndexesDefinitions(Context.Database);
//make sure it doesn't already exist
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_cmsDictionary_key")) == false)
{
//we can apply the index
Create.Index("IX_cmsDictionary_key").OnTable("cmsDictionary")
.OnColumn("key")
.Ascending()
.WithOptions()
.NonClustered()
.Do();
}
}
}
}
@@ -1,357 +0,0 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.Dtos;
using ColumnInfo = Umbraco.Core.Persistence.SqlSyntax.ColumnInfo;
namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0
{
public class AddUserGroupTables : MigrationBase
{
private readonly string _collateSyntax;
public AddUserGroupTables(IMigrationContext context)
: base(context)
{
//For some of the migration data inserts we require to use a special MSSQL collate expression since
//some databases may have a custom collation specified and if that is the case, when we compare strings
//in dynamic SQL it will try to compare strings in different collations and this will yield errors.
_collateSyntax = "COLLATE DATABASE_DEFAULT";
}
public override void Migrate()
{
var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToList();
var constraints = SqlSyntax.GetConstraintsPerColumn(Context.Database).Distinct().ToArray();
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray();
//In some very rare cases, there might already be user group tables that we'll need to remove first
//but of course we don't want to remove the tables we will be creating below if they already exist so
//need to do some checks first since these old rare tables have a different schema
RemoveOldTablesIfExist(tables, columns);
if (AddNewTables(tables))
{
MigrateUserPermissions();
MigrateUserTypesToGroups();
DeleteOldTables(tables, constraints);
SetDefaultIcons();
}
else
{
//if we aren't adding the tables, make sure that the umbracoUserGroup table has the correct FKs - these
//were added after the beta release so we need to do some cleanup
//if the FK doesn't exist
if (constraints.Any(x => x.Item1.InvariantEquals("umbracoUserGroup")
&& x.Item2.InvariantEquals("startContentId")
&& x.Item3.InvariantEquals("FK_startContentId_umbracoNode_id")) == false)
{
//before we add any foreign key we need to make sure there's no stale data in there which would have happened in the beta
//release if a start node was assigned and then that start node was deleted.
Database.Execute(@"UPDATE umbracoUserGroup SET startContentId = NULL WHERE startContentId NOT IN (SELECT id FROM umbracoNode)");
Create.ForeignKey("FK_startContentId_umbracoNode_id")
.FromTable("umbracoUserGroup")
.ForeignColumn("startContentId")
.ToTable("umbracoNode")
.PrimaryColumn("id")
.OnDelete(Rule.None)
.OnUpdate(Rule.None)
.Do();
}
if (constraints.Any(x => x.Item1.InvariantEquals("umbracoUserGroup")
&& x.Item2.InvariantEquals("startMediaId")
&& x.Item3.InvariantEquals("FK_startMediaId_umbracoNode_id")) == false)
{
//before we add any foreign key we need to make sure there's no stale data in there which would have happened in the beta
//release if a start node was assigned and then that start node was deleted.
Database.Execute(@"UPDATE umbracoUserGroup SET startMediaId = NULL WHERE startMediaId NOT IN (SELECT id FROM umbracoNode)");
Create.ForeignKey("FK_startMediaId_umbracoNode_id")
.FromTable("umbracoUserGroup")
.ForeignColumn("startMediaId")
.ToTable("umbracoNode")
.PrimaryColumn("id")
.OnDelete(Rule.None)
.OnUpdate(Rule.None)
.Do();
}
}
}
/// <summary>
/// In some very rare cases, there might already be user group tables that we'll need to remove first
/// but of course we don't want to remove the tables we will be creating below if they already exist so
/// need to do some checks first since these old rare tables have a different schema
/// </summary>
/// <param name="tables"></param>
/// <param name="columns"></param>
private void RemoveOldTablesIfExist(List<string> tables, ColumnInfo[] columns)
{
if (tables.Contains("umbracoUser2userGroup", StringComparer.InvariantCultureIgnoreCase))
{
//this column doesn't exist in the 7.7 schema, so if it's there, then this is a super old table
var foundOldColumn = columns
.FirstOrDefault(x =>
x.ColumnName.Equals("user", StringComparison.InvariantCultureIgnoreCase)
&& x.TableName.Equals("umbracoUser2userGroup", StringComparison.InvariantCultureIgnoreCase));
if (foundOldColumn != null)
{
Delete.Table("umbracoUser2userGroup").Do();
//remove from the tables list since this will be re-checked in further logic
tables.Remove("umbracoUser2userGroup");
}
}
if (tables.Contains("umbracoUserGroup", StringComparer.InvariantCultureIgnoreCase))
{
//The new schema has several columns, the super old one for this table only had 2 so if it's 2 get rid of it
var countOfCols = columns
.Count(x => x.TableName.Equals("umbracoUserGroup", StringComparison.InvariantCultureIgnoreCase));
if (countOfCols == 2)
{
Delete.Table("umbracoUserGroup").Do();
//remove from the tables list since this will be re-checked in further logic
tables.Remove("umbracoUserGroup");
}
}
}
private void SetDefaultIcons()
{
Database.Execute($"UPDATE umbracoUserGroup SET icon = \'\' WHERE userGroupAlias = \'{Constants.Security.AdminGroupAlias}\'");
Database.Execute("UPDATE umbracoUserGroup SET icon = \'icon-edit\' WHERE userGroupAlias = \'writer\'");
Database.Execute("UPDATE umbracoUserGroup SET icon = \'icon-tools\' WHERE userGroupAlias = \'editor\'");
Database.Execute("UPDATE umbracoUserGroup SET icon = \'icon-globe\' WHERE userGroupAlias = \'translator\'");
}
private bool AddNewTables(List<string> tables)
{
var updated = false;
if (tables.InvariantContains("umbracoUserGroup") == false)
{
Create.Table<UserGroupDto>().Do();
updated = true;
}
if (tables.InvariantContains("umbracoUser2UserGroup") == false)
{
Create.Table<User2UserGroupDto>().Do();
updated = true;
}
if (tables.InvariantContains("umbracoUserGroup2App") == false)
{
Create.Table<UserGroup2AppDto>().Do();
updated = true;
}
if (tables.InvariantContains("umbracoUserGroup2NodePermission") == false)
{
Create.Table<UserGroup2NodePermissionDto>().Do();
updated = true;
}
return updated;
}
private void MigrateUserTypesToGroups()
{
// Create a user group for each user type
Database.Execute(@"INSERT INTO umbracoUserGroup (userGroupAlias, userGroupName, userGroupDefaultPermissions)
SELECT userTypeAlias, userTypeName, userTypeDefaultPermissions
FROM umbracoUserType");
// Add each user to the group created from their type
Database.Execute(string.Format(@"INSERT INTO umbracoUser2UserGroup (userId, userGroupId)
SELECT u.id, ug.id
FROM umbracoUser u
INNER JOIN umbracoUserType ut ON ut.id = u.userType
INNER JOIN umbracoUserGroup ug ON ug.userGroupAlias {0} = ut.userTypeAlias {0}", _collateSyntax));
// Add the built-in administrator account to all apps
// this will lookup all of the apps that the admin currently has access to in order to assign the sections
// instead of use statically assigning since there could be extra sections we don't know about.
Database.Execute(@"INSERT INTO umbracoUserGroup2app (userGroupId,app)
SELECT ug.id, app
FROM umbracoUserGroup ug
INNER JOIN umbracoUser2UserGroup u2ug ON u2ug.userGroupId = ug.id
INNER JOIN umbracoUser u ON u.id = u2ug.userId
INNER JOIN umbracoUser2app u2a ON u2a." + SqlSyntax.GetQuotedColumnName("user") + @" = u.id
WHERE u.id = 0");
// Add the default section access to the other built-in accounts
// writer:
Database.Execute(string.Format(@"INSERT INTO umbracoUserGroup2app (userGroupId, app)
SELECT ug.id, 'content' as app
FROM umbracoUserGroup ug
WHERE ug.userGroupAlias {0} = 'writer' {0}", _collateSyntax));
// editor
Database.Execute(string.Format(@"INSERT INTO umbracoUserGroup2app (userGroupId, app)
SELECT ug.id, 'content' as app
FROM umbracoUserGroup ug
WHERE ug.userGroupAlias {0} = 'editor' {0}", _collateSyntax));
Database.Execute(string.Format(@"INSERT INTO umbracoUserGroup2app (userGroupId, app)
SELECT ug.id, 'media' as app
FROM umbracoUserGroup ug
WHERE ug.userGroupAlias {0} = 'editor' {0}", _collateSyntax));
// translator
Database.Execute(string.Format(@"INSERT INTO umbracoUserGroup2app (userGroupId, app)
SELECT ug.id, 'translation' as app
FROM umbracoUserGroup ug
WHERE ug.userGroupAlias {0} = 'translator' {0}", _collateSyntax));
//We need to lookup all distinct combinations of section access and create a group for each distinct collection
//and assign groups accordingly. We'll perform the lookup 'now' to then create the queued SQL migrations.
var userAppsData = Context.Database.Query<dynamic>(@"SELECT u.id, u2a.app FROM umbracoUser u
INNER JOIN umbracoUser2app u2a ON u2a." + SqlSyntax.GetQuotedColumnName("user") + @" = u.id
ORDER BY u.id, u2a.app");
var usersWithApps = new Dictionary<int, List<string>>();
foreach (var userApps in userAppsData)
{
if (usersWithApps.TryGetValue(userApps.id, out List<string> apps) == false)
{
apps = new List<string> {userApps.app};
usersWithApps.Add(userApps.id, apps);
}
else
{
apps.Add(userApps.app);
}
}
//At this stage we have a dictionary of users with a collection of their apps which are sorted
//and we need to determine the unique/distinct app collections for each user to create groups with.
//We can do this by creating a hash value of all of the app values and since they are already sorted we can get a distinct
//collection by this hash.
var distinctApps = usersWithApps
.Select(x => new {appCollection = x.Value, appsHash = string.Join("", x.Value).GenerateHash()})
.DistinctBy(x => x.appsHash)
.ToArray();
//Now we need to create user groups for each of these distinct app collections, and then assign the corresponding users to those groups
for (var i = 0; i < distinctApps.Length; i++)
{
//create the group
var alias = "MigratedSectionAccessGroup_" + (i + 1);
Insert.IntoTable("umbracoUserGroup").Row(new
{
userGroupAlias = "MigratedSectionAccessGroup_" + (i + 1),
userGroupName = "Migrated Section Access Group " + (i + 1)
}).Do();
//now assign the apps
var distinctApp = distinctApps[i];
foreach (var app in distinctApp.appCollection)
{
Database.Execute(string.Format(@"INSERT INTO umbracoUserGroup2app (userGroupId, app)
SELECT ug.id, '" + app + @"' as app
FROM umbracoUserGroup ug
WHERE ug.userGroupAlias {0} = '" + alias + "' {0}", _collateSyntax));
}
//now assign the corresponding users to this group
foreach (var userWithApps in usersWithApps)
{
//check if this user's groups hash matches the current groups hash
var hash = string.Join("", userWithApps.Value).GenerateHash();
if (hash == distinctApp.appsHash)
{
//it matches so assign the user to this group
Database.Execute(string.Format(@"INSERT INTO umbracoUser2UserGroup (userId, userGroupId)
SELECT " + userWithApps.Key + @", ug.id
FROM umbracoUserGroup ug
WHERE ug.userGroupAlias {0} = '" + alias + "' {0}", _collateSyntax));
}
}
}
// Rename some groups for consistency (plural form)
Database.Execute("UPDATE umbracoUserGroup SET userGroupName = 'Writers' WHERE userGroupAlias = 'writer'");
Database.Execute("UPDATE umbracoUserGroup SET userGroupName = 'Translators' WHERE userGroupAlias = 'translator'");
//Ensure all built in groups have a start node of -1
Database.Execute("UPDATE umbracoUserGroup SET startContentId = -1 WHERE userGroupAlias = 'editor'");
Database.Execute("UPDATE umbracoUserGroup SET startMediaId = -1 WHERE userGroupAlias = 'editor'");
Database.Execute("UPDATE umbracoUserGroup SET startContentId = -1 WHERE userGroupAlias = 'writer'");
Database.Execute("UPDATE umbracoUserGroup SET startMediaId = -1 WHERE userGroupAlias = 'writer'");
Database.Execute("UPDATE umbracoUserGroup SET startContentId = -1 WHERE userGroupAlias = 'translator'");
Database.Execute("UPDATE umbracoUserGroup SET startMediaId = -1 WHERE userGroupAlias = 'translator'");
Database.Execute("UPDATE umbracoUserGroup SET startContentId = -1 WHERE userGroupAlias = 'admin'");
Database.Execute("UPDATE umbracoUserGroup SET startMediaId = -1 WHERE userGroupAlias = 'admin'");
}
private void MigrateUserPermissions()
{
// Create user group records for all non-admin users that have specific permissions set
Database.Execute(@"INSERT INTO umbracoUserGroup(userGroupAlias, userGroupName)
SELECT 'permissionGroupFor' + userLogin, 'Migrated Permission Group for ' + userLogin
FROM umbracoUser
WHERE (id IN (
SELECT userid
FROM umbracoUser2NodePermission
))
AND id > 0");
// Associate those groups with the users
Database.Execute(string.Format(@"INSERT INTO umbracoUser2UserGroup (userId, userGroupId)
SELECT u.id, ug.id
FROM umbracoUser u
INNER JOIN umbracoUserGroup ug ON ug.userGroupAlias {0} = 'permissionGroupFor' + userLogin {0}", _collateSyntax));
// Create node permissions on the groups
Database.Execute(string.Format(@"INSERT INTO umbracoUserGroup2NodePermission (userGroupId,nodeId,permission)
SELECT ug.id, nodeId, permission
FROM umbracoUserGroup ug
INNER JOIN umbracoUser2UserGroup u2ug ON u2ug.userGroupId = ug.id
INNER JOIN umbracoUser u ON u.id = u2ug.userId
INNER JOIN umbracoUser2NodePermission u2np ON u2np.userId = u.id
WHERE ug.userGroupAlias {0} NOT IN (
SELECT userTypeAlias {0}
FROM umbracoUserType
)", _collateSyntax));
// Create app permissions on the groups
Database.Execute(string.Format(@"INSERT INTO umbracoUserGroup2app (userGroupId,app)
SELECT ug.id, app
FROM umbracoUserGroup ug
INNER JOIN umbracoUser2UserGroup u2ug ON u2ug.userGroupId = ug.id
INNER JOIN umbracoUser u ON u.id = u2ug.userId
INNER JOIN umbracoUser2app u2a ON u2a." + SqlSyntax.GetQuotedColumnName("user") + @" = u.id
WHERE ug.userGroupAlias {0} NOT IN (
SELECT userTypeAlias {0}
FROM umbracoUserType
)", _collateSyntax));
}
private void DeleteOldTables(List<string> tables, Tuple<string, string, string>[] constraints)
{
if (tables.InvariantContains("umbracoUser2App"))
{
Delete.Table("umbracoUser2App").Do();
}
if (tables.InvariantContains("umbracoUser2NodePermission"))
{
Delete.Table("umbracoUser2NodePermission").Do();
}
if (tables.InvariantContains("umbracoUserType") && tables.InvariantContains("umbracoUser"))
{
//Delete the FK if it exists before dropping the column
if (constraints.Any(x => x.Item1.InvariantEquals("umbracoUser") && x.Item3.InvariantEquals("FK_umbracoUser_umbracoUserType_id")))
{
Delete.ForeignKey("FK_umbracoUser_umbracoUserType_id").OnTable("umbracoUser").Do();
}
//This is the super old constraint name of the FK for user type so check this one too
if (constraints.Any(x => x.Item1.InvariantEquals("umbracoUser") && x.Item3.InvariantEquals("FK_user_userType")))
{
Delete.ForeignKey("FK_user_userType").OnTable("umbracoUser").Do();
}
Delete.Column("userType").FromTable("umbracoUser").Do();
Delete.Table("umbracoUserType").Do();
}
}
}
}
@@ -1,41 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0
{
public class AddUserStartNodeTable : MigrationBase
{
public AddUserStartNodeTable(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToArray();
if (tables.InvariantContains("umbracoUserStartNode")) return;
Create.Table<UserStartNodeDto>().Do();
MigrateUserStartNodes();
//now remove the old columns
Delete.Column("startStructureID").FromTable("umbracoUser").Do();
Delete.Column("startMediaID").FromTable("umbracoUser").Do();
}
private void MigrateUserStartNodes()
{
Database.Execute(@"INSERT INTO umbracoUserStartNode (userId, startNode, startNodeType)
SELECT id, startStructureID, 1
FROM umbracoUser
WHERE startStructureID IS NOT NULL AND startStructureID > 0 AND startStructureID IN (SELECT id FROM umbracoNode WHERE nodeObjectType='" + Constants.ObjectTypes.Document + "')");
Database.Execute(@"INSERT INTO umbracoUserStartNode (userId, startNode, startNodeType)
SELECT id, startMediaID, 2
FROM umbracoUser
WHERE startMediaID IS NOT NULL AND startMediaID > 0 AND startMediaID IN (SELECT id FROM umbracoNode WHERE nodeObjectType='" + Constants.ObjectTypes.Media + "')");
}
}
}
@@ -1,37 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0
{
/// <summary>
/// Ensures the built-in user groups have the blueprint permission by default on upgrade
/// </summary>
public class EnsureContentTemplatePermissions : MigrationBase
{
public EnsureContentTemplatePermissions(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var database = Database;
var userGroups = database.Fetch<UserGroupDto>(
Context.SqlContext.Sql().Select("*")
.From<UserGroupDto>()
.Where<UserGroupDto>(x => x.Alias == "admin" || x.Alias == "editor"));
foreach (var userGroup in userGroups)
{
if (userGroup.DefaultPermissions.Contains('') == false)
{
userGroup.DefaultPermissions += "";
Update.Table("umbracoUserGroup")
.Set(new { userGroupDefaultPermissions = userGroup.DefaultPermissions })
.Where(new { id = userGroup.Id })
.Do();
}
}
}
}
}
@@ -1,37 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0
{
public class ReduceDictionaryKeyColumnsSize : MigrationBase
{
public ReduceDictionaryKeyColumnsSize(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
//Now we need to check if we can actually do this because we won't be able to if there's data in there that is too long
var database = Database;
var dbIndexes = SqlSyntax.GetDefinedIndexesDefinitions(database);
var colLen = database.ExecuteScalar<int?>(string.Format("select max(datalength({0})) from cmsDictionary", SqlSyntax.GetQuotedColumnName("key")));
if (colLen < 900 == false) return;
//if it exists we need to drop it first
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_cmsDictionary_key")))
{
Delete.Index("IX_cmsDictionary_key").OnTable("cmsDictionary").Do();
}
//we can apply the col length change
Alter.Table("cmsDictionary")
.AlterColumn("key")
.AsString(450)
.NotNullable()
.Do();
}
}
}
@@ -1,48 +0,0 @@
using System.Linq;
using System.Web.Security;
using Newtonsoft.Json;
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
using Umbraco.Core.Security;
namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0
{
public class UpdateUserTables : MigrationBase
{
public UpdateUserTables(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
//Don't execute if the column is already there
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray();
if (columns.Any(x => x.TableName.InvariantEquals("umbracoUser") && x.ColumnName.InvariantEquals("createDate")) == false)
Create.Column("createDate").OnTable("umbracoUser").AsDateTime().NotNullable().WithDefault(SystemMethods.CurrentDateTime).Do();
if (columns.Any(x => x.TableName.InvariantEquals("umbracoUser") && x.ColumnName.InvariantEquals("updateDate")) == false)
Create.Column("updateDate").OnTable("umbracoUser").AsDateTime().NotNullable().WithDefault(SystemMethods.CurrentDateTime).Do();
if (columns.Any(x => x.TableName.InvariantEquals("umbracoUser") && x.ColumnName.InvariantEquals("emailConfirmedDate")) == false)
Create.Column("emailConfirmedDate").OnTable("umbracoUser").AsDateTime().Nullable().Do();
if (columns.Any(x => x.TableName.InvariantEquals("umbracoUser") && x.ColumnName.InvariantEquals("invitedDate")) == false)
Create.Column("invitedDate").OnTable("umbracoUser").AsDateTime().Nullable().Do();
if (columns.Any(x => x.TableName.InvariantEquals("umbracoUser") && x.ColumnName.InvariantEquals("avatar")) == false)
Create.Column("avatar").OnTable("umbracoUser").AsString(500).Nullable().Do();
if (columns.Any(x => x.TableName.InvariantEquals("umbracoUser") && x.ColumnName.InvariantEquals("passwordConfig")) == false)
{
Create.Column("passwordConfig").OnTable("umbracoUser").AsString(500).Nullable().Do();
//Check if we have a known config, we only want to store config for hashing
var membershipProvider = MembershipProviderExtensions.GetUsersMembershipProvider();
if (membershipProvider.PasswordFormat == MembershipPasswordFormat.Hashed)
{
var json = JsonConvert.SerializeObject(new { hashAlgorithm = Membership.HashAlgorithmType });
Database.Execute("UPDATE umbracoUser SET passwordConfig = '" + json + "'");
}
}
}
}
}
@@ -1,27 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Migrations.Upgrade.V_7_8_0
{
internal class AddIndexToPropertyTypeAliasColumn : MigrationBase
{
public AddIndexToPropertyTypeAliasColumn(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var dbIndexes = SqlSyntax.GetDefinedIndexesDefinitions(Context.Database);
//make sure it doesn't already exist
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_cmsPropertyTypeAlias")) == false)
{
//we can apply the index
Create.Index("IX_cmsPropertyTypeAlias").OnTable(Constants.DatabaseSchema.Tables.PropertyType)
.OnColumn("Alias")
.Ascending().WithOptions().NonClustered()
.Do();
}
}
}
}
@@ -1,20 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_7_8_0
{
internal class AddInstructionCountColumn : MigrationBase
{
public AddInstructionCountColumn(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray();
if (columns.Any(x => x.TableName.InvariantEquals(Constants.DatabaseSchema.Tables.CacheInstruction) && x.ColumnName.InvariantEquals("instructionCount")) == false)
AddColumn<CacheInstructionDto>("instructionCount");
}
}
}
@@ -1,65 +0,0 @@
using System.Collections.Generic;
using System.Linq;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.Dtos;
using Umbraco.Core.Persistence.Factories;
using static Umbraco.Core.Persistence.NPocoSqlExtensions.Statics;
namespace Umbraco.Core.Migrations.Upgrade.V_7_8_0
{
internal class AddMediaVersionTable : MigrationBase
{
public AddMediaVersionTable(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToArray();
if (tables.InvariantContains(Constants.DatabaseSchema.Tables.MediaVersion)) return;
Create.Table<MediaVersionDto>().Do();
MigrateMediaPaths();
}
private void MigrateMediaPaths()
{
// this may not be the most efficient way to do it, compared to how it's done in v7, but this
// migration should only run for v8 sites that are being developed, before v8 is released, so
// no big sites and performances don't matter here - keep it simple
var sql = Sql()
.Select<PropertyDataDto>(x => x.VarcharValue, x => x.TextValue)
.AndSelect<ContentVersionDto>(x => Alias(x.Id, "versionId"))
.From<PropertyDataDto>()
.InnerJoin<PropertyTypeDto>().On<PropertyDataDto, PropertyTypeDto>((left, right) => left.PropertyTypeId == right.Id)
.InnerJoin<ContentVersionDto>().On<PropertyDataDto, ContentVersionDto>((left, right) => left.VersionId == right.Id)
.InnerJoin<NodeDto>().On<ContentVersionDto, NodeDto>((left, right) => left.NodeId == right.NodeId)
.Where<PropertyTypeDto>(x => x.Alias == "umbracoFile")
.Where<NodeDto>(x => x.NodeObjectType == Constants.ObjectTypes.Media);
var paths = new List<MediaVersionDto>();
//using QUERY = a db cursor, we won't load this all into memory first, just row by row
foreach (var row in Database.Query<dynamic>(sql))
{
// if there's values then ensure there's a media path match and extract it
string mediaPath = null;
if (
(row.varcharValue != null && ContentBaseFactory.TryMatch((string) row.varcharValue, out mediaPath))
|| (row.textValue != null && ContentBaseFactory.TryMatch((string) row.textValue, out mediaPath)))
{
paths.Add(new MediaVersionDto
{
Id = (int) row.versionId,
Path = mediaPath
});
}
}
// bulk insert
Database.BulkInsertRecords(paths);
}
}
}
@@ -1,21 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.DatabaseAnnotations;
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_7_8_0
{
internal class AddTourDataUserColumn : MigrationBase
{
public AddTourDataUserColumn(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray();
if (columns.Any(x => x.TableName.InvariantEquals(Constants.DatabaseSchema.Tables.User) && x.ColumnName.InvariantEquals("tourData")) == false)
AddColumn<UserDto>("tourData");
}
}
}
@@ -1,22 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_7_8_0
{
internal class AddUserLoginTable : MigrationBase
{
public AddUserLoginTable(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToArray();
if (tables.InvariantContains(Constants.DatabaseSchema.Tables.UserLogin) == false)
{
Create.Table<UserLoginDto>().Do();
}
}
}
}
@@ -1,20 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_7_9_0
{
internal class AddIsSensitiveMemberTypeColumn : MigrationBase
{
public AddIsSensitiveMemberTypeColumn(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray();
if (columns.Any(x => x.TableName.InvariantEquals(Constants.DatabaseSchema.Tables.MemberPropertyType) && x.ColumnName.InvariantEquals("isSensitive")) == false)
AddColumn<MemberPropertyTypeDto>("isSensitive");
}
}
}
@@ -1,22 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_7_9_0
{
internal class AddUmbracoAuditTable : MigrationBase
{
public AddUmbracoAuditTable(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToArray();
if (tables.InvariantContains(Constants.DatabaseSchema.Tables.AuditEntry))
return;
Create.Table<AuditEntryDto>().Do();
}
}
}
@@ -1,22 +0,0 @@
using System.Linq;
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_7_9_0
{
internal class AddUmbracoConsentTable : MigrationBase
{
public AddUmbracoConsentTable(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToArray();
if (tables.InvariantContains(Constants.DatabaseSchema.Tables.Consent))
return;
Create.Table<ConsentDto>().Do();
}
}
}
@@ -1,27 +0,0 @@
using System;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_7_9_0
{
internal class CreateSensitiveDataUserGroup : MigrationBase
{
public CreateSensitiveDataUserGroup(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var sql = Sql()
.SelectCount()
.From<UserGroupDto>()
.Where<UserGroupDto>(x => x.Alias == Constants.Security.SensitiveDataGroupAlias);
var exists = Database.ExecuteScalar<int>(sql) > 0;
if (exists) return;
var groupId = Database.Insert(Constants.DatabaseSchema.Tables.UserGroup, "id", new UserGroupDto { StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.SensitiveDataGroupAlias, Name = "Sensitive data", DefaultPermissions = "", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-lock" });
Database.Insert(new User2UserGroupDto { UserGroupId = Convert.ToInt32(groupId), UserId = Constants.Security.SuperUserId }); // add super to sensitive data
}
}
}
@@ -1,6 +1,7 @@
using System.Data;
using System.Linq;
using Umbraco.Core.Persistence.DatabaseAnnotations;
using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0
{
@@ -12,31 +13,10 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0
public override void Migrate()
{
var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToArray();
var tables = SqlSyntax.GetTablesInSchema(Context.Database);
if (tables.InvariantContains("cmsContentNu")) return;
var textType = SqlSyntax.GetSpecialDbType(SpecialDbTypes.NTEXT);
Create.Table("cmsContentNu")
.WithColumn("nodeId").AsInt32().NotNullable()
.WithColumn("published").AsBoolean().NotNullable()
.WithColumn("data").AsCustom(textType).NotNullable()
.WithColumn("rv").AsInt64().NotNullable().WithDefaultValue(0)
.Do();
Create.PrimaryKey("PK_cmsContentNu")
.OnTable("cmsContentNu")
.Columns(new[] { "nodeId", "published" })
.Do();
Create.ForeignKey("FK_cmsContentNu_umbracoNode_id")
.FromTable("cmsContentNu")
.ForeignColumn("nodeId")
.ToTable("umbracoNode")
.PrimaryColumn("id")
.OnDelete(Rule.Cascade)
.OnUpdate(Rule.None)
.Do();
Create.Table<ContentNuDto>(true).Do();
}
}
}
@@ -1,24 +0,0 @@
using System.Linq;
namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0
{
public class AddLockTable : MigrationBase
{
public AddLockTable(IMigrationContext context)
: base(context)
{ }
public override void Migrate()
{
var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToArray();
if (tables.InvariantContains("umbracoLock") == false)
{
Create.Table("umbracoLock")
.WithColumn("id").AsInt32().PrimaryKey("PK_umbracoLock")
.WithColumn("value").AsInt32().NotNullable()
.WithColumn("name").AsString(64).NotNullable()
.Do();
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More