Copied to clipboard

Flag this post as spam?

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


  • Damian Green 452 posts 1433 karma points
    Aug 02, 2013 @ 13:24
    Damian Green
    0

    Mini Profiler not showing in 6.1.3

    I have:

     

    • A full clean install of 6.1.3
    • enabled debug mode
    • added umbDebug=true to my query string 
    and im not getting any mini profiler output to the page.
    Any ideas what could be stoping it been output?
    Just though - I am using a custom surface controller for a contact form.  Does that matter? Would i still get output?
    Thanks
    Damian

     

  • Damian Green 452 posts 1433 karma points
    Aug 02, 2013 @ 13:38
    Damian Green
    0

    Dont get anything output from a standard umbraco page either.

     

  • wolulcmit 357 posts 693 karma points
    Aug 02, 2013 @ 13:53
    wolulcmit
    0

    have you tried a few different pages?
    I have the same problem in 6.1.3 in that the mini profiler only seem to show for me on the homepage, so I would have to test a page and then revisit the homepage and look in miniprofilers history to get the info for the previous page.

    not sure if that will help in your situation or not but maybe give it a try?

    - Tim

  • Damian Green 452 posts 1433 karma points
    Aug 02, 2013 @ 14:05
    Damian Green
    0

    Yep - tried a few pages. Homepage, an basic page and a custom surface controller page on a partial and nothing. :(

    Something i have noticed is if i attempt to do a post from the page and i have the debug querystring item and the profiler enabled  I get a RTE:

    I dont get this if i remove the dbug. So it looks like it is doing somethign with the profiler.

    Object reference not set to an instance of an object.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace: 

    [NullReferenceException: Object reference not set to an instance of an object.]
       StackExchange.Profiling.MVCHelpers.ProfilingActionFilter.OnActionExecuting(ActionExecutingContext filterContext) in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\MVCHelpers\ProfilingActionFilter.cs:40
       System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +41
       System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +21
       System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +253
       System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +21
       System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +191
       System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +324
       System.Web.Mvc.Controller.ExecuteCore() +106
  • Tor-Erik Klausen 12 posts 44 karma points
    Aug 12, 2013 @ 17:24
    Tor-Erik Klausen
    1

    Are your View inheriting from UmbracoTemplatePage? I had the same problem and the Mini Profiler suddenly appeared when I added

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    

    to my _Layout.cshtml (the layout file used by my other views).

    Normally I keep a clean layout file without any references to Umbraco, and that caused my problems.

  • andrew shearer 506 posts 653 karma points
    Aug 15, 2013 @ 08:57
    andrew shearer
    0

    I just came to the forum to ask the same question.

    +1 for the _Layout.cshtml fix suggested above.

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Sep 12, 2013 @ 20:38
    Nicholas Westby
    1

    I was able to get this working in Umbraco 6.1.3 without changing what I inherit my view from. Just added this just before the closing body tag: 

    @Html.RenderProfiler()

    I found that in the Umbraco source code: https://github.com/umbraco/Umbraco-CMS/blob/6.2.0/src/Umbraco.Web/Mvc/UmbracoViewPage.cs

    For clarity, this is what my topmost view looks like (with unimportant stuff omitted):

    @using myProject.web.Models.Interfaces
    @inherits Umbraco.Web.Mvc.UmbracoViewPage<IPage>
    @{
      Layout = null;
    }<!DOCTYPE html>
     
    <html>
     <head>
       <!-- Etc. -->
     </head>
     <body>
       <!-- Etc. -->
       @Html.RenderProfiler()
     </body>
    </html>

    IPage is just a custom interface for my custom model.

  • Damian Green 452 posts 1433 karma points
    Mar 10, 2014 @ 11:49
    Damian Green
    100

    Answer for this here.

     

Please Sign in or register to post replies

Write your reply to:

Draft