We have moved to GitHub Issues
Created by Jeroen Breuer 29 Nov 2012, 22:32:53 Updated by Sebastiaan Janssen 17 Jan 2013, 10:13:10
Sorry I'm not sure how I did it, but I'm getting a StackOverflowException. I have a documenttype, node, template and partial view all with the same name. Somehow this gives the StackOverflowException. Probably because it's causing an infinite loop.
The partial view is in the /Views/Partials folder.
The error seems to happen when I call my partial view:
When I rename my partial view the error goes away.
It probably works if you do @Html.Partial("Partials/Gallery1") I guess it's trying to load the Gallery1 view in the 'Views' folder instead of the partial.
Based on https://github.com/Shandem/Umbraco4Docs/blob/4.8.0/Documentation/Reference/Mvc/partial-views.md i would say it's a bug indeed
At the moment the RenderViewEngine looks for ~/Views/Gallery1.cshtml before ~/Views/Partials/Gallery1.cshtml. The funny thing is that Shannon's done things the other way round in the PluginViewEngine, which looks first in Partials. I see what needs to be changed but I first would like Shannon's word on it.
That's in Umbraco.Web.Mvc.RenderViewEngine.cs:19
I've run into this problem too. If a view or partial view calls itself recursively it'll do so until it runs off the stack. This was a wake-up call, as our naming conventions never had this architecture in mind. We just renamed the partial view and all is well.
Assignee: Shannon Deminick
Backwards Compatible: False
Affected versions: 4.10.0, 4.11.0, 4.11.1
Due in version: 6.0.0