Copied to clipboard

Flag this post as spam?

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


  • Peter Cort Larsen 421 posts 1038 karma points
    Jan 07, 2014 @ 20:27
    Peter Cort Larsen
    0

    all razor files went dead

    not good

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Jan 07, 2014 @ 20:36
    Warren Buckley
    0

    Hello Peter
    Can you give me some information please.

    As 'not good' is not helpful for me to help resolve your problem.

    • What version of Umbraco are you running?
    • What version of IIS Running
    • Locally or on a webserver?

    Also when you say - "All Razor files went dead" what do you mean by that?
    Do you get a specific error or what exactly happens please?

    Can you give me some more details or any information in your log files to help me see what the issue is.

    Many Thanks,
    Warren

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 07, 2014 @ 21:24
    Jeavon Leopold
    0

    Hey Warren,

    I have seen DotNetOAuth.dll stop all extension methods on DynamicNode working and therefore cause all Razor macros to fail, this could be the issue. I haven't seen it affect IPublishedContent though.

    If this is the case, them there is a little more info here

    Jeavon

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Jan 07, 2014 @ 21:44
    Warren Buckley
    0

    Hello Jeavon
    We do not use DotNetOAuth dll as far as I am aware (I didn't do the oAuth implementation, it was Anders B)

    I hope Peter comes back & provides a little more info & insight

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 07, 2014 @ 22:47
    Jeavon Leopold
    0

    Absolutely Warren!

  • Peter Cort Larsen 421 posts 1038 karma points
    Jan 09, 2014 @ 10:11
    Peter Cort Larsen
    0

    Hi,

    Sorry for the delay.

    I just tried again installing Analytics.

    Same thing happens.

    All my razor files fails to load.

    We use a umb. 7.01 , Microsoft-IIS/8.5 , Microsoft Windows Server 2008.

    Shared Hosted at unoeuro.com.

    Havent got acces to the event log.

    Umb log dosnt show any problems.

     

    website: vegalandskab.dk

     

    http://vegalandskab.dk/projekter

     

  • Peter Cort Larsen 421 posts 1038 karma points
    Jan 09, 2014 @ 10:20
    Peter Cort Larsen
    0

    Hi, i also get an erro when trying athorize.

    Seems oAuth is used.

    http://www.pcl.dk/oAuth.png

  • Peter Cort Larsen 421 posts 1038 karma points
    Jan 09, 2014 @ 10:21
    Peter Cort Larsen
    0

    When i uninstall the package everything works again.

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Jan 09, 2014 @ 11:49
    Warren Buckley
    0

    Hello Peter,
    Thanks for the information.

    Yes we use oAuth to access your Google Analytics information, but we do not use DotNetOAuth as Jeavon suggests that we may have done. Instead we are using Skybrud.Social from Anders B over at Skybrud in Denmark.

    Do you get any YSODs or error messages when viewing the pages on your website that use the Razor files or do you mean you can not load the razor file into the code editor inside the Umbraco back office?

    Sounds like some compatibility issue somewhere along the line.

    Have you tried the UmbracoDebugShowTrace querystring to show any debug/errors or any other information that may be useful to help debug this issue.

    Thanks
    Warren

  • Peter Cort Larsen 421 posts 1038 karma points
    Jan 09, 2014 @ 11:58
    Peter Cort Larsen
    0

    Hi,

    In page soure it says 'Error loading MacroEngine script (file: FILE.cshtml)'

     

    http://vegalandskab.dk/?umbDebugShowTrace=true, dosnt give anything???

     

    '

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Jan 09, 2014 @ 12:56
    Warren Buckley
    0

    Hi Peter,
    Sorry I forgot in V6+ the querystring for MVC mode to get MiniProfiler to show is ?umbDebug=true

    Take a look at this blog post on MiniProfiler for debugging Umbraco http://umbraco.com/follow-us/blog-archive/2013/5/10/umbraco-610-beta-2-out-now!.aspx

    What database are you running, have you made any changes to Umbraco configuration from the out of the box install at all?

    Trying to figure out where this problem lies.

    Thanks,
    Warren

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Jan 09, 2014 @ 12:58
    Warren Buckley
    0

    Taken from the blog post above:

    To get the profiler to show up, make sure that umbracoDebugMode is set to true in your web.config and then add ?umbDebug=true to your querystring.

  • Peter Cort Larsen 421 posts 1038 karma points
    Jan 09, 2014 @ 15:33
    Peter Cort Larsen
    0

    HI,

    http://vegalandskab.dk/?umbdebug=true   Gives me nothing, and i have added this in the web.config: 

    <add key="umbracoDebugMode" value="true" />

     

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Jan 09, 2014 @ 15:40
    Warren Buckley
    0

    Hi Peter,
    Sounds like something very odd is happening then.

    Can I confirm what version of Umbraco you are using, along with what database please?

  • Comment author was deleted

    Jan 09, 2014 @ 16:06

    Make sure you are running v7, since the package only works on that :) @Peter can you tell us the version? You can see it if you click the about box or it's also stored in the web.config

  • Peter Cort Larsen 421 posts 1038 karma points
    Jan 09, 2014 @ 17:07
    Peter Cort Larsen
    0

    Its 7.0.1 and sql 2008

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Jan 09, 2014 @ 21:49
    Warren Buckley
    0

    Thanks Peter,
    I am really stumped on why you are getting these problems.

    However it's also odd that you cannot load the debug information aka MiniProfiler from the debug querystring.

    Can you do this once the package is uninstalled/removed & your razor files load back again normally?

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 09, 2014 @ 21:57
    Jeavon Leopold
    0

    It might be worth trying a try/catch around your Razor to at least get a clue, something like:

    @inherits umbraco.MacroEngines.DynamicNodeContext
    @using umbraco.BusinessLogic
    @{
        try
        {
        //do stuff
        }
       catch (Exception e)
        {
            <div style="color:red">@e.Message</div>
        }
    
    }
    
  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 09, 2014 @ 22:32
    Jeavon Leopold
    0

    I have been able to replicate, seems to be exactly the same effect as what happens with DotNetOAuth.dll in that all DynamicNode extensions seem to be dead.

    E.g.

    This works:

    @{
    var a = Model.AncestorOrSelf(1).Descendants();
    
        foreach(var b in a){
            <p>@b.Name</p>
        }
    }
    

    But this breaks:

    @{
    var a = Model.AncestorOrSelf(1).Descendants().Random(2);
    
        foreach(var b in a){
            <p>@b.Name</p>
        }
    }
    

    I'll see if I can work out which assembly is causing this bizarre issue.

    Of course a easy workaround maybe to use a Macro Partial View instead of a Legacy Razor Macro.

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Jan 09, 2014 @ 23:02
    Warren Buckley
    0

    Hi Jeavon,
    Thanks for the investigative work, it is really appreciated it as this was starting to bug me what the cause could be.

    I can get in touch with Anders B from SkyBrud who implemented the oAuth stuff to see if he can shed any light on the matter.

    @Pete I would agree with Jeavon and recommend that as you are running a site on Umbraco V7 that you write your Razor in a Macro Partial View, Partial View or even the view itself depending on your needs, as Jeavon mentioned the legacy way is outdated I would expect in the future that the Umbraco core team will no longer support it and may stop working all together so now would be a good time to start learning personally.

  • Anders Bjerner 487 posts 2990 karma points MVP 8x admin c-trib
    Jan 09, 2014 @ 23:16
    Anders Bjerner
    0

    Jeavon, can you shed some light on how to reproduce? Is it just 7.0.1 or also 7.0?

    Anyways - the package contains a number of Google DLLs that are actually not needed since my framework Skybrud.Social takes care of all the OAuth and API communication.

    The Google DLLs also have some OAuth stuff similar to DotNetOAuth, so perhaps that what's triggering the errors.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 09, 2014 @ 23:22
    Jeavon Leopold
    0

    Hi Warren,

    No worries, this issue drove me crazy when we had a very similar issue in Optimus.

    I actually had to disable the following 3 assemblies to resolve the issue.

    • Google.Apis.Auth.dll
    • Google.Apis.Auth.Mvc4.dll
    • Google.Apis.dll

    With Optimus this same issue was caused by WebGrease.dll, thankfully we found that upgrading WebGrease from v1.3 to v1.5 resolved the issue. I suspect that somewhere someone also has a class called DynamicNode in these assemblies.

    I notice that the Google.Apis.x.dll assemblies are v1.6 and could be updated to v1.7, that might be worth trying.

    Hope that's all helpful.

    Fundamentally in v7 I would recommend that @Peter convert to using Partial View Macros for WebForms templates (it actually doesn't take very long) or pure MVC templating where thankfully this issue doesn't seem to occur and there are many improvements in IPublishedContent over DynamicNode worth having!

    Jeavon

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 09, 2014 @ 23:26
    Jeavon Leopold
    100

    Hi Anders,

    If you create a simple Legacy Razor Macro with the below code you will see the issue (it's the .Random extension method or any other extension method which kills it)

    @{
    var a = Model.AncestorOrSelf(1).Descendants().Random(2);
    
        foreach(var b in a){
            <p>@b.Name</p>
        }
    }
    

    Now, if you delete Google.Apis.Auth.dll, Google.Apis.Auth.Mvc4.dll & Google.Apis.dll the issue will be gone and the Macro will render.

    Jeavon

  • Anders Bjerner 487 posts 2990 karma points MVP 8x admin c-trib
    Jan 09, 2014 @ 23:50
    Anders Bjerner
    1

    Thanks Jeavon. The Google DLLs are actually not needed - they're just leftovers that shouldn't be in the package. I have now removed them from the GitHub repository, and Warren will upload a new package tomorrow with only the DLLs that are needed (Analytics.dll and Skybrud.Social.dll).

    Info about the commit here: https://github.com/warrenbuckley/Analytics/commit/afbe3ef3cb4b89ad99aaab88fdf0c15e28ca281d

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 10, 2014 @ 00:16
    Jeavon Leopold
    0

    Awesome, that should solve the issue :-)

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Jan 10, 2014 @ 11:23
    Warren Buckley
    1

    Hello all,
    Thanks for finding the issues guys.

    I have created a 1.0.1 package that contains only the DLLs we require & have remove those pesky Google.* DLLs

    Thanks,
    Warren

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jan 10, 2014 @ 11:33
    Jeavon Leopold
    0

    Good work Warren, I have just confirmed that the pesky issue is resolved!

Please Sign in or register to post replies

Write your reply to:

Draft