From 8b553dd0677e8fec3105d46d2ab6fa12f74fc0ae Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 29 Jan 2014 19:30:17 +0100 Subject: [PATCH 1/3] U4-4144 - work around media cache exceptions on invalid properties --- .../XmlPublishedCache/PublishedMediaCache.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs index 6e3449e583..b4acd00889 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs @@ -539,6 +539,26 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache { // use property type to ensure proper conversion var propertyType = _contentType.GetPropertyType(i.Key); + + // note: this is where U4-4144 and -3665 were born + // + // because propertyType is null, the XmlPublishedProperty ctor will throw + // it's null because i.Key is not a valid property alias for the type... + // the alias is case insensitive (verified) so it means it really is not + // a correct alias. + // + // in every cases this is after a ConvertFromXPathNavigator, so it means + // that we get some properties from the XML that are not valid properties. + // no idea which property. could come from the cache in library, could come + // from so many places really. + + // workaround: just ignore that property + if (propertyType == null) + { + LogHelper.Warn("Dropping property \"" + i.Key + "\" because it does not belong to the content type."); + continue; + } + property = new XmlPublishedProperty(propertyType, false, i.Value); // false :: never preview a media } From 3ef51d735764aceccc2f2f714b8ea5682378e652 Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 30 Jan 2014 16:18:06 +0100 Subject: [PATCH 2/3] U4-2317 - issue with domains & languages management --- src/Umbraco.Web/WebServices/DomainsApiController.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web/WebServices/DomainsApiController.cs b/src/Umbraco.Web/WebServices/DomainsApiController.cs index fd53e7ad95..633825ddda 100644 --- a/src/Umbraco.Web/WebServices/DomainsApiController.cs +++ b/src/Umbraco.Web/WebServices/DomainsApiController.cs @@ -61,12 +61,14 @@ namespace Umbraco.Web.WebServices // process domains - foreach (var domain in domains.Where(d => model.Domains.All(m => !m.Name.Equals(d.Name, StringComparison.OrdinalIgnoreCase)))) + // delete every (non-wildcard) domain, that exists in the DB yet is not in the model + foreach (var domain in domains.Where(d => d.IsWildcard == false && model.Domains.All(m => m.Name.Equals(d.Name, StringComparison.OrdinalIgnoreCase) == false))) domain.Delete(); var names = new List(); - foreach (var domainModel in model.Domains.Where(m => !string.IsNullOrWhiteSpace(m.Name))) + // create or update domains in the model + foreach (var domainModel in model.Domains.Where(m => string.IsNullOrWhiteSpace(m.Name) == false)) { language = languages.FirstOrDefault(l => l.id == domainModel.Lang); if (language == null) @@ -87,7 +89,7 @@ namespace Umbraco.Web.WebServices Domain.MakeNew(name, model.NodeId, domainModel.Lang); } - model.Valid = model.Domains.All(m => !m.Duplicate); + model.Valid = model.Domains.All(m => m.Duplicate == false); return model; } From 3a513668fd85dc434321af4d62c9bfe68f24d1b2 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 5 Feb 2014 15:52:20 +0100 Subject: [PATCH 3/3] U4-4185 Log fails to show unicode (cyrillic) characters --- .../config/log4net.Release.config | 35 ++++++++++--------- src/Umbraco.Web.UI/config/log4net.config | 33 ++++++++--------- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/src/Umbraco.Web.UI/config/log4net.Release.config b/src/Umbraco.Web.UI/config/log4net.Release.config index dd9a5e4629..384124e719 100644 --- a/src/Umbraco.Web.UI/config/log4net.Release.config +++ b/src/Umbraco.Web.UI/config/log4net.Release.config @@ -1,25 +1,26 @@ - - - - + + + + - - - + - - - - - - - - - - + + + + + + + + + + + diff --git a/src/Umbraco.Web.UI/config/log4net.config b/src/Umbraco.Web.UI/config/log4net.config index cf73f9afee..10808bb091 100644 --- a/src/Umbraco.Web.UI/config/log4net.config +++ b/src/Umbraco.Web.UI/config/log4net.config @@ -1,25 +1,26 @@ - - - - + + + + - - + - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file