From 51f46cf87194f44a3a667c72e75f390f8bf14303 Mon Sep 17 00:00:00 2001 From: Morten Christensen Date: Mon, 20 Jan 2014 10:37:46 +0100 Subject: [PATCH 1/2] Not raising export events for content/media ToXml extension for the time being --- src/Umbraco.Core/Models/ContentExtensions.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Core/Models/ContentExtensions.cs b/src/Umbraco.Core/Models/ContentExtensions.cs index 49d62db1bf..3715b1468f 100644 --- a/src/Umbraco.Core/Models/ContentExtensions.cs +++ b/src/Umbraco.Core/Models/ContentExtensions.cs @@ -618,7 +618,7 @@ namespace Umbraco.Core.Models /// Xml representation of the passed in internal static XElement ToDeepXml(this IContent content) { - return ApplicationContext.Current.Services.PackagingService.Export(content, true); + return ApplicationContext.Current.Services.PackagingService.Export(content, true, raiseEvents: false); } /// @@ -628,7 +628,7 @@ namespace Umbraco.Core.Models /// Xml representation of the passed in public static XElement ToXml(this IContent content) { - return ApplicationContext.Current.Services.PackagingService.Export(content); + return ApplicationContext.Current.Services.PackagingService.Export(content, raiseEvents: false); } /// @@ -638,7 +638,7 @@ namespace Umbraco.Core.Models /// Xml representation of the passed in public static XElement ToXml(this IMedia media) { - return ApplicationContext.Current.Services.PackagingService.Export(media); + return ApplicationContext.Current.Services.PackagingService.Export(media, raiseEvents: false); } /// @@ -648,7 +648,7 @@ namespace Umbraco.Core.Models /// Xml representation of the passed in internal static XElement ToDeepXml(this IMedia media) { - return ApplicationContext.Current.Services.PackagingService.Export(media, true); + return ApplicationContext.Current.Services.PackagingService.Export(media, true, raiseEvents: false); } /// From 10a4eb3ddc4775d575648cd6d6f3878a8f3fd0eb Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Mon, 20 Jan 2014 12:02:52 +0100 Subject: [PATCH 2/2] Fix Duplicate attribute YSOD (key was already added in the base class) --- src/Umbraco.Core/Services/PackagingService.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Umbraco.Core/Services/PackagingService.cs b/src/Umbraco.Core/Services/PackagingService.cs index 851420fa61..92b44e8d3e 100644 --- a/src/Umbraco.Core/Services/PackagingService.cs +++ b/src/Umbraco.Core/Services/PackagingService.cs @@ -1345,7 +1345,6 @@ namespace Umbraco.Core.Services xml.Add(new XAttribute("loginName", member.Username)); xml.Add(new XAttribute("email", member.Email)); - xml.Add(new XAttribute("key", member.Key)); return xml; }