Copied to clipboard

Flag this post as spam?

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


  • Yasir Butt 161 posts 371 karma points
    Dec 04, 2013 @ 23:48
    Yasir Butt
    0

    Error: Object reference not set to an instance of an object. V 7

    Hi,

    I know that it is compatiable with v 6. i tried with v6 and its works.

    I am developing a small site in v 7 and i need search function. ezSearch installed perfectly but i am getting error on rendering the Macro.

    Your help will be highly appreciated.

    Below is the Stack Trace

    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.cms.businesslogic.macro.MacroModel..ctor(Macro m) +465
       umbraco.macro..ctor(String alias) +301
       Umbraco.Web.UmbracoHelper.RenderMacro(String alias, IDictionary`2 parameters, page umbracoPage) +81
       ASP._Page_Views_ezSearch_cshtml.Execute() in c:\inetpub\wwwroot\osteopati\osteopati.web\Views\ezSearch.cshtml:7
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +279
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +125
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +180
       Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +139
       System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +377
       System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +32
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +265
       System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +854224
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__19() +40
       System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +15
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +65
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +51
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +51
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Dec 05, 2013 @ 09:29
    Matt Brailsford
    0

    Hi Yasir,

    Spent a bit of time looking into this this morning. It was a weird one, but it seems it boils down to the fact that in v7 there is no longer a media picker macro parameter type like there was in v6. A simple fix for now is to go in to the macro editor for ezSearch and set the "type" dropdown for "rootMediaNodeId" to "Numeric" then hit save (this means you'll have to know the root media nodes id if you want to set this rather than using a media picker, but it seems to be the only option for now). Once you've done this, ezSearch should then work again.

    I'll go register this as an issue on the issue tracker for Umbraco, but this should hopefully fix your issue for the time being.

    Many thanks

    Matt

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Dec 05, 2013 @ 09:33
    Matt Brailsford
    0

    Hi Yasir,

    For your reference, I've raised an Umbraco issue here:

    http://issues.umbraco.org/issue/U4-3796

    Many thanks

    Matt

  • Yasir Butt 161 posts 371 karma points
    Dec 05, 2013 @ 12:07
    Yasir Butt
    0

    Hi Matt,

     

    Thanks for help.

    Yes it was the parameter problem. No media picker's parameter exists in Umbraco 7.

    Your rsolution is working.

    Yasir

Please Sign in or register to post replies

Write your reply to:

Draft