Fixes: U4-1721 V6: Publish of a page ends in YSOD when using legacy schema

This commit is contained in:
Sebastiaan Janssen
2013-02-22 12:36:24 -01:00
parent 8ad8a3239a
commit 596c4ac329

View File

@@ -19,6 +19,14 @@ namespace Umbraco.Core.Models
var xd = new XmlDocument();
XmlNode xmlNode = xd.CreateNode(XmlNodeType.Element, nodeName, "");
//Add the property alias to the legacy schema
if (UmbracoSettings.UseLegacyXmlSchema)
{
var alias = xd.CreateAttribute("alias");
alias.Value = property.Alias.ToSafeAlias();
xmlNode.Attributes.Append(alias);
}
//This seems to fail during testing
xmlNode.AppendChild(property.PropertyType.DataType(property.Id).Data.ToXMl(xd));