Copied to clipboard

Flag this post as spam?

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


  • Deepak 16 posts 36 karma points
    Sep 16, 2015 @ 11:30
    Deepak
    0

    Error loading Razor Script

    Hello All,

    I am using umbraco version v 4.9.0. I have used Macros in many pages. Sometime I am getting below error randomly :

    "Error loading Razor Script "

    When I refresh the page then it will not happen again. Also I didn't see any error log in [dbo].[umbracoLog] table.

    Is someone have idea of razor script error? Or where I can see error log for this ?

    Thanks in Advance

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Sep 16, 2015 @ 12:50
    Alex Skrypnyk
    0

    Hi Deepak,

    Are you using Razor script ? Do you know which razor file cause this error?

    Thanks, Alex

    https://ua.linkedin.com/pub/alexander-skripnik/66/60b/352

  • Deepak 16 posts 36 karma points
    Sep 17, 2015 @ 05:13
    Deepak
    0

    Hi Alex,

    Thanks for your reply.

    Yes, I am using razor script. There are few razor files which throw errors randomly.

    I am working on maintenance project and it seems there are commented added like below, I am not sure this was the issue. Please advise

    try{
         @*get the URL XML value of the page image*@
                imgLink = d.GetPropertyValue("mastHead").ToString();
        @*Change value to XML string *@
                xml = @Library.ToDynamicXml(imgLink);
        @*turn xml from DAMP into string*@
                storedValue = d.GetPropertyValue("mastHead").ToString();
        @*extract image name and url from DAMP string*@
                imageString = XDocument.Parse(storedValue).Descendants("umbracoFile").FirstOrDefault().Value.Replace(" ", "%20");
        }
        catch
        {
        }
    
Please Sign in or register to post replies

Write your reply to:

Draft