Macro only executes for admin users (7.0.83 hotfix)

Greg Ennis asked on April 28, 2014 19:53

We just upgraded our Kentico install from v46 (I think) to v7.0.83.

Everything went OK except one thing has broken and I cannot figure it out. We have a custom form layout with a macro like this:

{% Documents["/Fundraising/Fundraising-Items"].Children.WithAllData.ApplyTransformation("kkd.FundraisingItem.FundraisingProducts") #%}

This was working fine in the old version of Kentico, but now it only executes correctly for users who are logged in and have admin privileges (apparently, not sure exactly what it is, but something to do with elevated permissions).

The event log shows an error that doesn't make sense to me. It is a parser error. Why would a macro fail to parse correctly for different users? The error is:

Unable to process the element ' Documents[''<- on index 11 (ErrorUnknown)

Notice how it fails on the quote character. And notice it is a single quote character - why is that? I want to use a double quote. I noticed in the source for the form layout it changes the quote to " but there seems to be nothing I can do about it and anyway it worked fine in prior hotfix version.

Please help! I am dead in the water on this issue. Here is the full event log info:

Event ID: 58524 Event type: Error Event time: 4/29/2014 12:29:33 AM Source: MacroResolver Event code: RESOLVEDATAMACRO User name: --- IP address: ---

Description: Error while evaluating expression: Documents["/Fundraising/Fundraising-Items"].Children.WithAllData.ApplyTransformation("kkd.FundraisingItem.FundraisingProducts")|(user)krispyUser|(hash)0ba87bcbb67c17f393cd12fa0d2693ee6c42ccfc9dc92af8373b62b2fb948437 [MacroElement.ParseNext]: Unable to process the element ' Documents[''<- on index 11 (ErrorUnknown) at CMS.GlobalHelper.MacroElement.ParseNext(String expression, Int32& index, Boolean supressError, Boolean isParamValue) at CMS.GlobalHelper.MacroElement.ParseExpression(String expression, Boolean supressError) at CMS.GlobalHelper.MacroResolver.ResolveDataMacro(String expression, Object& result, Boolean& match, Boolean keepObjectsAsResult, Boolean& securityCheckPassed, Boolean& doNotResolve, Boolean skipSecurityCheck)

Recent Answers

Greg Ennis answered on April 28, 2014 20:19 (last edited on April 28, 2014 20:19)

I found the solution with this magic web.config setting:

<add key="CMSCheckPermissionsForDocumentCollection" value="false"/>
2 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.