UmbracoHelper.RenderTemplate infinite loop in 4.11.10
Hey there,
I've upgraded a 4.7.2 webforms solution to 4.11.10 (still webforms), and everything but the front page is working fine... After experiencing and reading about this bug: http://issues.umbraco.org/issue/U4-1174 I changed my code to use UmbracoHelper.RenderTemplate instead of umbraco.library.RenderTemplate - but to no avail???
The front page crashes the w3wp.exe just as described in the issue report. Debugging goes fine until I hit a RenderTemplate usage, in which case it just starts over - and it only happens on the front page, so I'm pretty sure this is the same issue.
Here's a bit of example code (not pretty, and you can tell I've been debugging and trying things like crazy):
<% foreach (var nodeId in CurrentSubContent.WidgetsLeft) { Node x = new Node(nodeId); if (x.Id != 0 && x.Id != CurrentSubContent.Id) { %> <%= Helper.RenderTemplate(x.Id).ToHtmlString() %> <% } } %>
Could this bug have been reintroduced in later 4.11 versions? We're using lots of uSiteBuilder functionality, so any further upgrades are not in the pipeline (maybe until uSiteBuilder supports v6/v7).
Well, I don't think it makes sense :-) The code works fine in 4.7.2.
CurrentSubContent is basically the current node (wrapped in an object that inherits from the uSiteBuilder TemplateBase).
WidgetsLeft returns a list of node id's ( List<NodeId> ), where NodeId is just a custom struct.
My comparison of id's happens after I've created a new Node object (x), which makes the comparison valid, the way I see it. The latter comparison with CurrentSubContent.Id is only there because of my debugging efforts (because naturally, rendering the template you're already rendering would create an infinite loop).
Turns out I'm the schmuck anyways. I mysteriously overlooked one (ONE!) usage of the old TemplateHandler.RenderTemplate method, which happened to be used only on the front page.
UmbracoHelper.RenderTemplate infinite loop in 4.11.10
Hey there,
I've upgraded a 4.7.2 webforms solution to 4.11.10 (still webforms), and everything but the front page is working fine... After experiencing and reading about this bug: http://issues.umbraco.org/issue/U4-1174 I changed my code to use UmbracoHelper.RenderTemplate instead of umbraco.library.RenderTemplate - but to no avail???
The front page crashes the w3wp.exe just as described in the issue report. Debugging goes fine until I hit a RenderTemplate usage, in which case it just starts over - and it only happens on the front page, so I'm pretty sure this is the same issue.
Here's a bit of example code (not pretty, and you can tell I've been debugging and trying things like crazy):
Could this bug have been reintroduced in later 4.11 versions? We're using lots of uSiteBuilder functionality, so any further upgrades are not in the pipeline (maybe until uSiteBuilder supports v6/v7).
Bump :-s
This does kind of make sense
Can you tell us the type of 'CurrentSubContent.WidgetsLeft'.
It seems that it is a collection but you are using == CurrentSubContent.Id
This feels at first glance to be a code problem rather than a bug. Could be wrong :)
Charlie.
Well, I don't think it makes sense :-) The code works fine in 4.7.2.
CurrentSubContent is basically the current node (wrapped in an object that inherits from the uSiteBuilder TemplateBase).
WidgetsLeft returns a list of node id's ( List<NodeId> ), where NodeId is just a custom struct.
My comparison of id's happens after I've created a new Node object (x), which makes the comparison valid, the way I see it. The latter comparison with CurrentSubContent.Id is only there because of my debugging efforts (because naturally, rendering the template you're already rendering would create an infinite loop).
Turns out I'm the schmuck anyways. I mysteriously overlooked one (ONE!) usage of the old TemplateHandler.RenderTemplate method, which happened to be used only on the front page.
Joke's on me, then.
is working on a reply...