From 813741bc3dcfd62493b5f20332f6abe4baf88f53 Mon Sep 17 00:00:00 2001 From: Anders Bjerner Date: Thu, 16 Feb 2017 18:41:32 +0100 Subject: [PATCH 01/17] Added property for hiding the target option (1/2) --- .../views/common/overlays/linkpicker/linkpicker.controller.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js index 5d638444c7..59e27db163 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.controller.js @@ -22,6 +22,8 @@ angular.module("umbraco").controller("Umbraco.Overlays.LinkPickerController", selectedSearchResults: [] }; + $scope.showTarget = $scope.model.hideTarget !== true; + if (dialogOptions.currentTarget) { $scope.model.target = dialogOptions.currentTarget; From 64f477f90ebac8b12893a861926a139e584f1d10 Mon Sep 17 00:00:00 2001 From: Anders Bjerner Date: Thu, 16 Feb 2017 18:45:01 +0100 Subject: [PATCH 02/17] Added property for hiding the target option (2/2) --- .../src/views/common/overlays/linkpicker/linkpicker.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.html b/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.html index e063b7bab3..b99bc6c023 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/linkpicker/linkpicker.html @@ -17,7 +17,7 @@ ng-model="model.target.name" /> - + From f3ba1fa7ed105eae1964716346564b3b543e3020 Mon Sep 17 00:00:00 2001 From: akierczynska Date: Wed, 15 Nov 2017 18:07:31 +0000 Subject: [PATCH 03/17] Update pl.xml Adding translations and adjusting pl.xml to en.xml format. --- src/Umbraco.Web.UI/umbraco/config/lang/pl.xml | 104 +++++++++++++++--- 1 file changed, 90 insertions(+), 14 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml b/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml index f291aab7ea..49160fc662 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml @@ -12,9 +12,11 @@ Kopiuj Utwórz Stwórz zbiór + Stwórz grupę Usuń Deaktywuj Opróżnij kosz + Aktywuj Eksportuj typ dokumentu Importuj typ dokumentu Importuj zbiór @@ -27,16 +29,49 @@ Cofnij publikację Odśwież węzeł Opublikuj ponownie całą stronę + Zmień nazwę Przywróć Ustaw uprawnienia dla strony %0% + Wybierz dokąd przenieść + W strukturze drzewa poniżej Uprawnienia Cofnij Wyślij do publikacji Wyślij do tłumaczenia + Ustaw grupę Sortuj Przetłumacz Aktualizuj + Ustaw uprawnienia + Odblokuj + Stwórz Szablon Zawartości + + Zawartość + Administracja + Struktura + Inne + + + Zezwól na dostęp do przydzielenia języka i hostów + Zezwól na dostęp do wglądu w historię logów węzła + Zezwól na dostęp do widoku węzła + Zezwól na dostęp do zmiany typu dokumentu dla węzła + Zezwól na dostęp do skopiowania węzła + Zezwól na dostęp do stworzenia węzłów + Zezwól na dostęp do usunięcia węzłóws + Zezwól na dostęp do przeniesienia węzła + Zezwól na dostęp do ustawienia i zmiany publicznego dostępu węzła + Zezwól na dostęp do publikacji węzła + Zezwól na dostęp do zmiany uprawnień węzła + Zezwól na dostęp do cofnięcia węzła do poprzedniego stanu + Zezwól na dostęp do wysłania węzła do akceptacji przed publikacją + Zezwól na dostęp do wysłania węzła do tłumaczenia + Zezwól na dostęp do zmiany kolejności sortowania węzłów + Zezwól na dostęp do tłumaczenia węzła + Zezwól na dostęp do zapisania węzła + Zezwól na dostęp do utworzenia Szablonu Zawartości + Brak odpowiednich uprawnień Dodaj nową domenę @@ -50,14 +85,18 @@ Domena '%0%' została skasowana Domena '%0%' jest aktualnie przypisana Domena '%0%' została zaktualizowana - - Edycja aktualnych domen + Edytuj Aktualne Domeny + + + Odziedziczona Język - lub wybierz dziedziczenie języka z węzła rodzica. Zostanie to zastosowane
-także do obecnego węzła, o ile poniższa domena również do niego należy.]]>
+ + lub wybierz dziedziczenie języka z węzła rodzica. Zostanie to zastosowane
+ także do obecnego węzła, o ile poniższa domena również do niego należy.]]> +
Domeny @@ -96,6 +135,7 @@ także do obecnego węzła, o ile poniższa domena również do niego należy.]] Pokaż style Wstaw tabelę Wygeneruj modele + Zapisz i wygeneruj modele Cofnij Powtórz @@ -139,6 +179,8 @@ także do obecnego węzła, o ile poniższa domena również do niego należy.]] Opublikowane Nie ma żadnych elementów do wyświetlenia Nie ma żadnych elementów do wyświetlenia w liście. + Nie dodano żadnej zawartości + Nie dodano żadnych członków Typ mediów Link do elementu(ów) mediów Członek grupy @@ -173,16 +215,30 @@ także do obecnego węzła, o ile poniższa domena również do niego należy.]] Cel Oznacza to następującą godzinę na serwerze: Co to oznacza?]]> + Czy na pewno chcesz usunąć ten element? + Właściwość %0% używa edytora %1%, który nie jest wspierany przez Nested Content. Dodaj kolejne pole tekstowe Usuń te pole tekstowe + Korzeń zawartości + + Stwórz nowy Szablon Zawartości z '%0%' + Pusty + Wybierz Szablon Zawartości + Szablon Zawartości został stworzony + Szablon Zawartości został stworzony z '%0%' + Szablon Zawartości o tej samej nazwie już istnieje + Szablon Zawartości to predefiniowana zawartość, którą edytor może wybrać, aby użyć jej jako podstawę do stworzenia nowej zawartości + Kliknij, aby załadować plik Przerzuć swoje pliki tutaj... - Link do mediów + Link do mediów lub kliknij tutaj, aby wybrać pliki Jedyne dozwolone typy plików to + Nie można załadować pliku, typ pliku nie jest akceptowany Maksymalny rozmiar pliku to + Korzeń mediów Stwórz nowego członka @@ -191,6 +247,7 @@ także do obecnego węzła, o ile poniższa domena również do niego należy.]] Gdzie chcesz stworzyć nowy %0%? Utwórz w + Wybierz typ dokumentu, dla którego chcesz stworzyć szablon zawartości Wybierz rodzaj oraz tytuł "typy dokumentów".]]> "typy mediów".]]> @@ -249,6 +306,8 @@ także do obecnego węzła, o ile poniższa domena również do niego należy.]] Skopiowano %0% z %1% elementów + Tytuł linku + Link Nazwa Zarządzaj nazwami hostów Zamknij to okno @@ -276,6 +335,9 @@ także do obecnego węzła, o ile poniższa domena również do niego należy.]] To makro nie posiada żadnych właściwości, które można edytować Wklej Edytuj Uprawnienia dla + Ustaw uprawnienia dla + Ustaw uprawnienia dla %0% dla grupy użytkownika %1% + Wybierz grupy użytkowników, dla których chcesz ustawić uprawnienia Zawartość kosza jest teraz usuwana. Proszę nie zamykać tego okna do momentu zakończenia procesu. Zawartość kosza została usunięta Usunięcie elementów z kosza powoduje ich trwałe i nieodwracalne skasowanie @@ -288,10 +350,14 @@ także do obecnego węzła, o ile poniższa domena również do niego należy.]] Cache strony zostanie odświeżone. Cała zawartość opublikowana będzie aktualna, lecz nieopublikowana zawartość pozostanie niewidoczna Liczba kolumn Liczba wierszy - Ustaw zastępczy ID Ustawiając ID na tym elemencie możesz później łączyć treść z podrzędnych szablonów, - ustawiając dowiązanie do tego ID na elemencie <asp:treści />]]> - Wybierz zastępczy ID z poniższej listy. Możesz wybierać tylko - spośród ID na szablonie nadrzędnym tego formularza.]]> + + Ustaw zastępczy ID Ustawiając ID na tym elemencie możesz później łączyć treść z podrzędnych szablonów, + ustawiając dowiązanie do tego ID na elemencie <asp:treści />]]> + + + Wybierz zastępczy ID z poniższej listy. Możesz wybierać tylko + spośród ID na szablonie nadrzędnym tego formularza.]]> + Kliknij na obrazie, aby zobaczyć go w pełnym rozmiarze Wybierz element Podgląd elementów Cache @@ -303,14 +369,19 @@ także do obecnego węzła, o ile poniższa domena również do niego należy.]] Otwórz zlinkowany dokument w nowym oknie lub zakładce Link do mediów Link do plików + Wybierz węzeł początkowy zawartości Wybierz media Wybierz ikonę Wybierz element Wybierz link Wybierz makro Wybierz zawartość + Wybierz węzeł początkowy mediów Wybierz członka Wybierz członka grupy + Wybierz węzeł + Wybierz sekcje + Wybierz użytkowników Nie znaleziono ikon Te makro nie ma żadnych właściwości Brak dostępnych makro do wstawienia @@ -325,9 +396,11 @@ także do obecnego węzła, o ile poniższa domena również do niego należy.]] Wybierz snippet - %0%' poniżej.
-Możesz dodać dodatkowe języki w menu "Języki" po lewej stronie.]]>
+ + %0%' poniżej.
+ Możesz dodać dodatkowe języki w menu "Języki" po lewej stronie.]]> +
Nazwa języka Edytuj klucz elementu słownika. @@ -342,12 +415,15 @@ Możesz dodać dodatkowe języki w menu "Języki" po lewej stronie.]]> Potwierdź hasło Nazwij %0%... Wpisz nazwę... + Wpisz adres e-mail... + Wpisz nazwę użytkownika... Etykieta... Wpisz opis... Wpisz, aby wyszukać... Wpisz, aby filtrować... Wpisz, aby dodać tagi (naciśnij enter po każdym tagu)... Wpisz adres e-mail + Wpisz wiadomość... Twoja nazwa użytkownika to przeważnie Twój adres e-mail From 1c4e1db054b50dbb77af0e927ab600e2556aa8a2 Mon Sep 17 00:00:00 2001 From: Jack Penney Date: Thu, 23 Nov 2017 12:28:17 +0000 Subject: [PATCH 04/17] Removed CMS Import keys from hebrew translation --- src/Umbraco.Web.UI/umbraco/config/lang/he.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/he.xml b/src/Umbraco.Web.UI/umbraco/config/lang/he.xml index a3a562d152..8561b419f0 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/he.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/he.xml @@ -32,11 +32,6 @@ מיין תרגם עדכן - מחק - בצע - תזמן - ייבא נתונים - צור הגדרות ילדים יומן משימות מתוזמנות From fe67a09ccb2276808527be5887c15d28c09f0484 Mon Sep 17 00:00:00 2001 From: Rune Antonsen Date: Thu, 23 Nov 2017 15:12:01 +0100 Subject: [PATCH 05/17] fix: add CultureInfo.InvariantCulture to int.Parse Fix issue where different Culture some times makes int.Parse thrown an `System.FormatException: 'Input string was not in a correct format.' ` Closes: U4-10596 --- .../PublishedCache/XmlPublishedCache/PublishedContentCache.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs index c8ddd77afd..ae612afe09 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs @@ -251,7 +251,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache // move to parent node e = (XmlElement) e.ParentNode; - id = int.Parse(e.GetAttribute("id")); + id = int.Parse(e.GetAttribute("id"), CultureInfo.InvariantCulture); hasDomains = id != -1 && domainHelper.NodeHasDomains(id); } From e39158d5e5da86529063c62e84f5c5c4c33f32e1 Mon Sep 17 00:00:00 2001 From: Dallas Taylor Date: Thu, 14 Dec 2017 22:18:49 -0500 Subject: [PATCH 06/17] Remove Console.Writeline() from IsPublishable(). --- src/Umbraco.Core/Services/ContentService.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Core/Services/ContentService.cs b/src/Umbraco.Core/Services/ContentService.cs index 056a88b10b..5708481cae 100644 --- a/src/Umbraco.Core/Services/ContentService.cs +++ b/src/Umbraco.Core/Services/ContentService.cs @@ -993,8 +993,7 @@ namespace Umbraco.Core.Services FROM umbracoNode JOIN cmsDocument ON umbracoNode.id=cmsDocument.nodeId AND cmsDocument.published=@0 WHERE umbracoNode.trashed=@1 AND umbracoNode.id IN (@2)", - true, false, ids); - Console.WriteLine(sql.SQL); + true, false, ids); var x = uow.Database.Fetch(sql); return ids.Length == x.Count; } @@ -2007,7 +2006,7 @@ namespace Umbraco.Core.Services } return true; - } + } /// /// Sorts a collection of objects by updating the SortOrder according @@ -2029,7 +2028,7 @@ namespace Umbraco.Core.Services using (new WriteLock(Locker)) { var allContent = GetByIds(ids).ToDictionary(x => x.Id, x => x); - var items = ids.Select(x => allContent[x]); + var items = ids.Select(x => allContent[x]); using (var uow = UowProvider.GetUnitOfWork()) { @@ -2839,4 +2838,4 @@ namespace Umbraco.Core.Services #endregion } -} \ No newline at end of file +} From ea6d81f7ac5a4ab4091745d8da8892ff4eb867fc Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 3 Jan 2018 11:47:26 +1100 Subject: [PATCH 07/17] U4-10701 Umbraco.MemberHasAccess generates slow query after upgrading to 7.7.6 --- .../Repositories/MemberGroupRepository.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Core/Persistence/Repositories/MemberGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MemberGroupRepository.cs index a760ebb717..c7e8a5c328 100644 --- a/src/Umbraco.Core/Persistence/Repositories/MemberGroupRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/MemberGroupRepository.cs @@ -183,17 +183,17 @@ namespace Umbraco.Core.Persistence.Repositories } public IEnumerable GetMemberGroupsForMember(string username) - { - var sql = new Sql() + { + var sql = new Sql() .Select("un.*") .From("umbracoNode AS un") .InnerJoin("cmsMember2MemberGroup") - .On("un.id = cmsMember2MemberGroup.MemberGroup") - .LeftJoin("(SELECT umbracoNode.id, cmsMember.LoginName FROM umbracoNode INNER JOIN cmsMember ON umbracoNode.id = cmsMember.nodeId) AS member") - .On("member.id = cmsMember2MemberGroup.Member") - .Where("un.nodeObjectType=@objectType", new {objectType = NodeObjectTypeId }) - .Where("member.LoginName=@loginName", new {loginName = username}); - + .On("cmsMember2MemberGroup.MemberGroup = un.id") + .InnerJoin("cmsMember") + .On("cmsMember.nodeId = cmsMember2MemberGroup.Member") + .Where("un.nodeObjectType=@objectType", new { objectType = NodeObjectTypeId }) + .Where("cmsMember.LoginName=@loginName", new { loginName = username }); + return Database.Fetch(sql) .DistinctBy(dto => dto.NodeId) .Select(x => _modelFactory.BuildEntity(x)); From 27b9385df56f5a4a65e9c0819bb65c11fdc61a54 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 3 Jan 2018 11:08:55 +0000 Subject: [PATCH 08/17] Update client build NPM dependancy for gulp-connect to use 5.0.0 as next/latest version required you to use CoffeeScript to compile their src code to use the module/component --- src/Umbraco.Web.UI.Client/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/package.json b/src/Umbraco.Web.UI.Client/package.json index 0286d5f358..b1ee7be7bf 100644 --- a/src/Umbraco.Web.UI.Client/package.json +++ b/src/Umbraco.Web.UI.Client/package.json @@ -26,7 +26,7 @@ "cssnano": "^3.7.6", "gulp": "^3.9.1", "gulp-concat": "^2.6.0", - "gulp-connect": "^5.0.0", + "gulp-connect": "5.0.0", "gulp-less": "^3.1.0", "gulp-ngdocs": "^0.3.0", "gulp-open": "^2.0.0", From 6d46c2204ddbeb75dd0cb64beaf73261c4d6845b Mon Sep 17 00:00:00 2001 From: Niels Hartvig Date: Wed, 3 Jan 2018 12:54:25 +0100 Subject: [PATCH 09/17] Doesn't fix the issue but improves performance by ~30% --- src/Umbraco.Web/PublishedContentQuery.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/PublishedContentQuery.cs b/src/Umbraco.Web/PublishedContentQuery.cs index f0f2461ad8..bfe8fb5260 100644 --- a/src/Umbraco.Web/PublishedContentQuery.cs +++ b/src/Umbraco.Web/PublishedContentQuery.cs @@ -230,7 +230,7 @@ namespace Umbraco.Web { // todo: in v8, implement in a more efficient way var legacyXml = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema; - var xpath = legacyXml ? "//node [@key=$guid]" : "//* [@isDoc and @key=$guid]"; + var xpath = legacyXml ? "//node [@key=$guid]" : "//* [@key=$guid]"; var doc = cache.GetSingleByXPath(xpath, new XPathVariable("guid", id.ToString())); return doc; } From e5a21625ea6e8d4c70c5a6a0fd8b3ba183144958 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 4 Jan 2018 21:53:55 +1100 Subject: [PATCH 10/17] U4-9268 Hidden preview button reappears after 'save' or 'save and publish'. --- src/Umbraco.Web/Editors/ContentController.cs | 2 ++ src/Umbraco.Web/Editors/MediaController.cs | 1 + src/Umbraco.Web/Editors/MemberController.cs | 1 + 3 files changed, 4 insertions(+) diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index 6b3a73f5df..a61ca7e249 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -532,6 +532,7 @@ namespace Umbraco.Web.Editors /// [FileUploadCleanupFilter] [ContentPostValidate] + [OutgoingEditorModelEvent] public ContentItemDisplay PostSave( [ModelBinder(typeof(ContentItemBinder))] ContentItemSave contentItem) @@ -847,6 +848,7 @@ namespace Umbraco.Web.Editors /// /// [EnsureUserPermissionForContent("id", 'U')] + [OutgoingEditorModelEvent] public ContentItemDisplay PostUnPublish(int id) { var foundContent = GetObjectFromRequest(() => Services.ContentService.GetById(id)); diff --git a/src/Umbraco.Web/Editors/MediaController.cs b/src/Umbraco.Web/Editors/MediaController.cs index 1364a8e2af..b3d42bcec8 100644 --- a/src/Umbraco.Web/Editors/MediaController.cs +++ b/src/Umbraco.Web/Editors/MediaController.cs @@ -464,6 +464,7 @@ namespace Umbraco.Web.Editors /// [FileUploadCleanupFilter] [MediaPostValidate] + [OutgoingEditorModelEvent] public MediaItemDisplay PostSave( [ModelBinder(typeof(MediaItemBinder))] MediaItemSave contentItem) diff --git a/src/Umbraco.Web/Editors/MemberController.cs b/src/Umbraco.Web/Editors/MemberController.cs index 5921b9c61c..5aad40aa70 100644 --- a/src/Umbraco.Web/Editors/MemberController.cs +++ b/src/Umbraco.Web/Editors/MemberController.cs @@ -256,6 +256,7 @@ namespace Umbraco.Web.Editors /// /// [FileUploadCleanupFilter] + [OutgoingEditorModelEvent] public MemberDisplay PostSave( [ModelBinder(typeof(MemberBinder))] MemberSave contentItem) From d2f3e162f1ce00218dcce022c7cde43340821e31 Mon Sep 17 00:00:00 2001 From: Sebastiaan Jansssen Date: Thu, 4 Jan 2018 16:45:00 +0100 Subject: [PATCH 11/17] Bump version to 7.7.8 --- src/SolutionInfo.cs | 4 ++-- src/Umbraco.Core/Configuration/UmbracoVersion.cs | 2 +- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs index 7442e4185f..9161ef9fed 100644 --- a/src/SolutionInfo.cs +++ b/src/SolutionInfo.cs @@ -11,5 +11,5 @@ using System.Resources; [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyFileVersion("7.7.7")] -[assembly: AssemblyInformationalVersion("7.7.7")] \ No newline at end of file +[assembly: AssemblyFileVersion("7.7.8")] +[assembly: AssemblyInformationalVersion("7.7.8")] \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs index 8c69e250c0..d5bc1675cb 100644 --- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs +++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs @@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration { public class UmbracoVersion { - private static readonly Version Version = new Version("7.7.7"); + private static readonly Version Version = new Version("7.7.8"); /// /// Gets the current version of Umbraco. diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index f2cf63a22a..5dd76eb4e9 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -1024,9 +1024,9 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\" True True - 7770 + 7780 / - http://localhost:7770 + http://localhost:7780 False False From 55e97dad74641b5ea9a1c05d92ec617e36f0243e Mon Sep 17 00:00:00 2001 From: Anders Bjerner Date: Sat, 6 Jan 2018 20:24:02 +0100 Subject: [PATCH 12/17] Fixed the xmldoc for UserService.Delete --- src/Umbraco.Core/Services/UserService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/Services/UserService.cs b/src/Umbraco.Core/Services/UserService.cs index 89232f815e..a646b2d52a 100644 --- a/src/Umbraco.Core/Services/UserService.cs +++ b/src/Umbraco.Core/Services/UserService.cs @@ -228,9 +228,9 @@ namespace Umbraco.Core.Services } /// - /// Deletes an + /// Disables an /// - /// to Delete + /// to disable public void Delete(IUser membershipUser) { //disable @@ -712,7 +712,7 @@ namespace Umbraco.Core.Services /// Id of the User to retrieve /// public IProfile GetProfileById(int id) - { + { //This is called a TON. Go get the full user from cache which should already be IProfile var fullUser = GetUserById(id); var asProfile = fullUser as IProfile; From 5169310258b3051ea829419944d0ecf2455d87ee Mon Sep 17 00:00:00 2001 From: Shannon Date: Mon, 8 Jan 2018 17:57:15 +1100 Subject: [PATCH 13/17] Makes sure we check for index locking on both a normal boot with empty indexes and a cold boot when that is being forced --- src/Umbraco.Web/ExamineStartup.cs | 54 ++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/src/Umbraco.Web/ExamineStartup.cs b/src/Umbraco.Web/ExamineStartup.cs index 0a7cab9522..3932c63b59 100644 --- a/src/Umbraco.Web/ExamineStartup.cs +++ b/src/Umbraco.Web/ExamineStartup.cs @@ -22,6 +22,7 @@ namespace Umbraco.Web private readonly List _indexesToRebuild = new List(); private readonly ApplicationContext _appCtx; private readonly ProfilingLogger _profilingLogger; + private static bool _isConfigured = false; //this is used if we are not the MainDom, in which case we need to ensure that if indexes need rebuilding that this //doesn't occur since that should only occur when we are MainDom @@ -89,24 +90,7 @@ namespace Umbraco.Web /// public void Complete() { - //We now need to disable waiting for indexing for Examine so that the appdomain is shutdown immediately and doesn't wait for pending - //indexing operations. We used to wait for indexing operations to complete but this can cause more problems than that is worth because - //that could end up halting shutdown for a very long time causing overlapping appdomains and many other problems. - foreach (var luceneIndexer in ExamineManager.Instance.IndexProviderCollection.OfType()) - { - luceneIndexer.WaitForIndexQueueOnShutdown = false; - - //we should check if the index is locked ... it shouldn't be! We are using simple fs lock now and we are also ensuring that - //the indexes are not operational unless MainDom is true so if _disableExamineIndexing is false then we should be in charge - if (_disableExamineIndexing == false) - { - var dir = luceneIndexer.GetLuceneDirectory(); - if (IndexWriter.IsLocked(dir)) - { - IndexWriter.Unlock(dir); - } - } - } + EnsureUnlockedAndConfigured(); //Ok, now that everything is complete we'll check if we've stored any references to index that need rebuilding and run them // (see the initialize method for notes) - we'll ensure we remove the event handler too in case examine manager doesn't actually @@ -131,6 +115,8 @@ namespace Umbraco.Web //don't do anything if we have disabled this if (_disableExamineIndexing) return; + EnsureUnlockedAndConfigured(); + //If the developer has explicitly opted out of rebuilding indexes on startup then we // should adhere to that and not do it, this means that if they are load balancing things will be // out of sync if they are auto-scaling but there's not much we can do about that. @@ -168,6 +154,38 @@ namespace Umbraco.Web yield return index; } + /// + /// Must be called to configure each index and ensure it's unlocked before any indexing occurs + /// + /// + /// Indexing rebuilding can occur on a normal boot if the indexes are empty or on a cold boot by the database server messenger. Before + /// either of these happens, we need to configure the indexes. + /// + private void EnsureUnlockedAndConfigured() + { + if (_isConfigured) return; + + foreach (var luceneIndexer in ExamineManager.Instance.IndexProviderCollection.OfType()) + { + //We now need to disable waiting for indexing for Examine so that the appdomain is shutdown immediately and doesn't wait for pending + //indexing operations. We used to wait for indexing operations to complete but this can cause more problems than that is worth because + //that could end up halting shutdown for a very long time causing overlapping appdomains and many other problems. + luceneIndexer.WaitForIndexQueueOnShutdown = false; + + //we should check if the index is locked ... it shouldn't be! We are using simple fs lock now and we are also ensuring that + //the indexes are not operational unless MainDom is true so if _disableExamineIndexing is false then we should be in charge + if (_disableExamineIndexing == false) + { + var dir = luceneIndexer.GetLuceneDirectory(); + if (IndexWriter.IsLocked(dir)) + { + _profilingLogger.Logger.Info("Forcing index " + luceneIndexer.IndexSetName + " to be unlocked since it was left in a locked state"); + IndexWriter.Unlock(dir); + } + } + } + } + private void OnInstanceOnBuildingEmptyIndexOnStartup(object sender, BuildingEmptyIndexOnStartupEventArgs args) { //store the indexer that needs rebuilding because it's empty for when the boot process From 5181988a41283a14880b01bfc17bd330df1eb321 Mon Sep 17 00:00:00 2001 From: Shannon Date: Mon, 8 Jan 2018 18:10:27 +1100 Subject: [PATCH 14/17] forgot to set the flag --- src/Umbraco.Web/ExamineStartup.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Umbraco.Web/ExamineStartup.cs b/src/Umbraco.Web/ExamineStartup.cs index 3932c63b59..eac3e20d87 100644 --- a/src/Umbraco.Web/ExamineStartup.cs +++ b/src/Umbraco.Web/ExamineStartup.cs @@ -165,6 +165,8 @@ namespace Umbraco.Web { if (_isConfigured) return; + _isConfigured = true; + foreach (var luceneIndexer in ExamineManager.Instance.IndexProviderCollection.OfType()) { //We now need to disable waiting for indexing for Examine so that the appdomain is shutdown immediately and doesn't wait for pending From 3e8fb11abd5548c5649b29c68f19f8b78abcb46d Mon Sep 17 00:00:00 2001 From: Sebastiaan Jansssen Date: Mon, 8 Jan 2018 08:39:01 +0100 Subject: [PATCH 15/17] Update to latest modelsbuilder --- build/NuSpecs/UmbracoCms.nuspec | 2 +- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 4 ++-- src/Umbraco.Web.UI/packages.config | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec index bef9b44964..45009f5f79 100644 --- a/build/NuSpecs/UmbracoCms.nuspec +++ b/build/NuSpecs/UmbracoCms.nuspec @@ -17,7 +17,7 @@ - + diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 5dd76eb4e9..7930fd6b50 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -333,8 +333,8 @@ umbraco.providers - - ..\packages\Umbraco.ModelsBuilder.3.0.7\lib\Umbraco.ModelsBuilder.dll + + ..\packages\Umbraco.ModelsBuilder.3.0.8\lib\Umbraco.ModelsBuilder.dll diff --git a/src/Umbraco.Web.UI/packages.config b/src/Umbraco.Web.UI/packages.config index 729f7f9622..3cbdc716cd 100644 --- a/src/Umbraco.Web.UI/packages.config +++ b/src/Umbraco.Web.UI/packages.config @@ -37,5 +37,5 @@ - + \ No newline at end of file From 1aad4e50d5a8a17b9027369a6411e7bcb494073e Mon Sep 17 00:00:00 2001 From: Anders Bjerner Date: Tue, 9 Jan 2018 21:25:36 +0100 Subject: [PATCH 16/17] Start node -> Startnode --- src/Umbraco.Web.UI/umbraco/config/lang/da.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml index e3831627f4..206108d1fa 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml @@ -1481,7 +1481,7 @@ Mange hilsner fra Umbraco robotten Sæt rettigheder for specifikke noder Profil Søg alle 'børn' - Start node + Startnode Aktiv Alle Deaktiveret From c3be9004f6086e7f10e346630e3d544be166774e Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 10 Jan 2018 16:01:46 +1100 Subject: [PATCH 17/17] U4-10811 Store custom tours as json and load from App_Plugins/{MyPlugin}/backoffice/tours --- .../src/common/services/tour.service.js | 2 +- src/Umbraco.Web/Editors/TourController.cs | 53 ++++++++++++++----- src/Umbraco.Web/Models/BackOfficeTour.cs | 23 ++++++++ src/Umbraco.Web/Models/BackOfficeTourFile.cs | 27 ++++++++++ src/Umbraco.Web/Models/BackOfficeTourStep.cs | 23 ++++++++ src/Umbraco.Web/Umbraco.Web.csproj | 3 ++ 6 files changed, 118 insertions(+), 13 deletions(-) create mode 100644 src/Umbraco.Web/Models/BackOfficeTour.cs create mode 100644 src/Umbraco.Web/Models/BackOfficeTourFile.cs create mode 100644 src/Umbraco.Web/Models/BackOfficeTourStep.cs diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js index 1955cf7219..5d05623b0b 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js @@ -19,7 +19,7 @@ function registerAllTours() { return tourResource.getTours().then(function(tourFiles) { angular.forEach(tourFiles, function (tourFile) { - angular.forEach(tourFile, function(newTour) { + angular.forEach(tourFile.tours, function(newTour) { validateTour(newTour); validateTourRegistration(newTour); tours.push(newTour); diff --git a/src/Umbraco.Web/Editors/TourController.cs b/src/Umbraco.Web/Editors/TourController.cs index ad9b6b3430..61acf7dfed 100644 --- a/src/Umbraco.Web/Editors/TourController.cs +++ b/src/Umbraco.Web/Editors/TourController.cs @@ -1,9 +1,13 @@ using System; +using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text.RegularExpressions; +using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Umbraco.Core.Configuration; using Umbraco.Core.IO; +using Umbraco.Web.Models; using Umbraco.Web.Mvc; using Umbraco.Web.WebApi.Filters; using Constants = Umbraco.Core.Constants; @@ -11,29 +15,54 @@ using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Editors { [PluginController("UmbracoApi")] - [UmbracoApplicationAuthorize(Constants.Applications.Content)] + [UmbracoApplicationAuthorize(Constants.Applications.Content)] public class TourController : UmbracoAuthorizedJsonController { - //TODO: Strongly type this for final release! - public JArray GetTours() + public IEnumerable GetTours() { - //TODO: Add error checking to this for final release! - - var result = new JArray(); + var result = new List(); if (UmbracoConfig.For.UmbracoSettings().BackOffice.Tours.EnableTours == false) return result; - var tourFiles = Directory.GetFiles( - Path.Combine(IOHelper.MapPath(SystemDirectories.Config), "BackOfficeTours"), "*.json") - .OrderBy(x => x, StringComparer.InvariantCultureIgnoreCase); - foreach (var tourFile in tourFiles) + var coreTourFiles = Directory.GetFiles( + Path.Combine(IOHelper.MapPath(SystemDirectories.Config), "BackOfficeTours"), "*.json"); + + foreach (var tourFile in coreTourFiles) { var contents = File.ReadAllText(tourFile); - result.Add(JArray.Parse(contents)); + + result.Add(new BackOfficeTourFile + { + FileName = Path.GetFileNameWithoutExtension(tourFile), + Tours = JsonConvert.DeserializeObject(contents) + }); } - return result; + //collect all tour files in packges + foreach (var plugin in Directory.EnumerateDirectories(IOHelper.MapPath(SystemDirectories.AppPlugins))) + { + var pluginName = Path.GetFileName(plugin.TrimEnd('\\')); + + foreach (var backofficeDir in Directory.EnumerateDirectories(plugin, "backoffice")) + { + foreach (var tourDir in Directory.EnumerateDirectories(backofficeDir, "tours")) + { + foreach (var tourFile in Directory.EnumerateFiles(tourDir, "*.json")) + { + var contents = File.ReadAllText(tourFile); + result.Add(new BackOfficeTourFile + { + FileName = Path.GetFileNameWithoutExtension(tourFile), + PluginName = pluginName, + Tours = JsonConvert.DeserializeObject(contents) + }); + } + } + } + } + + return result.OrderBy(x => x.FileName, StringComparer.InvariantCultureIgnoreCase); } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Models/BackOfficeTour.cs b/src/Umbraco.Web/Models/BackOfficeTour.cs new file mode 100644 index 0000000000..1e0f345b52 --- /dev/null +++ b/src/Umbraco.Web/Models/BackOfficeTour.cs @@ -0,0 +1,23 @@ +using System; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace Umbraco.Web.Models +{ + [DataContract(Name = "tour", Namespace = "")] + public class BackOfficeTour + { + [DataMember(Name = "name")] + public string Name { get; set; } + [DataMember(Name = "alias")] + public string Alias { get; set; } + [DataMember(Name = "group")] + public string Group { get; set; } + [DataMember(Name = "allowDisable")] + public bool AllowDisable { get; set; } + [DataMember(Name = "steps")] + public BackOfficeTourStep[] Steps { get; set; } + } +} diff --git a/src/Umbraco.Web/Models/BackOfficeTourFile.cs b/src/Umbraco.Web/Models/BackOfficeTourFile.cs new file mode 100644 index 0000000000..69b35c8088 --- /dev/null +++ b/src/Umbraco.Web/Models/BackOfficeTourFile.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models +{ + [DataContract(Name = "tourFile", Namespace = "")] + public class BackOfficeTourFile + { + /// + /// The file name for the tour + /// + [DataMember(Name = "fileName")] + public string FileName { get; set; } + + /// + /// The plugin folder that the tour comes from + /// + /// + /// If this is null it means it's a Core tour + /// + [DataMember(Name = "pluginName")] + public string PluginName { get; set; } + + [DataMember(Name = "tours")] + public IEnumerable Tours { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/BackOfficeTourStep.cs b/src/Umbraco.Web/Models/BackOfficeTourStep.cs new file mode 100644 index 0000000000..e0371bf4b5 --- /dev/null +++ b/src/Umbraco.Web/Models/BackOfficeTourStep.cs @@ -0,0 +1,23 @@ +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models +{ + [DataContract(Name = "step", Namespace = "")] + public class BackOfficeTourStep + { + [DataMember(Name = "title")] + public string Title { get; set; } + [DataMember(Name = "content")] + public string Content { get; set; } + [DataMember(Name = "type")] + public string Type { get; set; } + [DataMember(Name = "element")] + public string Element { get; set; } + [DataMember(Name = "elementPreventClick")] + public bool ElementPreventClick { get; set; } + [DataMember(Name = "backdropOpacity")] + public float BackdropOpacity { get; set; } + [DataMember(Name = "event")] + public string Event { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 326ed3baa9..83ed982639 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -371,6 +371,8 @@ + + @@ -428,6 +430,7 @@ +