U4-3117 - Nesting Nodes with Macros and StackOverflow Exception

Created by Nikolay Arhangelov 11 Oct 2013, 15:05:10 Updated by Shannon Deminick 21 Jun 2017, 07:58:15

Create a macro, which renders the children content of its node as tabs. The partial view of the macro: foreach (var node in Model.Content.Children) { }

Now create the following nodes: *Node 1 **Node 11 ***Node 111

Add the tabs macro to nodes Node 1 and Node 11.

'''The code will cause a StackOverflowException to occur - after several such exceptions, IIS will terminate the app pool.'''

The issue is caused by the fact that Model.Content is the page '''being browsed''', not the page '''containing the macro'''. That's why the code of above will recursively repeat until stack overflow.


Shannon Deminick 21 Jun 2017, 07:58:15

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/

Priority: Normal

Type: Bug

State: Closed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:


Story Points: