Copied to clipboard

Flag this post as spam?

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


  • Blue299 12 posts 71 karma points
    Jul 07, 2015 @ 18:40
    Blue299
    0

    Upgrade from 7.5 to 7.3.0

    I upgraded from 7.2.5 to 7.30 and when I try to view content within the public facing site I'm getting Object reference errors within my razor templates in places like...

    @Umbraco.Fied("title")

    Any ideas?

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Jul 07, 2015 @ 20:11
    Nicholas Westby
    0

    Do you mean you upgraded from Umbraco 7.2.5? Also, can you paste in a stack trace?

  • Blue299 12 posts 71 karma points
    Jul 07, 2015 @ 20:23
    Blue299
    0

    Yes, you're correct. I can't even get 7.3.0 to install using the custom installer(sql server over sqlce).

    [NullReferenceException: Object reference not set to an instance of an object.] Umbraco.Web.UmbracoHelper.Field(String fieldAlias, String altFieldAlias, String altText, String insertBefore, String insertAfter, Boolean recursive, Boolean convertLineBreaks, Boolean removeParagraphTags, RenderFieldCaseType casing, RenderFieldEncodingType encoding, Boolean formatAsDate, Boolean formatAsDateWithTime, String formatAsDateWithTimeSeparator) +113 ASP.PageViewsMasterViewcshtml.Execute() in k:\Projects\Acch\h.ERN.ERN.Web.Beta\Views\MasterView.cshtml:12 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +97 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +88 System.Web.WebPages.<>cDisplayClass7.6(TextWriter writer) +233 System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +10 System.Web.WebPages.WebPageBase.Write(HelperResult result) +71 System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action1 body) +64 System.Web.WebPages.WebPageBase.PopContext() +246 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +95 System.Web.WebPages.<>c__DisplayClass7.<RenderPageCore>b__6(TextWriter writer) +233 System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +10 System.Web.WebPages.WebPageBase.Write(HelperResult result) +71 System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action1 body) +64 System.Web.WebPages.WebPageBase.PopContext() +246 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +95 System.Web.WebPages.<>cDisplayClass7.6(TextWriter writer) +233 System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +10 System.Web.WebPages.WebPageBase.Write(HelperResult result) +71 System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action1 body) +64 System.Web.WebPages.WebPageBase.PopContext() +246 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +95 System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +258 System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +115 Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +151 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +295 System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13 System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +23 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +242 System.Web.Mvc.<>cDisplayClass1c.19() +21 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +242 System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +21 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) +177 System.Web.Mvc.Async.<>cDisplayClass2a.20() +89 System.Web.Mvc.Async.<>cDisplayClass25.22(IAsyncResult asyncResult) +102 System.Web.Mvc.Async.WrappedAsyncResult1.End() +57 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +43 System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14 System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23 System.Web.Mvc.Async.WrappedAsyncResult1.End() +62 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +57 System.Web.Mvc.Async.<>cDisplayClass4.3(IAsyncResult ar) +23 System.Web.Mvc.Async.WrappedAsyncResult1.End() +62 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +47 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10 System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25 System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23 System.Web.Mvc.Async.WrappedAsyncResult1.End() +62 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +47 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9658396 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

  • Blue299 12 posts 71 karma points
    Jul 07, 2015 @ 21:54
    Blue299
    0

    Here's a screen grab

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Jul 07, 2015 @ 23:20
    Nicholas Westby
    0

    Not sure what you mean by "custom installer(sql server over sqlce)".

    How are you installing 7.3? Are you using the beta download at: https://our.umbraco.org/contribute/releases/730

    Or are you building it yourself from GitHub?

  • Blue299 12 posts 71 karma points
    Jul 07, 2015 @ 23:26
    Blue299
    0

    I'm using the beta download link.

    Try this...

    Run the installer and choose customize, you will see the database screen. Enter the proper creds along with database.

    You should be allow to choose a starter template. I chose the last starter template on the right. Umbraco installs fine but when I try to view one of the pages the error above is generated.

  • Timothy Lee Russell 20 posts 43 karma points c-trib
    Jul 21, 2015 @ 00:12
    Timothy Lee Russell
    0

    I'm seeing the same issue. Something in the UmbracoHelper seems to be null. Requesting a field causes an unhandled null reference in umbraco.dll.

    The back office seems to work fine though.

    This is the error that I am getting. All of my code is part of a plugin solution that is imprinted on a fresh install of Umbraco. It works on 7.2.6 but throws this error on 7.3-beta.

       at Umbraco.Web.UmbracoHelper.Field(String fieldAlias, String altFieldAlias, String altText, String insertBefore, String insertAfter, Boolean recursive, Boolean convertLineBreaks, Boolean removeParagraphTags, RenderFieldCaseType casing, RenderFieldEncodingType encoding, Boolean formatAsDate, Boolean formatAsDateWithTime, String formatAsDateWithTimeSeparator)
       at ASP._Page_Views_Home_cshtml.Execute() in Home.cshtml:line 7
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
       at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
       at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)
       at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
       at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17()
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
    

    My initial guess was that this had to do with a mismatch in MVC or Razor versions since our plugin is in a separate project and includes references to the umbraco dlls as well as mvc and razor dlls...so I tried to match our project nuget-wise to the packages.config in the 7.3 branch but it seems pretty obvious that I'm missing something.

    Update: upgraded to 7.3-beta2 built from source but the issue persists.

    What I've learned so far from debugging:

    1. The node has data. I see a XmlPublishedProperty with a PropertyTypeAlias of "text" and a non-null DataValue. So, the data is there.

    If I remove every instance of @Umbraco.Field(), it will render random html.

    @CurrentPage.Field("text") fails quietly, no exception -- but also no data displayed.

    -- Solution --

    Ok, I think I might have figured it out...the "Field()" methods in UmbracoHelper use a local instance variable called _componentRenderer that is null (in some cases, at least), when they should instead be using the public "lazy instantiation" member, "UmbracoComponentRenderer" instead.

    Created a pull request: https://github.com/umbraco/Umbraco-CMS/pull/744

    Thanks,

    Timothy

    P.S. Thanks to whoever fixed the forum's post formatting!

  • Timothy Lee Russell 20 posts 43 karma points c-trib
    Jul 23, 2015 @ 18:49
    Timothy Lee Russell
    0

    Update

    Shannon merged the pull request so this is fixed if you pull from the dev-v7 branch.

    I would assume it will make its way into the next beta release.

Please Sign in or register to post replies

Write your reply to:

Draft