Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Paul Sørensen 304 posts 650 karma points
    Dec 08, 2012 @ 01:15
    Paul Sørensen
    0

    RenderTemplate(pageId) fails after upgrading to 4.11 - from 4.7

    Hi

    In the mail module from Nibble I call umbraco.library.RenderTemplate(pageId) in a dialog and it has worked fine until I upgraded to 4.11 - now it fails with a nullreference exception. I downloaded the source and found the problem

    In the TemplateRenderer.cs - in the Render method I found it necessary to test for null like this

    //set the culture to the same as is currently rendering
    if (_umbracoContext.PublishedContentRequest != null)
    contentRequest.Culture = _umbracoContext.PublishedContentRequest.Culture;

    The problem occurs because this test is not done in the current version

    Does anyone knows why this has become necessary and perhaps how I can avoid having to do the change

    thanks

    PaulS

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Dec 08, 2012 @ 13:54
    Jeroen Breuer
    0

    Perhaps it has something to do with the new MVC render engine in 4.11. You can check the file's history in mercurial. Perhaps in the comments you can see why it's done. Might be good to report this on http://issues.umbraco.org

    Jeroen

  • Paul Sørensen 304 posts 650 karma points
    Dec 08, 2012 @ 16:19
    Paul Sørensen
    0

    Hi

    It appears to have been rewritten. I have created an issue

    thanks

    Paul S

Please Sign in or register to post replies

Write your reply to:

Draft