We are getting errors from a custom macro that we created.
As soon as the macro is initiated there is value, however we are getting null errors in the event logs. The macro is a simple boolean flag (0 = false, 1 = true) and we are returning the value as string.We are using the macro in the visible section in multiple webparts to either hide or show it based on the flag for our users.{% FMacros.GetFlag() != @True@ #%}
When this macro is executed, the user has already authenticated and they will have all the data to successfully run the macro. So the value should return either @true@ or @false@. In my dev environment I can't replicate the errors. Bellow is the error. Error while evaluating expression: FMacros.GetFlag() != @True@
System.NullReferenceException: Object reference not set to an instance of an object.at (Macro Location)
at SessionMacroContainer.GetVoterConfidentailFlag(EvaluationContext context, Object[] parameters)
at CMS.MacroEngine.ExpressionEvaluator.ExecuteMethod(IMacroMethod method, IEnumerable`1 parameters)
at CMS.MacroEngine.ExpressionEvaluator.EvaluateMethodCall(Boolean@ match, Boolean@ securityPassed)
at CMS.MacroEngine.ExpressionEvaluator.EvaluateInternal(Boolean@ match, Boolean@ securityPassed)
at CMS.MacroEngine.ExpressionEvaluator.EvaluateEquality(Boolean@ match, Boolean@ securityPassed
at CMS.MacroEngine.ExpressionEvaluator.EvaluateInternal(Boolean@ match, Boolean@ securityPassed)
at CMS.MacroEngine.ExpressionEvaluator.Evaluate()
at CMS.MacroEngine.MacroResolver.ResolveMacroExpression(ResolveExpressionSettings settings)
Thanks much!
↧