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-c27ed55e791eNewType.sprTreeFolderfolder.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-3c8d47ee3359CompositeTest.sprTreeFolderfolder.png
@@ -43,6 +44,7 @@
Content
+ 1c51fc0a-79f7-4d3f-9174-95a2628505deContent.sprTreeFolderfolder.png
@@ -77,6 +79,7 @@
Meta
+ 0e0ad7de-aff1-4e4b-af8c-85e790669412Meta.sprTreeFolderfolder.png
@@ -121,6 +124,7 @@
SEO
+ cc58b45e-369c-4429-be1b-1b9f7acfd360Seo.sprTreeFolderfolder.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
@@ -26,7 +26,7 @@
-
+ 01
@@ -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.
]]>
-
+ 01
@@ -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.
Now that you know what the Txt Starter Kit is, it is time to get started using Umbraco.
]]>
-
+ 0
-
+ 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.
]]>
-
+ 0Ut 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.
]]>
-
+ 02021-09-20T00:00:00
@@ -115,6 +115,7 @@
Master
+ 111adde6-9741-407e-ab35-b46b53471382umbMasterfolder.giffolder.png
@@ -159,6 +160,7 @@
Home
+ e2f9e463-904a-4c0d-a7f3-f7c9fa31272bumbHomePage.sprTreeSettingDomaindocWithImage.png
@@ -375,6 +377,7 @@
Meta
+ 8adeed0a-489e-4e74-be6e-2e2f219a04a9Metaicon-truckfolder.png
@@ -409,6 +412,7 @@
News Item
+ b43c90ef-f0d4-448e-b2aa-7915b743cab1umbNewsItem.sprTreeDocPicdocWithImage.png
@@ -478,6 +482,7 @@
News Overview
+ a22ca7e7-bdc4-4c3f-9193-b8773664e61dumbNewsOverviewpackage.pngfolder_media.png
@@ -502,6 +507,7 @@
Seo
+ 67f4dfe3-c505-43b9-86a4-6d23481c5e87Seoicon-wififolder.png
@@ -536,6 +542,7 @@
Text Page
+ d8ab5350-3064-487f-92fe-9735c015f631umbTextyPage.sprTreeDocdoc.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-ffa0c7f63f2aMastericon-desktopfolder.png
@@ -1252,6 +1253,7 @@
Blogpost
+ 10dbe2ef-ee50-4ea6-b4d0-dc0c08919424Blogposticon-editfolder.png
@@ -1288,6 +1290,7 @@
Blogpost Repository
+ 7d58f0d9-bfe3-4dfe-be18-9f48cc53c768BlogpostRepository.sprTreeFolderfolder.png
@@ -1306,6 +1309,7 @@
Home
+ 61100eb2-92c7-43d9-9fd8-94707dcbb142Homeicon-homefolder.png
@@ -1328,6 +1332,7 @@
Landing page
+ dd8c9f38-9847-465a-924d-87983fcec124LandingPageicon-stampfolder.png
@@ -1366,6 +1371,7 @@
Text page
+ 8fe738e3-8724-484f-944f-cb0d8fa78aa1TextPageicon-documentfolder.png
@@ -3903,6 +3909,7 @@ nav > ul li.active ul li a {
+ E4F0830F-26AB-4CE9-BD71-98273875C4CBInsert formumbracoforms.RenderForm
@@ -3919,6 +3926,7 @@ nav > ul li.active ul li a {
+ E4F0830F-26AB-4CE9-BD71-98273875C4C0Render Forms Scriptsumbracoforms.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
+ DocTypeErrorMR Basisseite
+ 02e4e119-2eeb-4b92-9880-0c35d66a16b2MRBasePagefolder.giffolder.png
@@ -66,6 +67,7 @@
MR Startseite
+ 4ecde940-89bd-47c2-9c9c-3cfcc32e8e52MRStartPagefolder.giffolder.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-6e5c79a2e2e0Foldericon-foldericon-folder
@@ -28,6 +29,7 @@
Image
+ ee78bb5b-3734-4b86-bd48-d9ca2e6d6846Imageicon-pictureicon-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-6504cc52ced1testfolder.giffolder.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.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur dictum, nisi non gravida blandit, odio nulla ultrices orci, quis blandit tortor libero vitae massa.
@*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 } })