We have moved to GitHub Issues
Created by Sören Deger 09 May 2014, 11:58:47 Updated by Scott Leslie 06 Aug 2014, 23:27:12
I have a lot of macros, which I use in Richtext Editor. This works great in Umbraco 6.1.6. We have upgrade to Umbraco 6.2.0 now and all macros show an "Error loading MacroEngine script" Message in Richtext Editor, but works great in Frontend.
I have insert macros again, save and publish the nodes again, republish entire site and checks if in Macro-Settings "Use in Editor" and "Render Content in Editor" is true. But nothing works...
Log File: 2014-05-09 10:27:12,003  WARN umbraco.macro - [Thread 69] Error loading MacroEngine script (file: ModuleinfÃ¼gen.cshtml, Type: ''. Exception: System.InvalidCastException: Specified cast is not valid. at umbraco.NodeFactory.Node.getCurrentNodeId() at umbraco.macro.GetCurrentNode() at umbraco.macro.loadMacroScript(MacroModel macro) at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
I can replicate this, fixing now
As far as i can tell, this issue would have started with this commit:
which states that it was a fix for this commit:
but there are no issue numbers associated so not sure. The issue comes down to this line:
it is trying to cast to (int) but the pageId that gets put in there is a string, so I'm pretty sure this issue would have existed for some time.
Fixed in rev: 78613823aebf4dbfb384b49444562304bef2c5b3
Assignee: Shannon Deminick
Backwards Compatible: True
Affected versions: 6.2.0
Due in version: 6.2.1