From ca72fb01ec781de44c416726364f2efc604562e8 Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Thu, 17 Jun 2021 16:15:38 +1000 Subject: [PATCH] Fixes packager to ensure the GUIDs are used for all entities where possible (#10477) * Clean up and changes to backoffice for the nuget only packages * temp commit of package logic removal * Lots of package code cleanup and removal * Removes old package data from the test package xml * Updates packaging code to take in XDocument instead of a file since we'll not be dealing with files, starts creating expressions for the package migrations scripting. * fixing tests * Fixes runtime state and boot failed middleware so that it actually runs. Separates out unattended install/upgrade into notification handlers. * Gets unattended package migrations working and running * Gets embedded package.xml resources able to install from package migration. * Implements automatic package migrations for package that just declare an xml data manifest. * fix build * small cleanups * fix build * adds some tests * Fix export test * Fix newlines in test for linux * Typo * removes old todos and updates AutomaticPackgeMigrationPlan to use getter with backing field. * Update dictionary package data to use GUID * Ensures macros are packaged and used with their GUID * Ensures the GUID for doc types and media types remains consistent for package installation based on what is in the xml. * fix automatic migrations to not validate initial state, fixes packaging GUIDs for multiple entities. * Added guids to embedded test packages (Some tests are still failing) * Fix one more test * Fixes up Key vs Id, moves tests to correct namespace, fix tests * Fixes Dictionary packaging to ensure an xml hierarchy * Fixes tests * fixes package xml Co-authored-by: Bjarke Berg --- src/Umbraco.Core/Extensions/XmlExtensions.cs | 30 +- src/Umbraco.Core/Migrations/MigrationPlan.cs | 6 + .../Packaging/InstallationSummary.cs | 4 +- .../Packaging/PackageMigrationPlan.cs | 6 + .../Packaging/PackagesRepository.cs | 139 +++- .../Install/UnattendedUpgrader.cs | 2 - .../Migrations/Upgrade/Upgrader.cs | 8 +- .../Packaging/PackageDataInstallation.cs | 152 +++- .../Persistence/Dtos/DictionaryDto.cs | 1 + .../Persistence/Dtos/LanguageTextDto.cs | 1 + .../Services/Implement/EntityXmlSerializer.cs | 72 +- .../CreatedPackagesRepositoryTests.cs | 71 +- .../Packaging/PackageDataInstallationTests.cs | 30 +- .../Packaging/PackageInstallationTest.cs | 7 +- .../Services/EntityXmlSerializerTests.cs | 5 +- .../CheckboxList-Content-Package.xml | 7 +- .../CompositionsTestPackage-Random.xml | 8 +- .../Importing/CompositionsTestPackage.xml | 31 +- .../Services/Importing/Dictionary-Package.xml | 6 +- .../Services/Importing/Fanoe-Package.xml | 10 +- .../Importing/ImportResources.Designer.cs | 757 ++++++++---------- .../Importing/InheritedDocTypes-Package.xml | 6 +- .../Importing/MediaTypesAndMedia-Package.xml | 6 +- .../Services/Importing/SingleDocType.xml | 3 +- .../Importing/StandardMvc-Package.xml | 64 +- .../Services/Importing/XsltSearch-Package.xml | 66 +- .../Services/Importing/uBlogsy-Package.xml | 157 ++-- .../Controllers/PackageController.cs | 3 - 28 files changed, 955 insertions(+), 703 deletions(-) rename src/Umbraco.Tests.Integration/{Umbraco.Core => Umbraco.Infrastructure}/Packaging/PackageDataInstallationTests.cs (96%) rename src/Umbraco.Tests.Integration/{Umbraco.Core => Umbraco.Infrastructure}/Packaging/PackageInstallationTest.cs (93%) diff --git a/src/Umbraco.Core/Extensions/XmlExtensions.cs b/src/Umbraco.Core/Extensions/XmlExtensions.cs index a5356e07f6..8ad37bd93e 100644 --- a/src/Umbraco.Core/Extensions/XmlExtensions.cs +++ b/src/Umbraco.Core/Extensions/XmlExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Umbraco. +// Copyright (c) Umbraco. // See LICENSE for more details. using System; @@ -234,6 +234,33 @@ namespace Umbraco.Extensions } } + public static T RequiredAttributeValue(this XElement xml, string attributeName) + { + if (xml == null) + { + throw new ArgumentNullException("xml"); + } + + if (xml.HasAttributes == false) + { + throw new InvalidOperationException($"{attributeName} not found in xml"); + } + + if (xml.Attribute(attributeName) == null) + { + throw new InvalidOperationException($"{attributeName} not found in xml"); + } + + var val = xml.Attribute(attributeName).Value; + var result = val.TryConvertTo(); + if (result.Success) + { + return result.Result; + } + + throw new InvalidOperationException($"{val} attribute value cannot be converted to {typeof(T)}"); + } + public static T AttributeValue(this XElement xml, string attributeName) { if (xml == null) throw new ArgumentNullException("xml"); @@ -249,6 +276,7 @@ namespace Umbraco.Extensions return default(T); } + public static T AttributeValue(this XmlNode xml, string attributeName) { if (xml == null) throw new ArgumentNullException("xml"); diff --git a/src/Umbraco.Core/Migrations/MigrationPlan.cs b/src/Umbraco.Core/Migrations/MigrationPlan.cs index 8a35e21c67..c998be2037 100644 --- a/src/Umbraco.Core/Migrations/MigrationPlan.cs +++ b/src/Umbraco.Core/Migrations/MigrationPlan.cs @@ -37,6 +37,12 @@ namespace Umbraco.Cms.Core.Migrations Name = name; } + /// + /// If set to true the plan executor will ignore any current state persisted and + /// run the plan from its initial state to its end state. + /// + public virtual bool IgnoreCurrentState { get; } = false; + /// /// Gets the transitions. /// diff --git a/src/Umbraco.Core/Packaging/InstallationSummary.cs b/src/Umbraco.Core/Packaging/InstallationSummary.cs index fa906ad1cc..3c519a4a4c 100644 --- a/src/Umbraco.Core/Packaging/InstallationSummary.cs +++ b/src/Umbraco.Core/Packaging/InstallationSummary.cs @@ -49,7 +49,7 @@ namespace Umbraco.Cms.Core.Packaging if (templateConflicts.Count > 0) { sb.Append("Conflicting templates found, they will be overwritten:"); - foreach (IMacro m in templateConflicts) + foreach (ITemplate m in templateConflicts) { sb.Append(m.Alias); sb.Append(','); @@ -60,7 +60,7 @@ namespace Umbraco.Cms.Core.Packaging if (stylesheetConflicts.Count > 0) { sb.Append("Conflicting stylesheets found, they will be overwritten:"); - foreach (IMacro m in stylesheetConflicts) + foreach (IFile m in stylesheetConflicts) { sb.Append(m.Alias); sb.Append(','); diff --git a/src/Umbraco.Core/Packaging/PackageMigrationPlan.cs b/src/Umbraco.Core/Packaging/PackageMigrationPlan.cs index 97cdcafba6..71c333d1cf 100644 --- a/src/Umbraco.Core/Packaging/PackageMigrationPlan.cs +++ b/src/Umbraco.Core/Packaging/PackageMigrationPlan.cs @@ -19,6 +19,12 @@ namespace Umbraco.Cms.Core.Packaging DefinePlan(); } + /// + /// Inform the plan executor to ignore all saved package state and + /// run the migration from initial state to it's end state. + /// + public override bool IgnoreCurrentState => true; + protected abstract void DefinePlan(); } diff --git a/src/Umbraco.Core/Packaging/PackagesRepository.cs b/src/Umbraco.Core/Packaging/PackagesRepository.cs index 6fbca7f98b..b86f5d8695 100644 --- a/src/Umbraco.Core/Packaging/PackagesRepository.cs +++ b/src/Umbraco.Core/Packaging/PackagesRepository.cs @@ -71,7 +71,8 @@ namespace Umbraco.Cms.Core.Packaging string packagesFolderPath = null, string mediaFolderPath = null) { - if (string.IsNullOrWhiteSpace(packageRepositoryFileName)) throw new ArgumentException("Value cannot be null or whitespace.", nameof(packageRepositoryFileName)); + if (string.IsNullOrWhiteSpace(packageRepositoryFileName)) + throw new ArgumentException("Value cannot be null or whitespace.", nameof(packageRepositoryFileName)); _contentService = contentService; _contentTypeService = contentTypeService; _dataTypeService = dataTypeService; @@ -114,7 +115,8 @@ namespace Umbraco.Cms.Core.Packaging { var packagesXml = EnsureStorage(out var packagesFile); var packageXml = packagesXml?.Root?.Elements("package").FirstOrDefault(x => x.AttributeValue("id") == id); - if (packageXml == null) return; + if (packageXml == null) + return; packageXml.Remove(); @@ -123,7 +125,8 @@ namespace Umbraco.Cms.Core.Packaging public bool SavePackage(PackageDefinition definition) { - if (definition == null) throw new ArgumentNullException(nameof(definition)); + if (definition == null) + throw new ArgumentNullException(nameof(definition)); var packagesXml = EnsureStorage(out var packagesFile); @@ -162,8 +165,10 @@ namespace Umbraco.Cms.Core.Packaging public string ExportPackage(PackageDefinition definition) { - if (definition.Id == default) throw new ArgumentException("The package definition does not have an ID, it must be saved before being exported"); - if (definition.PackageId == default) throw new ArgumentException("the package definition does not have a GUID, it must be saved before being exported"); + if (definition.Id == default) + throw new ArgumentException("The package definition does not have an ID, it must be saved before being exported"); + if (definition.PackageId == default) + throw new ArgumentException("the package definition does not have a GUID, it must be saved before being exported"); //ensure it's valid ValidatePackage(definition); @@ -248,9 +253,11 @@ namespace Umbraco.Cms.Core.Packaging var dataTypes = new XElement("DataTypes"); foreach (var dtId in definition.DataTypes) { - if (!int.TryParse(dtId, out var outInt)) continue; + if (!int.TryParse(dtId, out var outInt)) + continue; var dataType = _dataTypeService.GetDataType(outInt); - if (dataType == null) continue; + if (dataType == null) + continue; dataTypes.Add(_serializer.Serialize(dataType)); } root.Add(dataTypes); @@ -261,9 +268,11 @@ namespace Umbraco.Cms.Core.Packaging var languages = new XElement("Languages"); foreach (var langId in definition.Languages) { - if (!int.TryParse(langId, out var outInt)) continue; + if (!int.TryParse(langId, out var outInt)) + continue; var lang = _languageService.GetLanguageById(outInt); - if (lang == null) continue; + if (lang == null) + continue; languages.Add(_serializer.Serialize(lang)); } root.Add(languages); @@ -271,15 +280,74 @@ namespace Umbraco.Cms.Core.Packaging private void PackageDictionaryItems(PackageDefinition definition, XContainer root) { - var dictionaryItems = new XElement("DictionaryItems"); + var rootDictionaryItems = new XElement("DictionaryItems"); + var items = new Dictionary(); + foreach (var dictionaryId in definition.DictionaryItems) { - if (!int.TryParse(dictionaryId, out var outInt)) continue; - var di = _languageService.GetDictionaryItemById(outInt); - if (di == null) continue; - dictionaryItems.Add(_serializer.Serialize(di, false)); + if (!int.TryParse(dictionaryId, out var outInt)) + { + continue; + } + + IDictionaryItem di = _languageService.GetDictionaryItemById(outInt); + + if (di == null) + { + continue; + } + + items[di.Key] = (di, _serializer.Serialize(di, false)); + } + + // organize them in hierarchy ... + var itemCount = items.Count; + var processed = new Dictionary(); + while (processed.Count < itemCount) + { + foreach(Guid key in items.Keys.ToList()) + { + (IDictionaryItem dictionaryItem, XElement serializedDictionaryValue) = items[key]; + + if (!dictionaryItem.ParentId.HasValue) + { + // if it has no parent, its definitely just at the root + AppendDictionaryElement(rootDictionaryItems, items, processed, key, serializedDictionaryValue); + } + else + { + if (processed.ContainsKey(dictionaryItem.ParentId.Value)) + { + // we've processed this parent element already so we can just append this xml child to it + AppendDictionaryElement(processed[dictionaryItem.ParentId.Value], items, processed, key, serializedDictionaryValue); + } + else if (items.ContainsKey(dictionaryItem.ParentId.Value)) + { + // we know the parent exists in the dictionary but + // we haven't processed it yet so we'll leave it for the next loop + continue; + } + else + { + // in this case, the parent of this item doesn't exist in our collection, we have no + // choice but to add it to the root. + AppendDictionaryElement(rootDictionaryItems, items, processed, key, serializedDictionaryValue); + } + } + } + } + + root.Add(rootDictionaryItems); + + static void AppendDictionaryElement(XElement rootDictionaryItems, Dictionary items, Dictionary processed, Guid key, XElement serializedDictionaryValue) + { + // track it + processed.Add(key, serializedDictionaryValue); + // append it + rootDictionaryItems.Add(serializedDictionaryValue); + // remove it so its not re-processed + items.Remove(key); } - root.Add(dictionaryItems); } private void PackageMacros(PackageDefinition definition, XContainer root) @@ -287,11 +355,13 @@ namespace Umbraco.Cms.Core.Packaging var macros = new XElement("Macros"); foreach (var macroId in definition.Macros) { - if (!int.TryParse(macroId, out var outInt)) continue; + if (!int.TryParse(macroId, out var outInt)) + continue; var macroXml = GetMacroXml(outInt, out var macro); - if (macroXml == null) continue; - macros.Add(macroXml); + if (macroXml == null) + continue; + macros.Add(macroXml); } root.Add(macros); } @@ -301,7 +371,8 @@ namespace Umbraco.Cms.Core.Packaging var stylesheetsXml = new XElement("Stylesheets"); foreach (var stylesheetName in definition.Stylesheets) { - if (stylesheetName.IsNullOrWhiteSpace()) continue; + if (stylesheetName.IsNullOrWhiteSpace()) + continue; var xml = GetStylesheetXml(stylesheetName, true); if (xml != null) stylesheetsXml.Add(xml); @@ -314,9 +385,11 @@ namespace Umbraco.Cms.Core.Packaging var templatesXml = new XElement("Templates"); foreach (var templateId in definition.Templates) { - if (!int.TryParse(templateId, out var outInt)) continue; + if (!int.TryParse(templateId, out var outInt)) + continue; var template = _fileService.GetTemplate(outInt); - if (template == null) continue; + if (template == null) + continue; templatesXml.Add(_serializer.Serialize(template)); } root.Add(templatesXml); @@ -328,9 +401,11 @@ namespace Umbraco.Cms.Core.Packaging var docTypesXml = new XElement("DocumentTypes"); foreach (var dtId in definition.DocumentTypes) { - if (!int.TryParse(dtId, out var outInt)) continue; + if (!int.TryParse(dtId, out var outInt)) + continue; var contentType = _contentTypeService.Get(outInt); - if (contentType == null) continue; + if (contentType == null) + continue; AddDocumentType(contentType, contentTypes); } foreach (var contentType in contentTypes) @@ -345,9 +420,11 @@ namespace Umbraco.Cms.Core.Packaging var mediaTypesXml = new XElement("MediaTypes"); foreach (var mediaTypeId in definition.MediaTypes) { - if (!int.TryParse(mediaTypeId, out var outInt)) continue; + if (!int.TryParse(mediaTypeId, out var outInt)) + continue; var mediaType = _mediaTypeService.Get(outInt); - if (mediaType == null) continue; + if (mediaType == null) + continue; AddMediaType(mediaType, mediaTypes); } foreach (var mediaType in mediaTypes) @@ -456,7 +533,8 @@ namespace Umbraco.Cms.Core.Packaging private XElement GetMacroXml(int macroId, out IMacro macro) { macro = _macroService.GetById(macroId); - if (macro == null) return null; + if (macro == null) + return null; var xml = _serializer.Serialize(macro); return xml; } @@ -469,15 +547,18 @@ namespace Umbraco.Cms.Core.Packaging /// private XElement GetStylesheetXml(string name, bool includeProperties) { - if (string.IsNullOrWhiteSpace(name)) throw new ArgumentException("Value cannot be null or whitespace.", nameof(name)); + if (string.IsNullOrWhiteSpace(name)) + throw new ArgumentException("Value cannot be null or whitespace.", nameof(name)); var sts = _fileService.GetStylesheetByName(name); - if (sts == null) return null; + if (sts == null) + return null; var stylesheetXml = new XElement("Stylesheet"); stylesheetXml.Add(new XElement("Name", sts.Alias)); stylesheetXml.Add(new XElement("FileName", sts.Name)); stylesheetXml.Add(new XElement("Content", new XCData(sts.Content))); - if (!includeProperties) return stylesheetXml; + if (!includeProperties) + return stylesheetXml; var properties = new XElement("Properties"); foreach (var ssP in sts.Properties) diff --git a/src/Umbraco.Infrastructure/Install/UnattendedUpgrader.cs b/src/Umbraco.Infrastructure/Install/UnattendedUpgrader.cs index eeae566cc9..24cbce273f 100644 --- a/src/Umbraco.Infrastructure/Install/UnattendedUpgrader.cs +++ b/src/Umbraco.Infrastructure/Install/UnattendedUpgrader.cs @@ -55,8 +55,6 @@ namespace Umbraco.Cms.Infrastructure.Install { if (_runtimeState.RunUnattendedBootLogic()) { - // TODO: Here is also where we would run package migrations! - switch (_runtimeState.Reason) { case RuntimeLevelReason.UpgradeMigrations: diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/Upgrader.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/Upgrader.cs index 27ff665e11..fc0e01c3d9 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/Upgrader.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/Upgrader.cs @@ -41,22 +41,20 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade if (scopeProvider == null) throw new ArgumentNullException(nameof(scopeProvider)); if (keyValueService == null) throw new ArgumentNullException(nameof(keyValueService)); - var plan = Plan; - using (var scope = scopeProvider.CreateScope()) { // read current state var currentState = keyValueService.GetValue(StateValueKey); var forceState = false; - if (currentState == null) + if (currentState == null || Plan.IgnoreCurrentState) { - currentState = plan.InitialState; + currentState = Plan.InitialState; forceState = true; } // execute plan - var state = migrationPlanExecutor.Execute(plan, currentState); + var state = migrationPlanExecutor.Execute(Plan, currentState); if (string.IsNullOrWhiteSpace(state)) { throw new Exception("Plan execution returned an invalid null or empty state."); diff --git a/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs b/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs index 6b13358fe9..e680471486 100644 --- a/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs +++ b/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs @@ -272,12 +272,12 @@ namespace Umbraco.Cms.Infrastructure.Packaging where T : class, IContentBase where S : IContentTypeComposition { - var key = Guid.Empty; - if (element.Attribute("key") != null && Guid.TryParse(element.Attribute("key").Value, out key)) + Guid key = element.RequiredAttributeValue("key"); + + // we need to check if the content already exists and if so we ignore the installation for this item + if (service.GetById(key) != null) { - //if a Key is supplied, then we need to check if the content already exists and if so we ignore the installation for this item - if (service.GetById(key) != null) - return null; + return null; } var id = element.Attribute("id").Value; @@ -477,17 +477,19 @@ namespace Umbraco.Cms.Infrastructure.Packaging } //Sorting the Document Types based on dependencies - if its not a single doc type import ref. #U4-5921 - var documentTypes = isSingleDocTypeImport + List documentTypes = isSingleDocTypeImport ? unsortedDocumentTypes.ToList() : graph.GetSortedItems().Select(x => x.Item).ToList(); //Iterate the sorted document types and create them as IContentType objects - foreach (var documentType in documentTypes) + foreach (XElement documentType in documentTypes) { - var alias = documentType.Element("Info").Element("Alias").Value; + var alias = documentType.Element("Info").Element("Alias").Value; + if (importedContentTypes.ContainsKey(alias) == false) { - var contentType = service.Get(alias); + T contentType = service.Get(alias); + importedContentTypes.Add(alias, contentType == null ? CreateContentTypeFromXml(documentType, importedContentTypes, service) : UpdateContentTypeFromXml(documentType, contentType, importedContentTypes, service)); @@ -526,7 +528,9 @@ namespace Umbraco.Cms.Infrastructure.Packaging } //Update ContentTypes with a newly added structure/list of allowed children if (updatedContentTypes.Any()) + { service.Save(updatedContentTypes, userId); + } } return list; @@ -595,13 +599,19 @@ namespace Umbraco.Cms.Infrastructure.Packaging return _contentTypeService.GetContainer(tryCreateFolder.Result.Entity.Id); } - private T CreateContentTypeFromXml(XElement documentType, IReadOnlyDictionary importedContentTypes, IContentTypeBaseService service) - where T : class, IContentTypeComposition + private T CreateContentTypeFromXml( + XElement documentType, + IReadOnlyDictionary importedContentTypes, + IContentTypeBaseService service) + where T : class, IContentTypeComposition { - var infoElement = documentType.Element("Info"); + var key = Guid.Parse(documentType.Element("Info").Element("Key").Value); + + XElement infoElement = documentType.Element("Info"); //Name of the master corresponds to the parent - var masterElement = infoElement.Element("Master"); + XElement masterElement = infoElement.Element("Master"); + T parent = default; if (masterElement != null) { @@ -612,26 +622,35 @@ namespace Umbraco.Cms.Infrastructure.Packaging } var alias = infoElement.Element("Alias").Value; - T contentType = CreateContentType(parent, -1, alias); + T contentType = CreateContentType(key, parent, -1, alias); if (parent != null) + { contentType.AddContentType(parent); + } return UpdateContentTypeFromXml(documentType, contentType, importedContentTypes, service); } - private T CreateContentType(T parent, int parentId, string alias) + private T CreateContentType(Guid key, T parent, int parentId, string alias) where T : class, IContentTypeComposition { if (typeof(T) == typeof(IContentType)) { if (parent is null) { - return new ContentType(_shortStringHelper, parentId) { Alias = alias } as T; + return new ContentType(_shortStringHelper, parentId) + { + Alias = alias, + Key = key + } as T; } else { - return new ContentType(_shortStringHelper, (IContentType)parent, alias) as T; + return new ContentType(_shortStringHelper, (IContentType)parent, alias) + { + Key = key + } as T; } } @@ -640,11 +659,18 @@ namespace Umbraco.Cms.Infrastructure.Packaging { if (parent is null) { - return new MediaType(_shortStringHelper, parentId) { Alias = alias } as T; + return new MediaType(_shortStringHelper, parentId) + { + Alias = alias, + Key = key + } as T; } else { - return new MediaType(_shortStringHelper, (IMediaType)parent, alias) as T; + return new MediaType(_shortStringHelper, (IMediaType)parent, alias) + { + Key = key + } as T; } } @@ -652,12 +678,19 @@ namespace Umbraco.Cms.Infrastructure.Packaging throw new NotSupportedException($"Type {typeof(T)} is not supported"); } - private T UpdateContentTypeFromXml(XElement documentType, T contentType, IReadOnlyDictionary importedContentTypes, IContentTypeBaseService service) - where T : IContentTypeComposition + private T UpdateContentTypeFromXml( + XElement documentType, + T contentType, + IReadOnlyDictionary importedContentTypes, + IContentTypeBaseService service) + where T : IContentTypeComposition { + var key = Guid.Parse(documentType.Element("Info").Element("Key").Value); + var infoElement = documentType.Element("Info"); var defaultTemplateElement = infoElement.Element("DefaultTemplate"); + contentType.Key = key; contentType.Name = infoElement.Element("Name").Value; if (infoElement.Element("Key") != null) contentType.Key = new Guid(infoElement.Element("Key").Value); @@ -771,7 +804,6 @@ namespace Umbraco.Cms.Infrastructure.Packaging var tabs = tabElement.Elements("Tab"); foreach (var tab in tabs) { - var id = tab.Element("Id").Value;//Do we need to use this for tracking? var caption = tab.Element("Caption").Value; if (contentType.PropertyGroups.Contains(caption) == false) @@ -780,8 +812,7 @@ namespace Umbraco.Cms.Infrastructure.Packaging } - int sortOrder; - if (tab.Element("SortOrder") != null && int.TryParse(tab.Element("SortOrder").Value, out sortOrder)) + if (tab.Element("SortOrder") != null && int.TryParse(tab.Element("SortOrder").Value, out int sortOrder)) { // Override the sort order with the imported value contentType.PropertyGroups[caption].SortOrder = sortOrder; @@ -844,7 +875,10 @@ namespace Umbraco.Cms.Infrastructure.Packaging var sortOrder = 0; var sortOrderElement = property.Element("SortOrder"); if (sortOrderElement != null) + { int.TryParse(sortOrderElement.Value, out sortOrder); + } + var propertyType = new PropertyType(_shortStringHelper, dataTypeDefinition, property.Element("Alias").Value) { Name = property.Element("Name").Value, @@ -868,8 +902,11 @@ namespace Umbraco.Cms.Infrastructure.Packaging ? property.Element("LabelOnTop").Value.ToLowerInvariant().Equals("true") : false }; + if (property.Element("Key") != null) + { propertyType.Key = new Guid(property.Element("Key").Value); + } var tab = (string)property.Element("Tab"); if (string.IsNullOrEmpty(tab)) @@ -948,7 +985,7 @@ namespace Umbraco.Cms.Infrastructure.Packaging { var dataTypeDefinitionName = dataTypeElement.AttributeValue("Name"); - var dataTypeDefinitionId = dataTypeElement.AttributeValue("Definition"); + var dataTypeDefinitionId = dataTypeElement.RequiredAttributeValue("Definition"); var databaseTypeAttribute = dataTypeElement.Attribute("DatabaseType"); var parentId = -1; @@ -1076,8 +1113,10 @@ namespace Umbraco.Cms.Infrastructure.Packaging private IReadOnlyList ImportDictionaryItems(IEnumerable dictionaryItemElementList, List languages, Guid? parentId, int userId) { var items = new List(); - foreach (var dictionaryItemElement in dictionaryItemElementList) + foreach (XElement dictionaryItemElement in dictionaryItemElementList) + { items.AddRange(ImportDictionaryItem(dictionaryItemElement, languages, parentId, userId)); + } return items; } @@ -1087,11 +1126,19 @@ namespace Umbraco.Cms.Infrastructure.Packaging var items = new List(); IDictionaryItem dictionaryItem; - var key = dictionaryItemElement.Attribute("Key").Value; - if (_localizationService.DictionaryItemExists(key)) - dictionaryItem = GetAndUpdateDictionaryItem(key, dictionaryItemElement, languages); + var itemName = dictionaryItemElement.Attribute("Name").Value; + Guid key = dictionaryItemElement.RequiredAttributeValue("Key"); + + dictionaryItem = _localizationService.GetDictionaryItemById(key); + if (dictionaryItem != null) + { + dictionaryItem = UpdateDictionaryItem(dictionaryItem, dictionaryItemElement, languages); + } else - dictionaryItem = CreateNewDictionaryItem(key, dictionaryItemElement, languages, parentId); + { + dictionaryItem = CreateNewDictionaryItem(key, itemName, dictionaryItemElement, languages, parentId); + } + _localizationService.Save(dictionaryItem, userId); items.Add(dictionaryItem); @@ -1099,23 +1146,29 @@ namespace Umbraco.Cms.Infrastructure.Packaging return items; } - private IDictionaryItem GetAndUpdateDictionaryItem(string key, XElement dictionaryItemElement, List languages) + private IDictionaryItem UpdateDictionaryItem(IDictionaryItem dictionaryItem, XElement dictionaryItemElement, List languages) { - var dictionaryItem = _localizationService.GetDictionaryItemByKey(key); var translations = dictionaryItem.Translations.ToList(); foreach (var valueElement in dictionaryItemElement.Elements("Value").Where(v => DictionaryValueIsNew(translations, v))) + { AddDictionaryTranslation(translations, valueElement, languages); + } + dictionaryItem.Translations = translations; return dictionaryItem; } - private static DictionaryItem CreateNewDictionaryItem(string key, XElement dictionaryItemElement, List languages, Guid? parentId) + private static DictionaryItem CreateNewDictionaryItem(Guid itemId, string itemName, XElement dictionaryItemElement, List languages, Guid? parentId) { - var dictionaryItem = parentId.HasValue ? new DictionaryItem(parentId.Value, key) : new DictionaryItem(key); + DictionaryItem dictionaryItem = parentId.HasValue ? new DictionaryItem(parentId.Value, itemName) : new DictionaryItem(itemName); + dictionaryItem.Key = itemId; + var translations = new List(); - foreach (var valueElement in dictionaryItemElement.Elements("Value")) + foreach (XElement valueElement in dictionaryItemElement.Elements("Value")) + { AddDictionaryTranslation(translations, valueElement, languages); + } dictionaryItem.Translations = translations; return dictionaryItem; @@ -1134,7 +1187,10 @@ namespace Umbraco.Cms.Infrastructure.Packaging var languageId = valueElement.Attribute("LanguageCultureAlias").Value; var language = languages.SingleOrDefault(l => l.IsoCode == languageId); if (language == null) + { return; + } + var translation = new DictionaryTranslation(language, valueElement.Value); translations.Add(translation); } @@ -1186,10 +1242,6 @@ namespace Umbraco.Cms.Infrastructure.Packaging foreach (var macro in macros) { - var existing = _macroService.GetByAlias(macro.Alias); - if (existing != null) - macro.Id = existing.Id; - _macroService.Save(macro, userId); } @@ -1198,6 +1250,7 @@ namespace Umbraco.Cms.Infrastructure.Packaging private IMacro ParseMacroElement(XElement macroElement) { + var macroKey = Guid.Parse(macroElement.Element("key").Value); var macroName = macroElement.Element("name").Value; var macroAlias = macroElement.Element("alias").Value; var macroSource = macroElement.Element("macroSource").Value; @@ -1234,28 +1287,39 @@ namespace Umbraco.Cms.Infrastructure.Packaging dontRender = bool.Parse(dontRenderElement.Value); } - var existingMacro = _macroService.GetByAlias(macroAlias) as Macro; + var existingMacro = _macroService.GetById(macroKey) as Macro; var macro = existingMacro ?? new Macro(_shortStringHelper, macroAlias, macroName, macroSource, - cacheByPage, cacheByMember, dontRender, useInEditor, cacheDuration); + cacheByPage, cacheByMember, dontRender, useInEditor, cacheDuration) + { + Key = macroKey + }; var properties = macroElement.Element("properties"); if (properties != null) { int sortOrder = 0; - foreach (var property in properties.Elements()) + foreach (XElement property in properties.Elements()) { + var propertyKey = property.RequiredAttributeValue("key"); var propertyName = property.Attribute("name").Value; var propertyAlias = property.Attribute("alias").Value; var editorAlias = property.Attribute("propertyType").Value; - var sortOrderAttribute = property.Attribute("sortOrder"); + XAttribute sortOrderAttribute = property.Attribute("sortOrder"); if (sortOrderAttribute != null) { sortOrder = int.Parse(sortOrderAttribute.Value); } if (macro.Properties.Values.Any(x => string.Equals(x.Alias, propertyAlias, StringComparison.OrdinalIgnoreCase))) + { continue; - macro.Properties.Add(new MacroProperty(propertyAlias, propertyName, sortOrder, editorAlias)); + } + + macro.Properties.Add(new MacroProperty(propertyAlias, propertyName, sortOrder, editorAlias) + { + Key = propertyKey + }); + sortOrder++; } } diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/DictionaryDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DictionaryDto.cs index f63b0e3de5..cec6e86f83 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/DictionaryDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/DictionaryDto.cs @@ -25,6 +25,7 @@ namespace Umbraco.Cms.Infrastructure.Persistence.Dtos [Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Parent")] public Guid? Parent { get; set; } + // TODO: This needs to have a unique index. [Column("key")] [Length(450)] [Index(IndexTypes.NonClustered, Name = "IX_cmsDictionary_key")] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/LanguageTextDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/LanguageTextDto.cs index e7b3857582..58b0f21542 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/LanguageTextDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/LanguageTextDto.cs @@ -21,6 +21,7 @@ namespace Umbraco.Cms.Infrastructure.Persistence.Dtos [ForeignKey(typeof(DictionaryDto), Column = "id")] public Guid UniqueId { get; set; } + // TODO: Need a unique constraint on LanguageId, UniqueId, Value [Column("value")] [Length(1000)] public string Value { get; set; } diff --git a/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs b/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs index 859a2b6327..88b19e6270 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; @@ -242,8 +242,11 @@ namespace Umbraco.Cms.Core.Services.Implement private XElement Serialize(IDictionaryItem dictionaryItem) { - var xml = new XElement("DictionaryItem", new XAttribute("Key", dictionaryItem.ItemKey)); - foreach (var translation in dictionaryItem.Translations) + var xml = new XElement("DictionaryItem", + new XAttribute("Key", dictionaryItem.Key), + new XAttribute("Name", dictionaryItem.ItemKey)); + + foreach (IDictionaryTranslation translation in dictionaryItem.Translations) { xml.Add(new XElement("Value", new XAttribute("LanguageId", translation.Language.Id), @@ -341,6 +344,7 @@ namespace Umbraco.Cms.Core.Services.Implement var info = new XElement("Info", new XElement("Name", mediaType.Name), new XElement("Alias", mediaType.Alias), + new XElement("Key", mediaType.Key), new XElement("Icon", mediaType.Icon), new XElement("Thumbnail", mediaType.Thumbnail), new XElement("Description", mediaType.Description), @@ -348,7 +352,9 @@ namespace Umbraco.Cms.Core.Services.Implement var masterContentType = mediaType.CompositionAliases().FirstOrDefault(); if (masterContentType != null) + { info.Add(new XElement("Master", masterContentType)); + } var structure = new XElement("Structure"); foreach (var allowedType in mediaType.AllowedContentTypes) @@ -365,18 +371,7 @@ namespace Umbraco.Cms.Core.Services.Implement ? null : mediaType.PropertyGroups.FirstOrDefault(x => x.Id == propertyType.PropertyGroupId.Value); - var genericProperty = new XElement("GenericProperty", - new XElement("Name", propertyType.Name), - new XElement("Alias", propertyType.Alias), - new XElement("Type", propertyType.PropertyEditorAlias), - new XElement("Definition", definition.Key), - new XElement("Tab", propertyGroup == null ? "" : propertyGroup.Name), - new XElement("Mandatory", propertyType.Mandatory.ToString()), - new XElement("MandatoryMessage", propertyType.MandatoryMessage), - new XElement("Validation", propertyType.ValidationRegExp), - new XElement("ValidationRegExpMessage", propertyType.ValidationRegExpMessage), - new XElement("LabelOnTop", propertyType.LabelOnTop), - new XElement("Description", new XCData(propertyType.Description ?? string.Empty))); + XElement genericProperty = SerializePropertyType(propertyType, definition, propertyGroup); genericProperties.Add(genericProperty); } @@ -419,6 +414,7 @@ namespace Umbraco.Cms.Core.Services.Implement { var xml = new XElement("macro"); xml.Add(new XElement("name", macro.Name)); + xml.Add(new XElement("key", macro.Key)); xml.Add(new XElement("alias", macro.Alias)); xml.Add(new XElement("macroSource", macro.MacroSource)); xml.Add(new XElement("useInEditor", macro.UseInEditor.ToString())); @@ -431,6 +427,7 @@ namespace Umbraco.Cms.Core.Services.Implement foreach (var property in macro.Properties) { properties.Add(new XElement("property", + new XAttribute("key", property.Key), new XAttribute("name", property.Name), new XAttribute("alias", property.Alias), new XAttribute("sortOrder", property.SortOrder), @@ -456,8 +453,10 @@ namespace Umbraco.Cms.Core.Services.Implement new XElement("Variations", contentType.Variations.ToString())); var masterContentType = contentType.ContentTypeComposition.FirstOrDefault(x => x.Id == contentType.ParentId); - if(masterContentType != null) + if (masterContentType != null) + { info.Add(new XElement("Master", masterContentType.Alias)); + } var compositionsElement = new XElement("Compositions"); var compositions = contentType.ContentTypeComposition; @@ -475,9 +474,13 @@ namespace Umbraco.Cms.Core.Services.Implement info.Add(allowedTemplates); if (contentType.DefaultTemplate != null && contentType.DefaultTemplate.Id != 0) + { info.Add(new XElement("DefaultTemplate", contentType.DefaultTemplate.Alias)); + } else + { info.Add(new XElement("DefaultTemplate", "")); + } var structure = new XElement("Structure"); foreach (var allowedType in contentType.AllowedContentTypes) @@ -494,21 +497,8 @@ namespace Umbraco.Cms.Core.Services.Implement ? null : contentType.PropertyGroups.FirstOrDefault(x => x.Id == propertyType.PropertyGroupId.Value); - var genericProperty = new XElement("GenericProperty", - new XElement("Name", propertyType.Name), - new XElement("Alias", propertyType.Alias), - new XElement("Key", propertyType.Key), - new XElement("Type", propertyType.PropertyEditorAlias), - new XElement("Definition", definition.Key), - new XElement("Tab", propertyGroup == null ? "" : propertyGroup.Name), - new XElement("SortOrder", propertyType.SortOrder), - new XElement("Mandatory", propertyType.Mandatory.ToString()), - new XElement("LabelOnTop", propertyType.LabelOnTop.ToString()), - propertyType.MandatoryMessage != null ? new XElement("MandatoryMessage", propertyType.MandatoryMessage) : null, - propertyType.ValidationRegExp != null ? new XElement("Validation", propertyType.ValidationRegExp) : null, - propertyType.ValidationRegExpMessage != null ? new XElement("ValidationRegExpMessage", propertyType.ValidationRegExpMessage) : null, - propertyType.Description != null ? new XElement("Description", new XCData(propertyType.Description)) : null, - new XElement("Variations", propertyType.Variations.ToString())); + XElement genericProperty = SerializePropertyType(propertyType, definition, propertyGroup); + genericProperty.Add(new XElement("Variations", propertyType.Variations.ToString())); genericProperties.Add(genericProperty); } @@ -534,7 +524,7 @@ namespace Umbraco.Cms.Core.Services.Implement if (contentType.Level != 1 && masterContentType == null) { //get URL encoded folder names - var folders = _contentTypeService.GetContainers(contentType) + IEnumerable folders = _contentTypeService.GetContainers(contentType) .OrderBy(x => x.Level) .Select(x => WebUtility.UrlEncode(x.Name)); @@ -542,11 +532,29 @@ namespace Umbraco.Cms.Core.Services.Implement } if (string.IsNullOrWhiteSpace(folderNames) == false) + { xml.Add(new XAttribute("Folders", folderNames)); + } return xml; } + private XElement SerializePropertyType(IPropertyType propertyType, IDataType definition, PropertyGroup propertyGroup) + => new XElement("GenericProperty", + new XElement("Name", propertyType.Name), + new XElement("Alias", propertyType.Alias), + new XElement("Key", propertyType.Key), + new XElement("Type", propertyType.PropertyEditorAlias), + new XElement("Definition", definition.Key), + new XElement("Tab", propertyGroup == null ? "" : propertyGroup.Name), + new XElement("SortOrder", propertyType.SortOrder), + new XElement("Mandatory", propertyType.Mandatory.ToString()), + new XElement("LabelOnTop", propertyType.LabelOnTop.ToString()), + propertyType.MandatoryMessage != null ? new XElement("MandatoryMessage", propertyType.MandatoryMessage) : null, + propertyType.ValidationRegExp != null ? new XElement("Validation", propertyType.ValidationRegExp) : null, + propertyType.ValidationRegExpMessage != null ? new XElement("ValidationRegExpMessage", propertyType.ValidationRegExpMessage) : null, + propertyType.Description != null ? new XElement("Description", new XCData(propertyType.Description)) : null); + // exports an IContentBase (IContent, IMedia or IMember) as an XElement. private XElement SerializeContentBase(IContentBase contentBase, string urlValue, string nodeName, bool published) { diff --git a/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs index 746bd271c5..9565c77258 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs @@ -35,8 +35,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging [TearDown] public void DeleteTestFolder() => Directory.Delete(HostingEnvironment.MapPathContentRoot("~/" + _testBaseFolder), true); - - private IShortStringHelper ShortStringHelper => GetRequiredService(); + private IContentService ContentService => GetRequiredService(); private IContentTypeService ContentTypeService => GetRequiredService(); @@ -53,8 +52,6 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging private IHostingEnvironment HostingEnvironment => GetRequiredService(); - private IUmbracoVersion UmbracoVersion => GetRequiredService(); - private IMediaService MediaService => GetRequiredService(); private IMediaTypeService MediaTypeService => GetRequiredService(); @@ -155,6 +152,72 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging // TODO: There's a whole lot more assertions to be done } + [Test] + public void GivenNestedDictionaryItems_WhenPackageExported_ThenTheXmlIsNested() + { + var parent = new DictionaryItem("Parent") + { + Key = Guid.NewGuid() + }; + LocalizationService.Save(parent); + var child1 = new DictionaryItem(parent.Key, "Child1") + { + Key = Guid.NewGuid() + }; + LocalizationService.Save(child1); + var child2 = new DictionaryItem(child1.Key, "Child2") + { + Key = Guid.NewGuid() + }; + LocalizationService.Save(child2); + var child3 = new DictionaryItem(child2.Key, "Child3") + { + Key = Guid.NewGuid() + }; + LocalizationService.Save(child3); + var child4 = new DictionaryItem(child3.Key, "Child4") + { + Key = Guid.NewGuid() + }; + LocalizationService.Save(child4); + + var def = new PackageDefinition + { + Name = "test", + + // put these out of order to ensure that it doesn't matter. + DictionaryItems = new List + { + child2.Id.ToString(), + child1.Id.ToString(), + // we are missing 3 here so 4 will be orphaned and end up in the root + child4.Id.ToString(), + parent.Id.ToString() + } + }; + + PackageBuilder.SavePackage(def); + + string packageXmlPath = PackageBuilder.ExportPackage(def); + + using (var stream = File.OpenRead(packageXmlPath)) + { + var xml = XDocument.Load(stream); + var dictionaryItems = xml.Root.Element("DictionaryItems"); + Assert.IsNotNull(dictionaryItems); + var rootItems = dictionaryItems.Elements("DictionaryItem").ToList(); + Assert.AreEqual(2, rootItems.Count); + Assert.AreEqual("Child4", rootItems[0].AttributeValue("Name")); + Assert.AreEqual("Parent", rootItems[1].AttributeValue("Name")); + var children = rootItems[1].Elements("DictionaryItem").ToList(); + Assert.AreEqual(1, children.Count); + Assert.AreEqual("Child1", children[0].AttributeValue("Name")); + children = children[0].Elements("DictionaryItem").ToList(); + Assert.AreEqual(1, children.Count); + Assert.AreEqual("Child2", children[0].AttributeValue("Name")); + } + } + [Test] public void Export() { diff --git a/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/PackageDataInstallationTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs similarity index 96% rename from src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/PackageDataInstallationTests.cs rename to src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs index f75c359498..cd2f438c14 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/PackageDataInstallationTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs @@ -21,7 +21,7 @@ using Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.Importing; using Umbraco.Extensions; using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Packaging { [TestFixture] [Category("Slow")] @@ -333,10 +333,10 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging IReadOnlyList dataTypeDefinitions = PackageDataInstallation.ImportDataTypes(dataTypeElement.Elements("DataType").ToList(), 0); IReadOnlyList contentTypes = PackageDataInstallation.ImportDocumentTypes(docTypesElement.Elements("DocumentType"), 0); var importedContentTypes = contentTypes.ToDictionary(x => x.Alias, x => x); - IReadOnlyList contents = PackageDataInstallation.ImportContentBase(packageDocument.Yield(), importedContentTypes, 0, ContentTypeService, ContentService); + IReadOnlyList contents = PackageDataInstallation.ImportContentBase(packageDocument.Yield(), importedContentTypes, 0, ContentTypeService, ContentService); int numberOfDocs = (from doc in element.Descendants() - where (string)doc.Attribute("isDoc") == string.Empty - select doc).Count(); + where (string)doc.Attribute("isDoc") == string.Empty + select doc).Count(); // Assert Assert.That(contents, Is.Not.Null); @@ -359,10 +359,10 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging // Act IReadOnlyList mediaTypes = PackageDataInstallation.ImportMediaTypes(mediaTypesElement.Elements("MediaType"), 0); var importedMediaTypes = mediaTypes.ToDictionary(x => x.Alias, x => x); - IReadOnlyList medias = PackageDataInstallation.ImportContentBase(packageMedia.Yield(), importedMediaTypes, 0, MediaTypeService, MediaService); + IReadOnlyList medias = PackageDataInstallation.ImportContentBase(packageMedia.Yield(), importedMediaTypes, 0, MediaTypeService, MediaService); int numberOfDocs = (from doc in element.Descendants() - where (string)doc.Attribute("isDoc") == string.Empty - select doc).Count(); + where (string)doc.Attribute("isDoc") == string.Empty + select doc).Count(); // Assert Assert.That(medias, Is.Not.Null); @@ -372,8 +372,8 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging } [Test] - public void Can_Import_CheckboxList_Content_Package_Xml_With_Property_Editor_Aliases() => - AssertCheckBoxListTests(ImportResources.CheckboxList_Content_Package); + public void Can_Import_CheckboxList_Content_Package_Xml_With_Property_Editor_Aliases() + => AssertCheckBoxListTests(ImportResources.CheckboxList_Content_Package); private void AssertCheckBoxListTests(string strXml) { @@ -388,13 +388,13 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging IReadOnlyList dataTypeDefinitions = PackageDataInstallation.ImportDataTypes(dataTypeElement.Elements("DataType").ToList(), 0); IReadOnlyList contentTypes = PackageDataInstallation.ImportDocumentTypes(docTypesElement.Elements("DocumentType"), 0); var importedContentTypes = contentTypes.ToDictionary(x => x.Alias, x => x); - IReadOnlyList contents = PackageDataInstallation.ImportContentBase(packageDocument.Yield(), importedContentTypes, 0, ContentTypeService, ContentService); + IReadOnlyList contents = PackageDataInstallation.ImportContentBase(packageDocument.Yield(), importedContentTypes, 0, ContentTypeService, ContentService); int numberOfDocs = (from doc in element.Descendants() where (string)doc.Attribute("isDoc") == string.Empty select doc).Count(); string configuration; - using (global::Umbraco.Cms.Core.Scoping.IScope scope = ScopeProvider.CreateScope()) + using (IScope scope = ScopeProvider.CreateScope()) { List dtos = scope.Database.Fetch("WHERE nodeId = @Id", new { dataTypeDefinitions.First().Id }); configuration = dtos.Single().Configuration; @@ -743,10 +743,10 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging LocalizationService.Save(english, 0); } - private void AssertDictionaryItem(string key, string expectedValue, string cultureCode) + private void AssertDictionaryItem(string dictionaryItemName, string expectedValue, string cultureCode) { - Assert.That(LocalizationService.DictionaryItemExists(key), "DictionaryItem key does not exist"); - IDictionaryItem dictionaryItem = LocalizationService.GetDictionaryItemByKey(key); + Assert.That(LocalizationService.DictionaryItemExists(dictionaryItemName), "DictionaryItem key does not exist"); + IDictionaryItem dictionaryItem = LocalizationService.GetDictionaryItemByKey(dictionaryItemName); IDictionaryTranslation translation = dictionaryItem.Translations.SingleOrDefault(i => i.Language.IsoCode == cultureCode); Assert.IsNotNull(translation, "Translation to {0} was not added", cultureCode); string value = translation.Value; @@ -760,6 +760,8 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging LocalizationService.Save( new DictionaryItem("Parent") { + // This matches what is in the package.xml file + Key = new System.Guid("28f2e02a-8c66-4fcd-85e3-8524d551c0d3"), Translations = new List { new DictionaryTranslation(englishLanguage, expectedEnglishParentValue), diff --git a/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/PackageInstallationTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageInstallationTest.cs similarity index 93% rename from src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/PackageInstallationTest.cs rename to src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageInstallationTest.cs index bffd4006a3..d0999a0abc 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/PackageInstallationTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageInstallationTest.cs @@ -9,10 +9,11 @@ using NUnit.Framework; using Umbraco.Cms.Core.Hosting; using Umbraco.Cms.Core.Models.Packaging; using Umbraco.Cms.Core.Packaging; +using Umbraco.Cms.Infrastructure.Packaging; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Packaging { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerFixture)] @@ -20,7 +21,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging { private IHostingEnvironment HostingEnvironment => GetRequiredService(); - private IPackageInstallation PackageInstallation => GetRequiredService(); + private PackageInstallation PackageInstallation => (PackageInstallation)GetRequiredService(); private const string DocumentTypePickerPackage = "Document_Type_Picker_1.1.package.xml"; private const string HelloPackage = "Hello_1.0.0.package.xml"; @@ -76,7 +77,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging var testPackageFile = new FileInfo(Path.Combine(HostingEnvironment.MapPathContentRoot("~/TestData/Packages"), DocumentTypePickerPackage)); using var fileStream = testPackageFile.OpenRead(); CompiledPackage package = PackageInstallation.ReadPackage(XDocument.Load(fileStream)); - + InstallationSummary summary = PackageInstallation.InstallPackageData(package, -1, out PackageDefinition def); Assert.AreEqual(1, summary.DataTypesInstalled.Count()); diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityXmlSerializerTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityXmlSerializerTests.cs index 60496e52c1..31a4ee2c0d 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityXmlSerializerTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityXmlSerializerTests.cs @@ -1,6 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. +using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; @@ -103,7 +104,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services .Build(); localizationService.Save(languageEnGb); - var parentItem = new DictionaryItem("Parent"); + var parentItem = new DictionaryItem("Parent") {Key = Guid.Parse("28f2e02a-8c66-4fcd-85e3-8524d551c0d3")}; var parentTranslations = new List { new DictionaryTranslation(languageNbNo, "ForelderVerdi"), @@ -112,7 +113,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services parentItem.Translations = parentTranslations; localizationService.Save(parentItem); - var childItem = new DictionaryItem(parentItem.Key, "Child"); + var childItem = new DictionaryItem(parentItem.Key, "Child"){Key = Guid.Parse("e7dba0a9-d517-4ba4-8e18-2764d392c611")}; var childTranslations = new List { new DictionaryTranslation(languageNbNo, "BarnVerdi"), diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/CheckboxList-Content-Package.xml b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/CheckboxList-Content-Package.xml index 6f2ae0812c..8622d524ed 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/CheckboxList-Content-Package.xml +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/CheckboxList-Content-Package.xml @@ -3,12 +3,12 @@ - CheckboxListTest - + CheckboxListTest + - + @@ -17,6 +17,7 @@ NewType + e52d7dfa-1509-4e49-8f01-c27ed55e791e NewType .sprTreeFolder folder.png diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/CompositionsTestPackage-Random.xml b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/CompositionsTestPackage-Random.xml index aa61633218..6b04996c4b 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/CompositionsTestPackage-Random.xml +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/CompositionsTestPackage-Random.xml @@ -1,9 +1,9 @@ - + - Composite Test + Composite Test @@ -20,6 +20,7 @@ Composite Test + eebd6e3a-91bc-4bac-be16-3c8d47ee3359 CompositeTest .sprTreeFolder folder.png @@ -43,6 +44,7 @@ Content + 1c51fc0a-79f7-4d3f-9174-95a2628505de Content .sprTreeFolder folder.png @@ -77,6 +79,7 @@ Meta + 0e0ad7de-aff1-4e4b-af8c-85e790669412 Meta .sprTreeFolder folder.png @@ -121,6 +124,7 @@ SEO + cc58b45e-369c-4429-be1b-1b9f7acfd360 Seo .sprTreeFolder folder.png diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/CompositionsTestPackage.xml b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/CompositionsTestPackage.xml index 89c940f7d1..6540e5a6d7 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/CompositionsTestPackage.xml +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/CompositionsTestPackage.xml @@ -3,12 +3,12 @@ - Compositions Packaged - + Compositions Packaged + - + 0 <![CDATA[Txt: A responsive starter kit for Umbraco]]> @@ -26,7 +26,7 @@ - + 0 1 @@ -38,7 +38,7 @@

Once you're happy with your site's design, you might want to add more functionality, such as maps, image galleries or forms. This is done by installing Umbraco modules.

]]>
- + 0 1 @@ -51,7 +51,7 @@

The sky is the limit with Umbraco, and you have the benefit a friendly community, training, and guaranteed support. Find out how to get help.

]]>
- + 0 1 @@ -64,7 +64,7 @@

Get more information about the umbraco way.

]]>
- + 0 1 @@ -73,31 +73,31 @@

Now that you know what the Txt Starter Kit is, it is time to get started using Umbraco.

]]>
- + 0 <![CDATA[Adventure log]]> - + 0 Ita prorsus, inquam; Hanc ergo intuens debet institutum illud quasi signum absolvere. Ergo adhuc, quantum equidem intellego, causa non videtur fuisse mutandi nominis. Quia dolori non voluptas contraria est, sed doloris privatio. Nos autem non solum beatae vitae istam esse oblectationem videmus, sed etiam levamentum miseriarum. Quodsi ipsam honestatem undique pertectam atque absolutam. Nos cum te, M. Quod vestri non item.

Cum id quoque, ut cupiebat, audivisset, evelli iussit eam, qua erat transfixus, hastam. Quarum ambarum rerum cum medicinam pollicetur, luxuriae licentiam pollicetur. Quid iudicant sensus? Quo tandem modo?

]]>
- + 0 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Commoda autem et incommoda in eo genere sunt, quae praeposita et reiecta diximus; Bestiarum vero nullum iudicium puto. Est enim effectrix multarum et magnarum voluptatum. Duo Reges: constructio interrete. Claudii libidini, qui tum erat summo ne imperio, dederetur. Quarum ambarum rerum cum medicinam pollicetur, luxuriae licentiam pollicetur. Sed virtutem ipsam inchoavit, nihil amplius.

Ita redarguitur ipse a sese, convincunturque scripta eius probitate ipsius ac moribus. Istam voluptatem, inquit, Epicurus ignorat? Sed venio ad inconstantiae crimen, ne saepius dicas me aberrare; Sic, et quidem diligentius saepiusque ista loquemur inter nos agemusque communiter. Primum in nostrane potestate est, quid meminerimus? Consequens enim est et post oritur, ut dixi. Hoc mihi cum tuo fratre convenit. Immo videri fortasse. Itaque in rebus minime obscuris non multus est apud eos disserendi labor. Aliud igitur esse censet gaudere, aliud non dolere.

]]>
- + 0 Ut aliquid scire se gaudeant? Hanc ergo intuens debet institutum illud quasi signum absolvere. Vestri haec verecundius, illi fortasse constantius. Itaque sensibus rationem adiunxit et ratione effecta sensus non reliquit. Sed ea mala virtuti magnitudine obruebantur. Quasi ego id curem, quid ille aiat aut neget. Verum tamen cum de rebus grandioribus dicas, ipsae res verba rapiunt; Apparet statim, quae sint officia, quae actiones.

Virtutibus igitur rectissime mihi videris et ad consuetudinem nostrae orationis vitia posuisse contraria. Nonne videmus quanta perturbatio rerum omnium consequatur, quanta confusio? Sed eum qui audiebant, quoad poterant, defendebant sententiam suam. Ut necesse sit omnium rerum, quae natura vigeant, similem esse finem, non eundem.

]]>
- + 0 2021-09-20T00:00:00 @@ -115,6 +115,7 @@ Master + 111adde6-9741-407e-ab35-b46b53471382 umbMaster folder.gif folder.png @@ -159,6 +160,7 @@ Home + e2f9e463-904a-4c0d-a7f3-f7c9fa31272b umbHomePage .sprTreeSettingDomain docWithImage.png @@ -375,6 +377,7 @@ Meta + 8adeed0a-489e-4e74-be6e-2e2f219a04a9 Meta icon-truck folder.png @@ -409,6 +412,7 @@ News Item + b43c90ef-f0d4-448e-b2aa-7915b743cab1 umbNewsItem .sprTreeDocPic docWithImage.png @@ -478,6 +482,7 @@ News Overview + a22ca7e7-bdc4-4c3f-9193-b8773664e61d umbNewsOverview package.png folder_media.png @@ -502,6 +507,7 @@ Seo + 67f4dfe3-c505-43b9-86a4-6d23481c5e87 Seo icon-wifi folder.png @@ -536,6 +542,7 @@ Text Page + d8ab5350-3064-487f-92fe-9735c015f631 umbTextyPage .sprTreeDoc doc.png diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/Dictionary-Package.xml b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/Dictionary-Package.xml index 915492dea8..2f2360037c 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/Dictionary-Package.xml +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/Dictionary-Package.xml @@ -3,14 +3,14 @@ - Dictionary-Package + Dictionary-Package - + - + diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/Fanoe-Package.xml b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/Fanoe-Package.xml index 6b96eed2ed..f1b887b928 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/Fanoe-Package.xml +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/Fanoe-Package.xml @@ -2,7 +2,7 @@ - Fanoe + Fanoe @@ -1201,6 +1201,7 @@ Master + b96c565b-0490-4b34-aed2-ffa0c7f63f2a Master icon-desktop folder.png @@ -1252,6 +1253,7 @@ Blogpost + 10dbe2ef-ee50-4ea6-b4d0-dc0c08919424 Blogpost icon-edit folder.png @@ -1288,6 +1290,7 @@ Blogpost Repository + 7d58f0d9-bfe3-4dfe-be18-9f48cc53c768 BlogpostRepository .sprTreeFolder folder.png @@ -1306,6 +1309,7 @@ Home + 61100eb2-92c7-43d9-9fd8-94707dcbb142 Home icon-home folder.png @@ -1328,6 +1332,7 @@ Landing page + dd8c9f38-9847-465a-924d-87983fcec124 LandingPage icon-stamp folder.png @@ -1366,6 +1371,7 @@ Text page + 8fe738e3-8724-484f-944f-cb0d8fa78aa1 TextPage icon-document folder.png @@ -3903,6 +3909,7 @@ nav > ul li.active ul li a { + E4F0830F-26AB-4CE9-BD71-98273875C4CB Insert form umbracoforms.RenderForm @@ -3919,6 +3926,7 @@ nav > ul li.active ul li a { + E4F0830F-26AB-4CE9-BD71-98273875C4C0 Render Forms Scripts umbracoforms.RenderScripts diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/ImportResources.Designer.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/ImportResources.Designer.cs index b7d74985ad..b49d02d159 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/ImportResources.Designer.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/ImportResources.Designer.cs @@ -1,410 +1,347 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.Importing { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class ImportResources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal ImportResources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.Importing.ImportRes" + - "ources", typeof(ImportResources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> - ///<umbPackage> - /// <files /> - /// <info> - /// <package> - /// <name>CheckboxListTest</name> - /// <version>1</version> - /// <license url="http://www.opensource.org/licenses/mit-license.php">MIT license</license> - /// <url>1</url> - /// <requirements> - /// <major>3</major> - /// <minor>0</minor> - /// <patch>0</patch> - /// </requirements> - /// </package> - /// <author> - /// <name>1</name> - /// <website>1</website> - /// </author> - /// <r [rest of string was truncated]";. - /// - internal static string CheckboxList_Content_Package { - get { - return ResourceManager.GetString("CheckboxList_Content_Package", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> - ///<umbPackage> - /// <files /> - /// <info> - /// <package> - /// <name>Compositions Packaged</name> - /// <version>1.0</version> - /// <license url="http://opensource.org/licenses/MIT">MIT License</license> - /// <url>http://blog.sitereactor.dk</url> - /// <requirements> - /// <major>3</major> - /// <minor>0</minor> - /// <patch>0</patch> - /// </requirements> - /// </package> - /// <author> - /// <name>Morten Christensen</name> - /// <website>h [rest of string was truncated]";. - /// - internal static string CompositionsTestPackage { - get { - return ResourceManager.GetString("CompositionsTestPackage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> - ///<umbPackage> - /// <files /> - /// <info> - /// <package> - /// <name>Composite Test</name> - /// <version>dfsfd</version> - /// <license url="http://opensource.org/licenses/MIT">MIT License</license> - /// <url>ddsff</url> - /// <requirements> - /// <major>3</major> - /// <minor>0</minor> - /// <patch>0</patch> - /// </requirements> - /// </package> - /// <author> - /// <name>fsdfds</name> - /// <website>sfdf</website> - /// </author> - /// <rea [rest of string was truncated]";. - /// - internal static string CompositionsTestPackage_Random { - get { - return ResourceManager.GetString("CompositionsTestPackage_Random", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?> - ///<umbPackage> - /// <files /> - /// <info> - /// <package> - /// <name>Dictionary-Package</name> - /// <version>1.0</version> - /// <license url="http://www.opensource.org/licenses/mit-license.php">MIT license</license> - /// <url>http://not.available</url> - /// <requirements> - /// <major>3</major> - /// <minor>0</minor> - /// <patch>0</patch> - /// </requirements> - /// </package> - /// <author> - /// <name>Test</name> - /// <website>http://not.available</w [rest of string was truncated]";. - /// - internal static string Dictionary_Package { - get { - return ResourceManager.GetString("Dictionary_Package", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> - ///<umbPackage> - /// <files> - /// <file> - /// <guid>bootstrap.min.js</guid> - /// <orgPath>/js</orgPath> - /// <orgName>bootstrap.min.js</orgName> - /// </file> - /// <file> - /// <guid>jquery.min.js</guid> - /// <orgPath>/js</orgPath> - /// <orgName>jquery.min.js</orgName> - /// </file> - /// <file> - /// <guid>top-image.jpg</guid> - /// <orgPath>/Media/1001</orgPath> - /// <orgName>top-image.jpg</orgName> - /// </file> - /// <file> - /// <guid>top-im [rest of string was truncated]";. - /// - internal static string Fanoe_Package { - get { - return ResourceManager.GetString("Fanoe_Package", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> - ///<umbPackage> - /// <files /> - /// <info> - /// <package> - /// <name>DocTypeError</name> - /// <version>1</version> - /// <license url="http://www.opensource.org/licenses/mit-license.php">Personal license</license> - /// <url>http://www.iseli-webconsulting.de</url> - /// <requirements> - /// <major>3</major> - /// <minor>0</minor> - /// <patch>0</patch> - /// </requirements> - /// </package> - /// <author> - /// <name>Iseli Webconsulting</name> [rest of string was truncated]";. - /// - internal static string InheritedDocTypes_Package { - get { - return ResourceManager.GetString("InheritedDocTypes_Package", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<umbPackage> - /// <files /> - /// <info> - /// <package> - /// <name>Package With MediaTypes And Media + Folder</name> - /// <version>1.0.0</version> - /// <iconUrl></iconUrl> - /// <license url="http://opensource.org/licenses/MIT">MIT License</license> - /// <url>http://www.umbraco.com</url> - /// <requirements type="Strict"> - /// <major>0</major> - /// <minor>5</minor> - /// <patch>0</patch> - /// </requirements> - /// </package> - /// <author> - /// <name [rest of string was truncated]";. - /// - internal static string MediaTypesAndMedia_Package_xml { - get { - return ResourceManager.GetString("MediaTypesAndMedia_Package.xml", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?> - ///<DocumentType> - /// <Info> - /// <Name>test</Name> - /// <Alias>test</Alias> - /// <Icon>folder.gif</Icon> - /// <Thumbnail>folder.png</Thumbnail> - /// <Description> - /// </Description> - /// <AllowAtRoot>False</AllowAtRoot> - /// <AllowedTemplates> - /// <Template>test</Template> - /// </AllowedTemplates> - /// <DefaultTemplate>test</DefaultTemplate> - /// </Info> - /// <Structure> - /// <DocumentType>test</DocumentType> - /// </Structure> - /// <GenericProperties> - /// <GenericProperty> [rest of string was truncated]";. - /// - internal static string SingleDocType { - get { - return ResourceManager.GetString("SingleDocType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> - ///<umbPackage> - /// <files> - /// <file> - /// <guid>Map.cshtml</guid> - /// <orgPath>/macroScripts</orgPath> - /// <orgName>Map.cshtml</orgName> - /// </file> - /// <file> - /// <guid>AccountController.cs</guid> - /// <orgPath>/App_Code</orgPath> - /// <orgName>AccountController.cs</orgName> - /// </file> - /// <file> - /// <guid>ContactController.cs</guid> - /// <orgPath>/App_Code</orgPath> - /// <orgName>ContactController.cs</orgName> - /// </file> - /// [rest of string was truncated]";. - /// - internal static string StandardMvc_Package { - get { - return ResourceManager.GetString("StandardMvc_Package", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> - ///<umbPackage> - /// <files /> - /// <info> - /// <package> - /// <name>Template-Update</name> - /// <version>0.1</version> - /// <license url="http://www.opensource.org/licenses/mit-license.php">MIT license</license> - /// <url>https://our.umbraco.com/projects</url> - /// <requirements> - /// <major>3</major> - /// <minor>0</minor> - /// <patch>0</patch> - /// </requirements> - /// </package> - /// <author> - /// <name>Morten Christensen</name> - /// [rest of string was truncated]";. - /// - internal static string TemplateOnly_Package { - get { - return ResourceManager.GetString("TemplateOnly_Package", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> - ///<umbPackage> - /// <files /> - /// <info> - /// <package> - /// <name>Template-Update</name> - /// <version>0.1</version> - /// <license url="http://www.opensource.org/licenses/mit-license.php">MIT license</license> - /// <url>https://our.umbraco.com/projects</url> - /// <requirements> - /// <major>3</major> - /// <minor>0</minor> - /// <patch>0</patch> - /// </requirements> - /// </package> - /// <author> - /// <name>Morten Christensen</name> - /// [rest of string was truncated]";. - /// - internal static string TemplateOnly_Updated_Package { - get { - return ResourceManager.GetString("TemplateOnly_Updated_Package", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> - ///<umbPackage> - /// <files> - /// <file> - /// <guid>uBlogsy.BusinessLogic.dll</guid> - /// <orgPath>/bin</orgPath> - /// <orgName>uBlogsy.BusinessLogic.dll</orgName> - /// </file> - /// <file> - /// <guid>uBlogsy.BusinessLogic.pdb</guid> - /// <orgPath>/bin</orgPath> - /// <orgName>uBlogsy.BusinessLogic.pdb</orgName> - /// </file> - /// <file> - /// <guid>uBlogsy.Common.dll</guid> - /// <orgPath>/bin</orgPath> - /// <orgName>uBlogsy.Common.dll</orgNam [rest of string was truncated]";. - /// - internal static string uBlogsy_Package { - get { - return ResourceManager.GetString("uBlogsy_Package", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> - ///<umbPackage> - /// <files> - /// <file> - /// <guid>XSLTsearch.xslt</guid> - /// <orgPath>/xslt</orgPath> - /// <orgName>XSLTsearch.xslt</orgName> - /// </file> - /// <file> - /// <guid>XSLTsearch.cs</guid> - /// <orgPath>/App_Code</orgPath> - /// <orgName>XSLTsearch.cs</orgName> - /// </file> - /// </files> - /// <info> - /// <package> - /// <name>XSLTsearch</name> - /// <version>3.0.4</version> - /// <license url="http://www.opensource.org/licenses/mit-li [rest of string was truncated]";. - /// - internal static string XsltSearch_Package { - get { - return ResourceManager.GetString("XsltSearch_Package", resourceCulture); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.Importing { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class ImportResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal ImportResources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.Importing.ImportRes" + + "ources", typeof(ImportResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> + ///<umbPackage> + /// <files /> + /// <info> + /// <package> + /// <name>CheckboxListTest</name> + /// </package> + /// </info> + /// <Documents> + /// <DocumentSet importMode="root"> + /// <NewType id="1148" parentID="-1" level="1" creatorID="0" sortOrder="9" createDate="2013-07-23T12:06:07" updateDate="2013-07-23T15:56:37" nodeName="DoIt" urlName="doit" path="-1,1148" isDoc="" nodeType="1134" creatorName="admin" writerName="admin" writerID="0" template="1133" nodeTy [rest of string was truncated]";. + /// + internal static string CheckboxList_Content_Package { + get { + return ResourceManager.GetString("CheckboxList_Content_Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> + ///<umbPackage> + /// <files /> + /// <info> + /// <package> + /// <name>Compositions Packaged</name> + /// </package> + /// </info> + /// <Documents> + /// <DocumentSet importMode="root"> + /// <umbHomePage id="1068" parentID="-1" level="1" creatorID="0" sortOrder="0" createDate="2014-11-26T12:52:35" updateDate="2014-11-26T12:52:36" nodeName="Home" urlName="home" path="-1,1068" isDoc="" nodeType="1056" creatorName="Morten Christensen" writerName="Morten Christensen" [rest of string was truncated]";. + /// + internal static string CompositionsTestPackage { + get { + return ResourceManager.GetString("CompositionsTestPackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> + ///<umbPackage> + /// <files /> + /// <info> + /// <package> + /// <name>Composite Test</name> + /// </package> + /// </info> + /// <Documents> + /// <DocumentSet importMode="root"> + /// <CompositeTest id="1083" parentID="-1" level="1" creatorID="0" sortOrder="1" createDate="2014-11-26T15:02:43" updateDate="2014-11-26T15:02:43" nodeName="Composite test" urlName="composite-test" path="-1,1083" isDoc="" nodeType="1082" creatorName="Niels Hartvig" writerName="Niels Hart [rest of string was truncated]";. + /// + internal static string CompositionsTestPackage_Random { + get { + return ResourceManager.GetString("CompositionsTestPackage_Random", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?> + ///<umbPackage> + /// <files /> + /// <info> + /// <package> + /// <name>Dictionary-Package</name> + /// </package> + /// </info> + /// <DictionaryItems> + /// <DictionaryItem Key="Parent"> + /// <Value LanguageId="2" LanguageCultureAlias="nb-NO"><![CDATA[ForelderVerdi]]></Value> + /// <Value LanguageId="3" LanguageCultureAlias="en-GB"><![CDATA[ParentValue]]></Value> + /// <DictionaryItem Key="Child"> + /// <Value LanguageId="2" LanguageCultureAlias="nb-NO"><![CDATA[BarnV [rest of string was truncated]";. + /// + internal static string Dictionary_Package { + get { + return ResourceManager.GetString("Dictionary_Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> + ///<umbPackage> + /// <info> + /// <package> + /// <name>Fanoe</name> + /// </package> + /// </info> + /// <Documents> + /// <DocumentSet importMode="root"> + /// <Home id="1057" parentID="-1" level="1" creatorID="0" sortOrder="0" createDate="2014-11-25T12:23:30" updateDate="2014-12-01T13:45:08" nodeName="Home" urlName="home" path="-1,1057" isDoc="" nodeType="1055" creatorName="Rune Strand" writerName="Rune Strand" writerID="0" template="1054" nodeTypeAlias="Home"> [rest of string was truncated]";. + /// + internal static string Fanoe_Package { + get { + return ResourceManager.GetString("Fanoe_Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> + ///<umbPackage> + /// <files /> + /// <info> + /// <package> + /// <name>DocTypeError</name> + /// </package> + /// </info> + /// <DocumentTypes> + /// <DocumentType> + /// <Info> + /// <Name>MR Basisseite</Name> + /// <Key>02e4e119-2eeb-4b92-9880-0c35d66a16b2</Key> + /// <Alias>MRBasePage</Alias> + /// <Icon>folder.gif</Icon> + /// <Thumbnail>folder.png</Thumbnail> + /// <Description>Basistyp für alle Seiten der MR-Racing Website.</Description> + /// [rest of string was truncated]";. + /// + internal static string InheritedDocTypes_Package { + get { + return ResourceManager.GetString("InheritedDocTypes_Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> + ///<umbPackage> + /// <files /> + /// <info> + /// <package> + /// <name>Package With MediaTypes And Media + Folder</name> + /// </package> + /// </info> + /// <DocumentTypes /> + /// <MediaTypes> + /// <MediaType> + /// <Info> + /// <Name>Folder</Name> + /// <Key>c3ddc08e-3b5e-42b2-9f0b-6e5c79a2e2e0</Key> + /// <Alias>Folder</Alias> + /// <Icon>icon-folder</Icon> + /// <Thumbnail>icon-folder</Thumbnail> + /// <Description /> + /// <AllowAtRoot>True</AllowAtRoot> + /// [rest of string was truncated]";. + /// + internal static string MediaTypesAndMedia_Package_xml { + get { + return ResourceManager.GetString("MediaTypesAndMedia_Package.xml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?> + ///<DocumentType> + /// <Info> + /// <Name>test</Name> + /// <Key>150ead17-d359-42a2-ac33-6504cc52ced1</Key> + /// <Alias>test</Alias> + /// <Icon>folder.gif</Icon> + /// <Thumbnail>folder.png</Thumbnail> + /// <Description> + /// </Description> + /// <AllowAtRoot>False</AllowAtRoot> + /// <AllowedTemplates> + /// <Template>test</Template> + /// </AllowedTemplates> + /// <DefaultTemplate>test</DefaultTemplate> + /// </Info> + /// <Structure> + /// <DocumentType>test</DocumentType> + /// </Str [rest of string was truncated]";. + /// + internal static string SingleDocType { + get { + return ResourceManager.GetString("SingleDocType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> + ///<umbPackage> + /// <info> + /// <package> + /// <name>StandardWebsiteMVC</name> + /// </package> + /// </info> + /// <Documents> + /// <DocumentSet importMode="root"> + /// <Homepage id="1072" parentID="-1" level="1" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:39" updateDate="2013-02-17T09:10:47" nodeName="Home" urlName="home" path="-1,1072" isDoc="" nodeType="1062" creatorName="admin" writerName="admin" writerID="0" template="1049"> + /// <slide [rest of string was truncated]";. + /// + internal static string StandardMvc_Package { + get { + return ResourceManager.GetString("StandardMvc_Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> + ///<umbPackage> + /// <files /> + /// <info> + /// <package> + /// <name>Template-Update</name> + /// </package> + /// </info> + /// <DocumentTypes /> + /// <Templates> + /// <Template> + /// <Name>Homepage</Name> + /// <Alias>umbHomepage</Alias> + /// <Master>umbMaster</Master> + /// <Design> + /// <![CDATA[<%@ Master Language="C#" MasterPageFile="~/masterpages/umbMaster.master" AutoEventWireup="true" %> + ///<asp:content id="Content1" contentplaceholderid="cp_content [rest of string was truncated]";. + /// + internal static string TemplateOnly_Package { + get { + return ResourceManager.GetString("TemplateOnly_Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> + ///<umbPackage> + /// <files /> + /// <info> + /// <package> + /// <name>Template-Update</name> + /// </package> + /// </info> + /// <DocumentTypes /> + /// <Templates> + /// <Template> + /// <Name>Homepage</Name> + /// <Alias>umbHomepage</Alias> + /// <Master>umbMaster</Master> + /// <Design> + /// <![CDATA[<%@ Master Language="C#" MasterPageFile="~/masterpages/umbMaster.master" AutoEventWireup="true" %> + ///<asp:content id="Content1" contentplaceholderid="cp_content [rest of string was truncated]";. + /// + internal static string TemplateOnly_Updated_Package { + get { + return ResourceManager.GetString("TemplateOnly_Updated_Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> + ///<umbPackage> + /// <info> + /// <package> + /// <name>uBlogsy</name> + /// </package> + /// </info> + /// <Documents> + /// <DocumentSet importMode="root"> + /// <uBlogsySiteRoot id="1266" parentID="-1" level="1" creatorID="0" sortOrder="1" createDate="2013-02-21T18:38:53" updateDate="2013-03-18T22:35:23" nodeName="Sample Site Root" urlName="sample-site-root" path="-1,1266" isDoc="" nodeType="1263" creatorName="admin" writerName="admin" writerID="0" template="12 [rest of string was truncated]";. + /// + internal static string uBlogsy_Package { + get { + return ResourceManager.GetString("uBlogsy_Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?> + ///<umbPackage> + /// <info> + /// <package> + /// <name>XSLTsearch</name> + /// </package> + /// </info> + /// <Documents> + /// <DocumentSet importMode="root"> + /// <XSLTsearch id="1090" parentID="-1" level="1" writerID="0" creatorID="0" nodeType="1087" template="1086" sortOrder="39" createDate="2010-11-09T13:45:22" updateDate="2010-11-09T14:18:04" nodeName="Search" urlName="search" writerName="Administrator" creatorName="Administrator" path="-1,1090" isDoc=""> /// [rest of string was truncated]";. + /// + internal static string XsltSearch_Package { + get { + return ResourceManager.GetString("XsltSearch_Package", resourceCulture); + } + } + } +} diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/InheritedDocTypes-Package.xml b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/InheritedDocTypes-Package.xml index 7e30bb8525..cde09ba65e 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/InheritedDocTypes-Package.xml +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/InheritedDocTypes-Package.xml @@ -1,15 +1,16 @@ - + - DocTypeError + DocTypeError MR Basisseite + 02e4e119-2eeb-4b92-9880-0c35d66a16b2 MRBasePage folder.gif folder.png @@ -66,6 +67,7 @@ MR Startseite + 4ecde940-89bd-47c2-9c9c-3cfcc32e8e52 MRStartPage folder.gif folder.png diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/MediaTypesAndMedia-Package.xml b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/MediaTypesAndMedia-Package.xml index ae37d5a337..6adbea254c 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/MediaTypesAndMedia-Package.xml +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/MediaTypesAndMedia-Package.xml @@ -1,9 +1,9 @@ - + - Package With MediaTypes And Media + Folder + Package With MediaTypes And Media + Folder @@ -11,6 +11,7 @@ Folder + c3ddc08e-3b5e-42b2-9f0b-6e5c79a2e2e0 Folder icon-folder icon-folder @@ -28,6 +29,7 @@ Image + ee78bb5b-3734-4b86-bd48-d9ca2e6d6846 Image icon-picture icon-picture diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/SingleDocType.xml b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/SingleDocType.xml index b7909a51cf..170b7f5b65 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/SingleDocType.xml +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/SingleDocType.xml @@ -2,6 +2,7 @@ test + 150ead17-d359-42a2-ac33-6504cc52ced1 test folder.gif folder.png @@ -31,4 +32,4 @@ - \ No newline at end of file + diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/StandardMvc-Package.xml b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/StandardMvc-Package.xml index 347bfe060b..5bba7cfa4e 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/StandardMvc-Package.xml +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/StandardMvc-Package.xml @@ -3,11 +3,11 @@ StandardWebsiteMVC - + - + Built by Creative Founds @@ -36,7 +36,7 @@ 0 - + About Us

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur dictum, nisi non gravida blandit, odio nulla ultrices orci, quis blandit tortor libero vitae massa. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla at velit lacus.

@@ -62,14 +62,14 @@ 0 - + <description><![CDATA[]]></description> <keywords><![CDATA[]]></keywords> <umbracoNaviHide>0</umbracoNaviHide> - <Standard id="1075" parentID="1074" level="4" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:41" updateDate="2013-02-17T09:04:46" nodeName="3rd level nav 2" urlName="3rd-level-nav-2" path="-1,1072,1073,1074,1075" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> + <Standard key="9c9b55d0-2fbf-4f12-afea-023bd7b25198" id="1075" parentID="1074" level="4" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:41" updateDate="2013-02-17T09:04:46" nodeName="3rd level nav 2" urlName="3rd-level-nav-2" path="-1,1072,1073,1074,1075" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> <bodyText><![CDATA[]]></bodyText> <contentPanels><![CDATA[]]></contentPanels> <title /> @@ -78,7 +78,7 @@ <umbracoNaviHide>0</umbracoNaviHide> </Standard> </Standard> - <Standard id="1076" parentID="1073" level="3" creatorID="0" sortOrder="1" createDate="2013-02-17T09:04:41" updateDate="2013-02-17T09:04:46" nodeName="Sub Navigation 2" urlName="sub-navigation-2" path="-1,1072,1073,1076" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> + <Standard key="9c9b55d0-2fbf-4f12-afea-023bd7b25197" id="1076" parentID="1073" level="3" creatorID="0" sortOrder="1" createDate="2013-02-17T09:04:41" updateDate="2013-02-17T09:04:46" nodeName="Sub Navigation 2" urlName="sub-navigation-2" path="-1,1072,1073,1076" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> <bodyText><![CDATA[]]></bodyText> <contentPanels><![CDATA[]]></contentPanels> <title /> @@ -87,14 +87,14 @@ <umbracoNaviHide>0</umbracoNaviHide> </Standard> </Standard> - <Standard id="1077" parentID="1072" level="2" creatorID="0" sortOrder="1" createDate="2013-02-17T09:04:41" updateDate="2013-02-17T09:10:47" nodeName="News" urlName="news" path="-1,1072,1077" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1046"> + <Standard key="9c9b55d0-2fbf-4f12-afea-023bd7b25196" id="1077" parentID="1072" level="2" creatorID="0" sortOrder="1" createDate="2013-02-17T09:04:41" updateDate="2013-02-17T09:10:47" nodeName="News" urlName="news" path="-1,1072,1077" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1046"> <bodyText><![CDATA[<h2>News</h2>]]></bodyText> <contentPanels><![CDATA[]]></contentPanels> <title /> <description><![CDATA[]]></description> <keywords><![CDATA[]]></keywords> <umbracoNaviHide>0</umbracoNaviHide> - <NewsArticle id="1078" parentID="1077" level="3" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:42" updateDate="2013-02-17T09:11:22" nodeName="Article 1" urlName="article-1" path="-1,1072,1077,1078" isDoc="" nodeType="1063" creatorName="admin" writerName="admin" writerID="0" template="1053"> + <NewsArticle key="9c9b55d0-2fbf-4f12-afea-023bd7b25195" id="1078" parentID="1077" level="3" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:42" updateDate="2013-02-17T09:11:22" nodeName="Article 1" urlName="article-1" path="-1,1072,1077,1078" isDoc="" nodeType="1063" creatorName="admin" writerName="admin" writerID="0" template="1053"> <articleSummary><![CDATA[Here is an article summary, you can add as much of a description as you require.]]></articleSummary> <articleDate>2012-11-08T00:00:00</articleDate> <bodyText> @@ -109,7 +109,7 @@ <umbracoNaviHide>0</umbracoNaviHide> </NewsArticle> </Standard> - <Standard id="1079" parentID="1072" level="2" creatorID="0" sortOrder="2" createDate="2013-02-17T09:04:42" updateDate="2013-02-17T09:10:55" nodeName="Clients" urlName="clients" path="-1,1072,1079" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> + <Standard key="9c9b55d0-2fbf-4f12-afea-023bd7b25194" id="1079" parentID="1072" level="2" creatorID="0" sortOrder="2" createDate="2013-02-17T09:04:42" updateDate="2013-02-17T09:10:55" nodeName="Clients" urlName="clients" path="-1,1072,1079" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> <bodyText> <![CDATA[<h2>Clients</h2> <p><strong>This is a standard content page.</strong></p> @@ -123,7 +123,7 @@ <keywords><![CDATA[]]></keywords> <umbracoNaviHide>0</umbracoNaviHide> </Standard> - <ContactForm id="1080" parentID="1072" level="2" creatorID="0" sortOrder="3" createDate="2013-02-17T09:04:42" updateDate="2013-02-17T09:04:46" nodeName="Contact Us" urlName="contact-us" path="-1,1072,1080" isDoc="" nodeType="1059" creatorName="admin" writerName="admin" writerID="0" template="1048"> + <ContactForm key="9c9b55d0-2fbf-4f12-afea-023bd7b25193" id="1080" parentID="1072" level="2" creatorID="0" sortOrder="3" createDate="2013-02-17T09:04:42" updateDate="2013-02-17T09:04:46" nodeName="Contact Us" urlName="contact-us" path="-1,1072,1080" isDoc="" nodeType="1059" creatorName="admin" writerName="admin" writerID="0" template="1048"> <recipientEmailAddress>chriskoiak@gmail.com</recipientEmailAddress> <emailSubject>Standard Website Contact Form</emailSubject> <thankYouPage>1124</thankYouPage> @@ -138,7 +138,7 @@ <description><![CDATA[]]></description> <keywords><![CDATA[]]></keywords> <umbracoNaviHide>0</umbracoNaviHide> - <Standard id="1081" parentID="1080" level="3" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:42" updateDate="2013-02-17T09:04:46" nodeName="Thank You" urlName="thank-you" path="-1,1072,1080,1081" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> + <Standard key="9c9b55d0-2fbf-4f12-afea-023bd7b25192" id="1081" parentID="1080" level="3" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:42" updateDate="2013-02-17T09:04:46" nodeName="Thank You" urlName="thank-you" path="-1,1072,1080,1081" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> <bodyText><![CDATA[<p><strong>Email sent successfully</strong></p>]]></bodyText> <contentPanels><![CDATA[]]></contentPanels> <title /> @@ -147,7 +147,7 @@ <umbracoNaviHide>1</umbracoNaviHide> </Standard> </ContactForm> - <Standard id="1082" parentID="1072" level="2" creatorID="0" sortOrder="4" createDate="2013-02-17T09:04:42" updateDate="2013-02-17T09:10:47" nodeName="Search" urlName="search" path="-1,1072,1082" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1051"> + <Standard key="9c9b55d0-2fbf-4f12-afea-023bd7b25191" id="1082" parentID="1072" level="2" creatorID="0" sortOrder="4" createDate="2013-02-17T09:04:42" updateDate="2013-02-17T09:10:47" nodeName="Search" urlName="search" path="-1,1072,1082" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1051"> <bodyText><![CDATA[<h2>Search</h2>]]></bodyText> <contentPanels><![CDATA[]]></contentPanels> <title /> @@ -155,7 +155,7 @@ <keywords><![CDATA[]]></keywords> <umbracoNaviHide>0</umbracoNaviHide> </Standard> - <Standard id="1083" parentID="1072" level="2" creatorID="0" sortOrder="5" createDate="2013-02-17T09:04:43" updateDate="2013-02-17T09:10:47" nodeName="Sitemap" urlName="sitemap" path="-1,1072,1083" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1052"> + <Standard key="8c9b55d0-2fbf-4f12-afea-023bd7b25190" id="1083" parentID="1072" level="2" creatorID="0" sortOrder="5" createDate="2013-02-17T09:04:43" updateDate="2013-02-17T09:10:47" nodeName="Sitemap" urlName="sitemap" path="-1,1072,1083" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1052"> <bodyText> <![CDATA[<h2>Sitemap</h2> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur dictum, nisi non gravida blandit, odio nulla ultrices orci, quis blandit tortor libero vitae massa.<a href="/contact-us.aspx"><br /></a></p>]]> @@ -166,16 +166,16 @@ <keywords><![CDATA[]]></keywords> <umbracoNaviHide>0</umbracoNaviHide> </Standard> - <ClientArea id="1084" parentID="1072" level="2" creatorID="0" sortOrder="6" createDate="2013-02-17T09:04:43" updateDate="2013-02-17T09:04:46" nodeName="Client Area" urlName="client-area" path="-1,1072,1084" isDoc="" nodeType="1056" creatorName="admin" writerName="admin" writerID="0" template="1047"> + <ClientArea key="8c9b55d0-2fbf-4f12-afea-023bd7b25199" id="1084" parentID="1072" level="2" creatorID="0" sortOrder="6" createDate="2013-02-17T09:04:43" updateDate="2013-02-17T09:04:46" nodeName="Client Area" urlName="client-area" path="-1,1072,1084" isDoc="" nodeType="1056" creatorName="admin" writerName="admin" writerID="0" template="1047"> <umbracoNaviHide>0</umbracoNaviHide> - <Standard id="1085" parentID="1084" level="3" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:43" updateDate="2013-02-17T09:04:46" nodeName="Client Area 1" urlName="client-area-1" path="-1,1072,1084,1085" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> + <Standard key="8c9b55d0-2fbf-4f12-afea-023bd7b25198" id="1085" parentID="1084" level="3" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:43" updateDate="2013-02-17T09:04:46" nodeName="Client Area 1" urlName="client-area-1" path="-1,1072,1084,1085" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> <bodyText><![CDATA[]]></bodyText> <contentPanels><![CDATA[]]></contentPanels> <title /> <description><![CDATA[]]></description> <keywords><![CDATA[]]></keywords> <umbracoNaviHide>0</umbracoNaviHide> - <Standard id="1086" parentID="1085" level="4" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:43" updateDate="2013-02-17T09:04:46" nodeName="Page 1" urlName="page-1" path="-1,1072,1084,1085,1086" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> + <Standard key="8c9b55d0-2fbf-4f12-afea-023bd7b25197" id="1086" parentID="1085" level="4" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:43" updateDate="2013-02-17T09:04:46" nodeName="Page 1" urlName="page-1" path="-1,1072,1084,1085,1086" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> <bodyText><![CDATA[]]></bodyText> <contentPanels><![CDATA[]]></contentPanels> <title /> @@ -184,7 +184,7 @@ <umbracoNaviHide>0</umbracoNaviHide> </Standard> </Standard> - <Standard id="1087" parentID="1084" level="3" creatorID="0" sortOrder="1" createDate="2013-02-17T09:04:43" updateDate="2013-02-17T09:04:46" nodeName="Client Area 2" urlName="client-area-2" path="-1,1072,1084,1087" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> + <Standard key="8c9b55d0-2fbf-4f12-afea-023bd7b25196" id="1087" parentID="1084" level="3" creatorID="0" sortOrder="1" createDate="2013-02-17T09:04:43" updateDate="2013-02-17T09:04:46" nodeName="Client Area 2" urlName="client-area-2" path="-1,1072,1084,1087" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> <bodyText><![CDATA[]]></bodyText> <contentPanels><![CDATA[]]></contentPanels> <title /> @@ -193,7 +193,7 @@ <umbracoNaviHide>0</umbracoNaviHide> </Standard> </ClientArea> - <Standard id="1088" parentID="1072" level="2" creatorID="0" sortOrder="7" createDate="2013-02-17T09:04:44" updateDate="2013-02-17T09:04:46" nodeName="Insufficent Access" urlName="insufficent-access" path="-1,1072,1088" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> + <Standard key="8c9b55d0-2fbf-4f12-afea-023bd7b25195" id="1088" parentID="1072" level="2" creatorID="0" sortOrder="7" createDate="2013-02-17T09:04:44" updateDate="2013-02-17T09:04:46" nodeName="Insufficent Access" urlName="insufficent-access" path="-1,1072,1088" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1053"> <bodyText> <![CDATA[<h2>Insufficent Access</h2> <p>You have tried to access a page you do not have access to.</p>]]> @@ -204,7 +204,7 @@ <keywords><![CDATA[]]></keywords> <umbracoNaviHide>1</umbracoNaviHide> </Standard> - <Standard id="1089" parentID="1072" level="2" creatorID="0" sortOrder="8" createDate="2013-02-17T09:04:44" updateDate="2013-02-17T09:10:47" nodeName="Login" urlName="login" path="-1,1072,1089" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1050"> + <Standard key="8c9b55d0-2fbf-4f12-afea-023bd7b25194" id="1089" parentID="1072" level="2" creatorID="0" sortOrder="8" createDate="2013-02-17T09:04:44" updateDate="2013-02-17T09:10:47" nodeName="Login" urlName="login" path="-1,1072,1089" isDoc="" nodeType="1058" creatorName="admin" writerName="admin" writerID="0" template="1050"> <bodyText><![CDATA[<h2>Login</h2>]]></bodyText> <contentPanels><![CDATA[]]></contentPanels> <title /> @@ -212,9 +212,9 @@ <keywords><![CDATA[]]></keywords> <umbracoNaviHide>1</umbracoNaviHide> </Standard> - <Slideshow id="1090" parentID="1072" level="2" creatorID="0" sortOrder="9" createDate="2013-02-17T09:04:44" updateDate="2013-02-17T09:04:46" nodeName="Slideshow" urlName="slideshow" path="-1,1072,1090" isDoc="" nodeType="1065" creatorName="admin" writerName="admin" writerID="0" template="0"> + <Slideshow key="8c9b55d0-2fbf-4f12-afea-023bd7b25193" id="1090" parentID="1072" level="2" creatorID="0" sortOrder="9" createDate="2013-02-17T09:04:44" updateDate="2013-02-17T09:04:46" nodeName="Slideshow" urlName="slideshow" path="-1,1072,1090" isDoc="" nodeType="1065" creatorName="admin" writerName="admin" writerID="0" template="0"> <umbracoNaviHide>0</umbracoNaviHide> - <Slide id="1091" parentID="1090" level="3" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:44" updateDate="2013-02-17T09:04:46" nodeName="Purple Hat" urlName="purple-hat" path="-1,1072,1090,1091" isDoc="" nodeType="1064" creatorName="admin" writerName="admin" writerID="0" template="0"> + <Slide key="8c9b55d0-2fbf-4f12-afea-023bd7b25192" id="1091" parentID="1090" level="3" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:44" updateDate="2013-02-17T09:04:46" nodeName="Purple Hat" urlName="purple-hat" path="-1,1072,1090,1091" isDoc="" nodeType="1064" creatorName="admin" writerName="admin" writerID="0" template="0"> <mainImage>/media/1813/cap.png</mainImage> <bodyText> <![CDATA[<h3>Standard Website MVC</h3> @@ -224,7 +224,7 @@ </bodyText> <umbracoNaviHide>1</umbracoNaviHide> </Slide> - <Slide id="1092" parentID="1090" level="3" creatorID="0" sortOrder="1" createDate="2013-02-17T09:04:44" updateDate="2013-02-17T09:04:46" nodeName="Red Dice" urlName="red-dice" path="-1,1072,1090,1092" isDoc="" nodeType="1064" creatorName="admin" writerName="admin" writerID="0" template="0"> + <Slide key="8c9b55d0-2fbf-4f12-afea-023bd7b25191" id="1092" parentID="1090" level="3" creatorID="0" sortOrder="1" createDate="2013-02-17T09:04:44" updateDate="2013-02-17T09:04:46" nodeName="Red Dice" urlName="red-dice" path="-1,1072,1090,1092" isDoc="" nodeType="1064" creatorName="admin" writerName="admin" writerID="0" template="0"> <mainImage>/media/1824/dice.png</mainImage> <bodyText> <![CDATA[<h3>Secure Client Areas</h3> @@ -234,7 +234,7 @@ </bodyText> <umbracoNaviHide>1</umbracoNaviHide> </Slide> - <Slide id="1093" parentID="1090" level="3" creatorID="0" sortOrder="2" createDate="2013-02-17T09:04:44" updateDate="2013-02-17T09:04:46" nodeName="Umbraco Speechbubble" urlName="umbraco-speechbubble" path="-1,1072,1090,1093" isDoc="" nodeType="1064" creatorName="admin" writerName="admin" writerID="0" template="0"> + <Slide key="7c9b55d0-2fbf-4f12-afea-023bd7b25190" id="1093" parentID="1090" level="3" creatorID="0" sortOrder="2" createDate="2013-02-17T09:04:44" updateDate="2013-02-17T09:04:46" nodeName="Umbraco Speechbubble" urlName="umbraco-speechbubble" path="-1,1072,1090,1093" isDoc="" nodeType="1064" creatorName="admin" writerName="admin" writerID="0" template="0"> <mainImage>/media/2075/chat.jpg</mainImage> <bodyText> <![CDATA[<h3>News List</h3> @@ -245,9 +245,9 @@ <umbracoNaviHide>1</umbracoNaviHide> </Slide> </Slideshow> - <ContentPanels id="1094" parentID="1072" level="2" creatorID="0" sortOrder="10" createDate="2013-02-17T09:04:45" updateDate="2013-02-17T09:04:46" nodeName="Content Panels" urlName="content-panels" path="-1,1072,1094" isDoc="" nodeType="1061" creatorName="admin" writerName="admin" writerID="0" template="0"> + <ContentPanels key="7c9b55d0-2fbf-4f12-afea-023bd7b25199" id="1094" parentID="1072" level="2" creatorID="0" sortOrder="10" createDate="2013-02-17T09:04:45" updateDate="2013-02-17T09:04:46" nodeName="Content Panels" urlName="content-panels" path="-1,1072,1094" isDoc="" nodeType="1061" creatorName="admin" writerName="admin" writerID="0" template="0"> <umbracoNaviHide>1</umbracoNaviHide> - <ContentPanel id="1095" parentID="1094" level="3" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:45" updateDate="2013-02-17T09:04:46" nodeName="Introductory Offers" urlName="introductory-offers" path="-1,1072,1094,1095" isDoc="" nodeType="1060" creatorName="admin" writerName="admin" writerID="0" template="0"> + <ContentPanel key="7c9b55d0-2fbf-4f12-afea-023bd7b25198" id="1095" parentID="1094" level="3" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:45" updateDate="2013-02-17T09:04:46" nodeName="Introductory Offers" urlName="introductory-offers" path="-1,1072,1094,1095" isDoc="" nodeType="1060" creatorName="admin" writerName="admin" writerID="0" template="0"> <bodyText> <![CDATA[ <h3>Introductory Offers</h3> @@ -263,7 +263,7 @@ </bodyText> <umbracoNaviHide>1</umbracoNaviHide> </ContentPanel> - <ContentPanel id="1096" parentID="1094" level="3" creatorID="0" sortOrder="1" createDate="2013-02-17T09:04:45" updateDate="2013-02-17T09:04:46" nodeName="Sample Panel" urlName="sample-panel" path="-1,1072,1094,1096" isDoc="" nodeType="1060" creatorName="admin" writerName="admin" writerID="0" template="0"> + <ContentPanel key="7c9b55d0-2fbf-4f12-afea-023bd7b25197" id="1096" parentID="1094" level="3" creatorID="0" sortOrder="1" createDate="2013-02-17T09:04:45" updateDate="2013-02-17T09:04:46" nodeName="Sample Panel" urlName="sample-panel" path="-1,1072,1094,1096" isDoc="" nodeType="1060" creatorName="admin" writerName="admin" writerID="0" template="0"> <bodyText> <![CDATA[<p><strong>Sample Panel</strong></p> <p>Don't you just love MVC?</p> @@ -282,6 +282,7 @@ <DocumentType> <Info> <Name>Base</Name> + <Key>2db296c1-5c60-45e9-b6d3-8148926dd863</Key> <Alias>Base</Alias> <Icon>folder.gif</Icon> <Thumbnail>folder.png</Thumbnail> @@ -312,6 +313,7 @@ <DocumentType> <Info> <Name>Client Area Folder</Name> + <Key>84d692d2-11fe-45ba-927e-2c4ecdb11400</Key> <Alias>ClientArea</Alias> <Icon>.sprTreeFolder</Icon> <Thumbnail>folder.png</Thumbnail> @@ -334,6 +336,7 @@ <DocumentType> <Info> <Name>Content Master</Name> + <Key>f6d25616-9f16-4c70-9e8c-e0ad4cd92dfc</Key> <Alias>ContentMaster</Alias> <Icon>folder.gif</Icon> <Thumbnail>folder.png</Thumbnail> @@ -391,6 +394,7 @@ <DocumentType> <Info> <Name>Standard</Name> + <Key>95a532e7-064f-4651-a619-786f4beac7c1</Key> <Alias>Standard</Alias> <Icon>.sprTreeDoc</Icon> <Thumbnail>doc.png</Thumbnail> @@ -449,6 +453,7 @@ <DocumentType> <Info> <Name>ContactForm</Name> + <Key>67ce11c5-0493-4d8f-9678-d131bd8996ea</Key> <Alias>ContactForm</Alias> <Icon>newsletter.gif</Icon> <Thumbnail>doc.png</Thumbnail> @@ -520,6 +525,7 @@ <DocumentType> <Info> <Name>ContentPanel</Name> + <Key>503b6a5e-69b6-444a-a728-074a1b201b84</Key> <Alias>ContentPanel</Alias> <Icon>.sprTreeDoc</Icon> <Thumbnail>doc.png</Thumbnail> @@ -555,6 +561,7 @@ <DocumentType> <Info> <Name>ContentPanels</Name> + <Key>3d1433fc-22a2-4a70-b7cb-b7fafe4a0622</Key> <Alias>ContentPanels</Alias> <Icon>.sprTreeFolder</Icon> <Thumbnail>folder.png</Thumbnail> @@ -575,6 +582,7 @@ <DocumentType> <Info> <Name>Homepage</Name> + <Key>a5f79cf6-9a2f-4672-ab56-f8bb31fdbb20</Key> <Alias>Homepage</Alias> <Icon>.sprTreeSettingDomain</Icon> <Thumbnail>folder.png</Thumbnail> @@ -784,6 +792,7 @@ <DocumentType> <Info> <Name>NewsArticle</Name> + <Key>c4662a2d-4698-4880-9243-2e449d9e0cfd</Key> <Alias>NewsArticle</Alias> <Icon>doc.gif</Icon> <Thumbnail>folder.png</Thumbnail> @@ -831,6 +840,7 @@ <DocumentType> <Info> <Name>Slide</Name> + <Key>cf2153f2-4881-442b-ab58-50c1c786522b</Key> <Alias>Slide</Alias> <Icon>.sprTreeMediaPhoto</Icon> <Thumbnail>docWithImage.png</Thumbnail> @@ -877,6 +887,7 @@ <DocumentType> <Info> <Name>Slideshow</Name> + <Key>9acb68aa-03e1-4474-823d-c21af8356756</Key> <Alias>Slideshow</Alias> <Icon>.sprTreeFolder</Icon> <Thumbnail>folder.png</Thumbnail> @@ -2041,6 +2052,7 @@ table th, td {border: 0px solid #fff;} </Stylesheets> <Macros> <macro> + <key>E4F0830F-26AB-4CE9-BD71-98273875C4C0</key> <name>Map</name> <alias>Map</alias> <scriptType> diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/XsltSearch-Package.xml b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/XsltSearch-Package.xml index b97c62825c..37844e37cb 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/XsltSearch-Package.xml +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/XsltSearch-Package.xml @@ -2,7 +2,7 @@ <umbPackage> <info> <package> - <name>XSLTsearch</name> + <name>XSLTsearch</name> </package> </info> <Documents> @@ -16,6 +16,7 @@ <DocumentType> <Info> <Name>XSLTsearch</Name> + <Key>c7d19488-f11c-4c28-be14-da8be9c9a675</Key> <Alias>XSLTsearch</Alias> <Icon>.sprTreeDoc2</Icon> <Thumbnail>doc.png</Thumbnail> @@ -54,10 +55,10 @@ <Design> <![CDATA[<%@ Master Language="C#" MasterPageFile="~/masterpages/RunwayMaster.master" AutoEventWireup="true" %> - + <asp:Content ContentPlaceHolderId="RunwayMasterContentPlaceHolder" runat="server"> <div id="content"> - <div id="contentHeader"> + <div id="contentHeader"> <h2><umbraco:Item runat="server" field="pageName"/></h2> </div> @@ -107,6 +108,7 @@ p.xsltsearch_result_description {padding-bottom: 10px;} <Macros> <macro> <name>XSLTsearch</name> + <key>0712FAC7-ADD7-48F7-9098-C80220B0D2F0</key> <alias>XSLTsearch</alias> <macroType>Unknown</macroType> <macroSource /> @@ -116,72 +118,72 @@ p.xsltsearch_result_description {padding-bottom: 10px;} <scriptingFile> </scriptingFile> <properties> - <property name="Source" alias="source" show="True" propertyType="contentTree" /> - <property name="Umbraco fields to search" alias="searchFields" show="True" propertyType="text" /> - <property name="Umbraco fields shown in results preview" alias="previewFields" show="True" propertyType="text" /> - <property name="Display search box at TOP, BOTTOM, BOTH, or NONE" alias="searchBoxLocation" show="True" propertyType="text" /> - <property name="Display BEGINNING or CONTEXT of each result" alias="previewType" show="True" propertyType="text" /> - <property name="Number of search results to display per page" alias="resultsPerPage" show="True" propertyType="number" /> - <property name="Number of characters of preview text to display" alias="previewChars" show="True" propertyType="number" /> - <property name="Display 'Showing result X to Y'?" alias="showPageRange" show="True" propertyType="bool" /> - <property name="Display numbers before each result?" alias="showOrdinals" show="True" propertyType="bool" /> - <property name="Display search score for each result?" alias="showScores" show="True" propertyType="bool" /> - <property name="Display 'Searched X documents in Y seconds'?" alias="showStats" show="True" propertyType="bool" /> + <property name="Source" alias="source" show="True" propertyType="contentTree" key="921e17a2-1b70-4d90-9448-85a378938096" /> + <property name="Umbraco fields to search" alias="searchFields" show="True" propertyType="text" key="230669fd-5cc3-4946-a307-474ebcf904c4" /> + <property name="Umbraco fields shown in results preview" alias="previewFields" show="True" propertyType="text" key="6b9168b8-d70a-4950-8d8d-056688b33dc9" /> + <property name="Display search box at TOP, BOTTOM, BOTH, or NONE" alias="searchBoxLocation" show="True" propertyType="text" key="6fc99a63-2f17-4906-a007-5aa918b526af" /> + <property name="Display BEGINNING or CONTEXT of each result" alias="previewType" show="True" propertyType="text" key="a89b2320-fabe-48d0-8949-a2d66fb9cd31" /> + <property name="Number of search results to display per page" alias="resultsPerPage" show="True" propertyType="number" key="fac01eb0-2cca-4980-b68d-eb1eb44e6896" /> + <property name="Number of characters of preview text to display" alias="previewChars" show="True" propertyType="number" key="ccb30dfa-3c00-452d-8a51-22bc2f3efd51" /> + <property name="Display 'Showing result X to Y'?" alias="showPageRange" show="True" propertyType="bool" key="0a10391a-b174-4980-bb6d-35a656687aca" /> + <property name="Display numbers before each result?" alias="showOrdinals" show="True" propertyType="bool" key="305d3c2d-f062-420c-83b8-be91f2efd56b" /> + <property name="Display search score for each result?" alias="showScores" show="True" propertyType="bool" key="ff8bc866-f58b-4d02-9bfe-87461f08ce39" /> + <property name="Display 'Searched X documents in Y seconds'?" alias="showStats" show="True" propertyType="bool" key="a3c8b300-9726-468e-b199-544f0f9145c7" /> </properties> </macro> </Macros> <DictionaryItems> - <DictionaryItem Key="XSLTsearch"> + <DictionaryItem Name="XSLTsearch" Key="26F5C64A-0BE5-448F-A443-3B09D6162D90"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[]]></Value> - <DictionaryItem Key="[XSLTsearch]Button-Search"> + <DictionaryItem Name="[XSLTsearch]Button-Search" Key="26F5C64A-0BE5-448F-A443-3B09D6162D99"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[Search]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]Description-Context"> + <DictionaryItem Name="[XSLTsearch]Description-Context" Key="26F5C64A-0BE5-448F-A443-3B09D6162D98"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[Context]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]Description-ContextUnavailable"> + <DictionaryItem Name="[XSLTsearch]Description-ContextUnavailable" Key="26F5C64A-0BE5-448F-A443-3B09D6162D97"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[unavailable]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]Heading-SearchResults"> + <DictionaryItem Name="[XSLTsearch]Heading-SearchResults" Key="26F5C64A-0BE5-448F-A443-3B09D6162D96"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[Search Results]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]Navigation-Next"> + <DictionaryItem Name="[XSLTsearch]Navigation-Next" Key="26F5C64A-0BE5-448F-A443-3B09D6162D95"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[Next]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]Navigation-Previous"> + <DictionaryItem Name="[XSLTsearch]Navigation-Previous" Key="26F5C64A-0BE5-448F-A443-3B09D6162D94"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[Previous]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]PageRange-ShowingResults"> + <DictionaryItem Name="[XSLTsearch]PageRange-ShowingResults" Key="26F5C64A-0BE5-448F-A443-3B09D6162D93"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[Showing results]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]PageRange-To"> + <DictionaryItem Name="[XSLTsearch]PageRange-To" Key="26F5C64A-0BE5-448F-A443-3B09D6162D92"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[to]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]Score-Score"> + <DictionaryItem Name="[XSLTsearch]Score-Score" Key="26F5C64A-0BE5-448F-A443-3B09D6162D91"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[score]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]Stats-PagesIn"> + <DictionaryItem Name="[XSLTsearch]Stats-PagesIn" Key="56F5C64A-0BE5-448F-A443-3B09D6162D90"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[pages in]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]Stats-Searched"> + <DictionaryItem Name="[XSLTsearch]Stats-Searched" Key="56F5C64A-0BE5-448F-A443-3B09D6162D99"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[Searched]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]Stats-Seconds"> + <DictionaryItem Name="[XSLTsearch]Stats-Seconds" Key="56F5C64A-0BE5-448F-A443-3B09D6162D98"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[seconds]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]Summary-Matches"> + <DictionaryItem Name="[XSLTsearch]Summary-Matches" Key="56F5C64A-0BE5-448F-A443-3B09D6162D97"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[matches]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]Summary-NoMatchesWereFoundFor"> + <DictionaryItem Name="[XSLTsearch]Summary-NoMatchesWereFoundFor" Key="56F5C64A-0BE5-448F-A443-3B09D6162D96"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[No matches were found for]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]Summary-Page"> + <DictionaryItem Name="[XSLTsearch]Summary-Page" Key="56F5C64A-0BE5-448F-A443-3B09D6162D95"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[page]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]Summary-Pages"> + <DictionaryItem Name="[XSLTsearch]Summary-Pages" Key="56F5C64A-0BE5-448F-A443-3B09D6162D94"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[pages]]></Value> </DictionaryItem> - <DictionaryItem Key="[XSLTsearch]Summary-YourSearchFor"> + <DictionaryItem Name="[XSLTsearch]Summary-YourSearchFor" Key="56F5C64A-0BE5-448F-A443-3B09D6162D93"> <Value LanguageId="1" LanguageCultureAlias="en-US"><![CDATA[Your search for]]></Value> </DictionaryItem> </DictionaryItem> diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/uBlogsy-Package.xml b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/uBlogsy-Package.xml index 175d5a5927..e5409ea1f6 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/uBlogsy-Package.xml +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/uBlogsy-Package.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<umbPackage> +<umbPackage> <info> <package> - <name>uBlogsy</name> + <name>uBlogsy</name> </package> </info> <Documents> @@ -148,6 +148,7 @@ http://feeds.feedburner.com/midcodecrisis <DocumentType> <Info> <Name>[uBlogsy] [Base]</Name> + <Key>4cc72906-14b1-4c98-a4f9-1720bb9bc2fd</Key> <Alias>uBlogsyBaseDocType</Alias> <Icon>folder.gif</Icon> <Thumbnail>folder.png</Thumbnail> @@ -225,6 +226,7 @@ http://feeds.feedburner.com/midcodecrisis <DocumentType> <Info> <Name>[uBlogsy] [Base] Container</Name> + <Key>734354fd-dcda-4d5b-bf23-353534424484</Key> <Alias>uBlogsyBaseContainer</Alias> <Icon>folder.gif</Icon> <Thumbnail>folder.png</Thumbnail> @@ -243,6 +245,7 @@ http://feeds.feedburner.com/midcodecrisis <DocumentType> <Info> <Name>[uBlogsy] [Base] Page</Name> + <Key>03c134a7-7ba9-4e60-95f3-9358c2a88235</Key> <Alias>uBlogsyBasePage</Alias> <Icon>folder.gif</Icon> <Thumbnail>folder.png</Thumbnail> @@ -351,6 +354,7 @@ http://feeds.feedburner.com/midcodecrisis <DocumentType> <Info> <Name>[uBlogsy] Author</Name> + <Key>a148d057-e68f-455c-afb1-eacaa69de147</Key> <Alias>uBlogsyAuthor</Alias> <Icon>user.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -397,6 +401,7 @@ http://feeds.feedburner.com/midcodecrisis <DocumentType> <Info> <Name>[uBlogsy] Container - Author</Name> + <Key>e2aff474-6fb7-4ec1-8271-33214ac2ddd6</Key> <Alias>uBlogsyContainerAuthor</Alias> <Icon>folder_user.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -417,6 +422,7 @@ http://feeds.feedburner.com/midcodecrisis <DocumentType> <Info> <Name>[uBlogsy] Container - Email Template</Name> + <Key>42af53c7-df89-49cd-b84d-94b978defed5</Key> <Alias>uBlogsyContainerEmailTemplate</Alias> <Icon>folder_page_white.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -435,6 +441,7 @@ http://feeds.feedburner.com/midcodecrisis <DocumentType> <Info> <Name>[uBlogsy] Container - Label</Name> + <Key>277fe1af-9719-436e-8bb9-8aa31af6695d</Key> <Alias>uBlogsyContainerLabel</Alias> <Icon>folder_table.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -455,6 +462,7 @@ http://feeds.feedburner.com/midcodecrisis <DocumentType> <Info> <Name>[uBlogsy] Label</Name> + <Key>4e45c8dd-f5b1-454f-8042-43cb245e6764</Key> <Alias>uBlogsyLabel</Alias> <Icon>tag.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -490,6 +498,7 @@ http://feeds.feedburner.com/midcodecrisis <DocumentType> <Info> <Name>[uBlogsy] Landing</Name> + <Key>8789c927-0a55-408f-81b4-48a00cc3bb5b</Key> <Alias>uBlogsyLanding</Alias> <Icon>feed.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -523,7 +532,7 @@ http://feeds.feedburner.com/midcodecrisis <Description> <![CDATA[A list of blogs you want to follow. Make sure it's one per line. -e.g +e.g http://feeds.feedburner.com/midcodecrisis http://feeds.feedburner.com/umbracoblog]]> </Description> @@ -596,6 +605,7 @@ Selected by default.]]> <DocumentType> <Info> <Name>[uBlogsy] Page</Name> + <Key>38b8c863-915a-4f9e-aaa6-4c191c933fb6</Key> <Alias>uBlogsyPage</Alias> <Icon>page_white_cup.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -614,6 +624,7 @@ Selected by default.]]> <DocumentType> <Info> <Name>[uBlogsy] Post</Name> + <Key>937bb833-acef-4adc-8168-bf8e8f648d9d</Key> <Alias>uBlogsyPost</Alias> <Icon>page_green.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -704,6 +715,7 @@ Selected by default.]]> <DocumentType> <Info> <Name>[uBlogsy] RSS</Name> + <Key>74cb10d5-60e5-401a-a839-e7eb1140ea8a</Key> <Alias>uBlogsyRSS</Alias> <Icon>rss.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -766,6 +778,7 @@ e.g Mid-code Crisis <DocumentType> <Info> <Name>[uBlogsy] Site Root</Name> + <Key>8a4a40d1-0207-4f5f-aef1-cbcf57d6a408</Key> <Alias>uBlogsySiteRoot</Alias> <Icon>house.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -788,6 +801,7 @@ e.g Mid-code Crisis <DocumentType> <Info> <Name>[uDateFoldersy] [Base]</Name> + <Key>22b97d7d-a619-4193-8e30-3cb1c62d6af9</Key> <Alias>uDateFoldersyBase</Alias> <Icon>folder.gif</Icon> <Thumbnail>folder.png</Thumbnail> @@ -805,6 +819,7 @@ e.g Mid-code Crisis <DocumentType> <Info> <Name>[uDateFoldersy] Folder - Day</Name> + <Key>629e17b1-e7f7-46a2-8125-7af73e584c8d</Key> <Alias>uDateFoldersyFolderDay</Alias> <Icon>calendar_view_day.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -826,6 +841,7 @@ e.g Mid-code Crisis <DocumentType> <Info> <Name>[uDateFoldersy] Folder - Month</Name> + <Key>5d0ce254-41b4-467d-9576-e760ac0a1df1</Key> <Alias>uDateFoldersyFolderMonth</Alias> <Icon>date.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -847,6 +863,7 @@ e.g Mid-code Crisis <DocumentType> <Info> <Name>[uDateFoldersy] Folder - Year</Name> + <Key>b1d6036a-c679-4d09-abc3-01d2153dde9c</Key> <Alias>uDateFoldersyFolderYear</Alias> <Icon>folder_table.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -868,6 +885,7 @@ e.g Mid-code Crisis <DocumentType> <Info> <Name>[uTagsy] [Base]</Name> + <Key>5d3d0cb1-bff8-49af-94a2-a22d9d2b2e80</Key> <Alias>uTagsyBaseDocType</Alias> <Icon>folder.gif</Icon> <Thumbnail>folder.png</Thumbnail> @@ -885,6 +903,7 @@ e.g Mid-code Crisis <DocumentType> <Info> <Name>[uTagsy] Tag</Name> + <Key>fd188722-5d01-46bc-9c34-4385c7fce5b4</Key> <Alias>uTagsyTag</Alias> <Icon>tag_blue.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -920,6 +939,7 @@ e.g Mid-code Crisis <DocumentType> <Info> <Name>[uTagsy] Tag Container</Name> + <Key>758dc50b-72ed-43cb-90e4-c3f9479cf535</Key> <Alias>uTagsyTagContainer</Alias> <Icon>tag_blue_add.png</Icon> <Thumbnail>folder.png</Thumbnail> @@ -971,9 +991,9 @@ e.g Mid-code Crisis @section uBlogsyMain { - <div id="uBlogsy"> + <div id="uBlogsy"> <div id="uBlogsy_main"> - + <section id="uBlogsy_left_col"> @RenderSection("uBlogsyLeftCol") </section> @@ -992,7 +1012,7 @@ e.g Mid-code Crisis @*the awesome tag cloud*@ @Html.CachedPartial("uBlogsy/Widgets/uBlogsyWidgetListTags", Model, 0, false, false, new ViewDataDictionary(ViewData) { { "ShowCount", true } }) - + @*list of latest posts*@ @Html.CachedPartial("uBlogsy/Widgets/uBlogsyWidgetListPosts", Model, 0, false, false, new ViewDataDictionary(ViewData) { { "ItemLimit", 5 } }) @@ -1000,7 +1020,7 @@ e.g Mid-code Crisis @try{ @Html.CachedPartial("uCommentsy/Widgets/uCommentsyWidgetListComments", Model, 0, false, false, new ViewDataDictionary(ViewData) { { "ItemLimit", 5 } }) }catch (Exception){} - + @*archive*@ @Html.CachedPartial("uBlogsy/Widgets/uBlogsyWidgetListPostArchive", Model, 600, false, false, new ViewDataDictionary(ViewData) { { "AltLayout", false } }) @@ -1008,7 +1028,7 @@ e.g Mid-code Crisis @Html.CachedPartial("uBlogsy/Widgets/uBlogsyWidgetListBlogRoll", Model, 600, false, false, new ViewDataDictionary(ViewData) { { "ItemLimit", 5 } }) </aside> </div> - + @Html.CachedPartial("uBlogsy/Global/uBlogsyGlobalFooter", Model, 0) </div> } @@ -1035,20 +1055,20 @@ e.g Mid-code Crisis <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html lang="en-GB" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" dir="ltr"> <head> - <title>My Site + My Site @RenderSection("uBlogsyHead") - + @*top navigation*@ @Html.CachedPartial("uBlogsy/Global/uBlogsyGlobalHeader", Model, 60, true) - + @*top navigation*@ @Html.CachedPartial("uBlogsy/Global/uBlogsyGlobalNavigation", Model, 60, true) - - + + @RenderSection("uBlogsyMain") - + }]]> @@ -1094,11 +1114,11 @@ e.g Mid-code Crisis @Umbraco.Field("uBlogsyContentBody") } - + @*list posts*@
- @Html.CachedPartial("uBlogsy/Landing/uBlogsyLandingListPosts", Model, 0, false, false, new ViewDataDictionary(ViewData) { { "ItemsPerPage", 20 } }) -
+ @Html.CachedPartial("uBlogsy/Landing/uBlogsyLandingListPosts", Model, 0, false, false, new ViewDataDictionary(ViewData) { { "ItemsPerPage", 20 } }) + } ]]> @@ -1152,7 +1172,7 @@ e.g Mid-code Crisis @inherits UmbracoTemplatePage @{ Layout = "_uBlogsyBaseBlog.cshtml"; - + var tag = Request.QueryString["tag"]; var label = Request.QueryString["label"]; var author = Request.QueryString["author"]; @@ -1165,7 +1185,7 @@ e.g Mid-code Crisis var prev = PostService.Instance.GetNextPost(Model.Content, tag, label, author, searchTerm, commenter, year, month, day); var next = PostService.Instance.GetPreviousPost(Model.Content, tag, label, author, searchTerm, commenter, year, month, day); } - + @section uBlogsyHead{} @section uBlogsyLeftCol{ @@ -1178,22 +1198,22 @@ e.g Mid-code Crisis var prevUrl = prev.Url.GetUrlWithQueryString(Request.QueryString, new[] { "action", "success" }); < @Umbraco.GetDictionaryValue("uBlogsyDicPaginationOlder") } - + @if (next != null) { - var nextUrl = next.Url.GetUrlWithQueryString(Request.QueryString, new[] { "action", "success" }); + var nextUrl = next.Url.GetUrlWithQueryString(Request.QueryString, new[] { "action", "success" }); @Umbraco.GetDictionaryValue("uBlogsyDicPaginationNewer") > } - + @Html.Partial("uBlogsy/Post/uBlogsyPostShowPost", new ViewDataDictionary(ViewData) { {"Node", Model.Content }, { "UseAddthis", true }, { "GravatarSize", 50 } }) - - + + @*list of related posts*@ @Html.Partial("uBlogsy/Post/uBlogsyPostListRelatedPosts", new ViewDataDictionary(ViewData) { { "Node", Model.Content }, { "ItemLimit", 5 }, { "MatchCount", 1 }, { "RelatedAlias", string.Empty } }) - + @*list comments - install uCommentsy, then uncomment this line*@ @try @@ -1201,7 +1221,7 @@ e.g Mid-code Crisis @Html.Partial("uCommentsy/uCommentsyListComments", new ViewDataDictionary(ViewData) { { "ItemLimit", -1 } }) } catch (Exception) { } - + @*render contact form - install uCommentsy, then uncomment this line**@ @try { @@ -1307,25 +1327,25 @@ e.g Mid-code Crisis } @section uBlogsyHead -{ +{ } @section uBlogsyMain { -
+

@Umbraco.Field("uBlogsyContentTitle")

- +
@Umbraco.Field("uBlogsyContentBody")
- + @* list posts for home - this only works if the home page is a parent, or sibling of uBlogsyLanding *@ - @Html.CachedPartial("uBlogsy/Widgets/uBlogsyWidgetListPostsForHome", Model, 0, false, true, new ViewDataDictionary(ViewData) { { "ItemLimit", 5 } }) + @Html.CachedPartial("uBlogsy/Widgets/uBlogsyWidgetListPostsForHome", Model, 0, false, true, new ViewDataDictionary(ViewData) { { "ItemLimit", 5 } })
} @@ -1353,18 +1373,18 @@ e.g Mid-code Crisis uBlogsy [uBlogsy] Show Some Love + 91AD32D5-7381-4C5A-BD03-97F3CE2511D2 uBlogsyShowSomeLove Unknown @@ -1695,56 +1716,56 @@ e.g Mid-code Crisis - + - + > - + > - + > - + > - + - + > - + > - + - + - + - + - + - + - + - + - + - + diff --git a/src/Umbraco.Web.BackOffice/Controllers/PackageController.cs b/src/Umbraco.Web.BackOffice/Controllers/PackageController.cs index 66eba2d631..6395237ca9 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/PackageController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/PackageController.cs @@ -29,16 +29,13 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers [Authorize(Policy = AuthorizationPolicies.SectionAccessPackages)] public class PackageController : UmbracoAuthorizedJsonController { - private readonly IHostingEnvironment _hostingEnvironment; private readonly IPackagingService _packagingService; private readonly IBackOfficeSecurityAccessor _backofficeSecurityAccessor; public PackageController( - IHostingEnvironment hostingEnvironment, IPackagingService packagingService, IBackOfficeSecurityAccessor backofficeSecurityAccessor) { - _hostingEnvironment = hostingEnvironment ?? throw new ArgumentNullException(nameof(hostingEnvironment)); _packagingService = packagingService ?? throw new ArgumentNullException(nameof(packagingService)); _backofficeSecurityAccessor = backofficeSecurityAccessor ?? throw new ArgumentNullException(nameof(backofficeSecurityAccessor)); }