U4-4853 - Richtext Editor doesn't render macros after upgrade to Umbraco 6.2.0

Created by Sören Deger 09 May 2014, 11:58:47 Updated by Scott Leslie 06 Aug 2014, 23:27:12

Hello,

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 [7] 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)

Post from our.umbraco.org: http://our.umbraco.org/forum/developers/razor/52696-Richtext-Editor-doesnt-render-macros-after-upgrade-to-Umbraco-62?p=0#comment183277

Comments

Shannon Deminick 13 May 2014, 05:00:14

I can replicate this, fixing now


Shannon Deminick 13 May 2014, 05:07:37

As far as i can tell, this issue would have started with this commit:

https://github.com/Umbraco/Umbraco-CMS/commit/77777c8007535edef3f9f513d806adac2917bc52

which states that it was a fix for this commit:

https://github.com/Umbraco/Umbraco-CMS/commit/e775421

but there are no issue numbers associated so not sure. The issue comes down to this line:

https://github.com/Umbraco/Umbraco-CMS/commit/77777c8007535edef3f9f513d806adac2917bc52#diff-791aaeabad722baa4c696ef604371fe0R548

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.


Shannon Deminick 13 May 2014, 05:20:00

Fixed in rev: 78613823aebf4dbfb384b49444562304bef2c5b3


Priority: Major

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.2.0

Due in version: 6.2.1

Sprint:

Story Points:

Cycle: