From 6fe647146c6126a425f79fe346a50a0c17b003c2 Mon Sep 17 00:00:00 2001 From: Shannon Date: Mon, 11 Nov 2013 12:23:46 +1100 Subject: [PATCH] Fixes: U4-3431 Macro property not passed to ASCX usercontrol --- src/umbraco.cms/businesslogic/macro/MacroProperty.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/umbraco.cms/businesslogic/macro/MacroProperty.cs b/src/umbraco.cms/businesslogic/macro/MacroProperty.cs index 729008cd18..3535104063 100644 --- a/src/umbraco.cms/businesslogic/macro/MacroProperty.cs +++ b/src/umbraco.cms/businesslogic/macro/MacroProperty.cs @@ -101,8 +101,15 @@ namespace umbraco.cms.businesslogic.macro Alias = ParameterEditorAlias, Id = 0, Assembly = found.GetType().Namespace, - BaseType = found.GetType().Name, - Type = "String" + //NOTE: In v6 macro parameter's stored in the database used to + // expose a CLR type but we no longer support that, instead we'll just attempt + // to convert the value to the CLR type - It's also important to note that the + // ONLY place this BaseType is ever used is to assign to the umbraco.cms.businesslogic.macro.MacroPropertyModel.CLRType + // property, which is then used when attempting to render a UserControl macro. So basically + // it is completely pointless since we already know the CLR property type of the UserControl + // property and we're just going to do the conversion anyways since it is always essentially a string. + BaseType = "String", + Type = found.GetType().Name }; _type = type; }