2
Vote

Property alias "PostDate" doesn't follow Umbraco Safe Aliases conventions

description

If you have the parameter ForceSafeAliases set to true in umbracoSettings.config (which is the default configuration) the property alias "PostDate" is not allowed. It seems like the uppercase "P" in the beginning is not considered a safa alias name. Still if you look in the source code for blog for umbraco 4 -> BlogDateFolder.cs you see that it's looking for a property named "PostDate".
 
When you install the blog package in Umbraco (4.7.1) I don't think there are any problems since the validation is not executed when installing a package. So the property is named "PostDate" and it works. But I (unknowingly) changed the property name to "postDate" and discovered that the datefolder functionality stopped working when I changed the name. So I looked at the class and saw that it depended on an unchanged property alias. I then tried to change it back to "PostDate" only to discover I couldn't because Umbracos SafeAliases validation kicked in and stopped me.
 
There is a way around this, but you have to set <ForceSafeAliases>false</ForceSafeAliases> in umbracoSettings.config and then set <clientDependency version="2"> in ClientDepencency.config (in order to flush the javascript validation cache).
 
You should consider renaming this property so it follows the Safe Aliases conventions.

comments