Copied to clipboard

Flag this post as spam?

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


  • Daniel 6 posts 75 karma points
    Aug 25, 2015 @ 03:01
    Daniel
    0

    Analytics not working

    Hi

    I have installed the Analytics package with Umbraco 7.1.6 and I'm getting an error when opening the Analytics tab.

    The site uses Autofac is there something I need to register to get this plugin to work?

    "Message":"An error has occurred.","ExceptionMessage":"Object reference not set to an instance of an object.","ExceptionType":"System.NullReferenceException","StackTrace":" at Umbraco.Web.Trees.ApplicationTreeExtensions.TryLoadFromControllerTree(ApplicationTree appTree, String id, FormDataCollection formCollection, HttpControllerContext controllerContext)\r\n at Umbraco.Web.Trees.ApplicationTreeController.

  • Daniel 6 posts 75 karma points
    Aug 25, 2015 @ 03:24
    Daniel
    0

    Found the solution:

    Add this to your autofac setup:

    builder.RegisterAssemblyTypes(typeof(Analytics.Controllers.AnalyticsTreeController).Assembly).Where(t => !t.IsAbstract && typeof(ApiController).IsAssignableFrom(t)).InstancePerMatchingLifetimeScope(AutofacWebApiDependencyResolver.ApiRequestTag);

    Now Analytics is working with autofac.

Please Sign in or register to post replies

Write your reply to:

Draft