Copied to clipboard

Flag this post as spam?

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


  • Ian Smedley 97 posts 192 karma points
    Jun 02, 2018 @ 19:19
    Ian Smedley
    0

    Umbraco & Merchello Upgrade - nullreferenceexception on CurrentCustomer in _Header.cshtml

    Hi,

    I've been pulling my hair a little with this one.

    I've updated a site from Umbraco 7.4.3 to 7.10.4 using nuget. I've also done the same for Merchello.core and Merchello.Fasttrack.

    I didn't override existing files, so I suspect my issue is something I need to merge somewhere....

    I had a small issue with the Merchello.config and the country provinces - this was easily solved.

    The backoffice appears OK, but I can't load my site because of an issue with _header.cshtml which I took from FastTrack.

    The line is:

    <button@(IsActive(accountPage.Id, ! CurrentCustomer.IsAnonymous)) href="@accountPage.Url">
    

    CurrentCustomer is coming up with a NullException.

    I've checked GitHub and my header, although different for site reasons, has all the same includes, Merchello.Web.MVC.MerchelloTemplatePage etc. as the latest.

    Any pointers on what I'm missing please?

    Has anyone else done a similar upgrade? My primary driver for this was to update Braintree ahead of the TLS1.2 update.

  • Ian Smedley 97 posts 192 karma points
    Jun 03, 2018 @ 19:54
    Ian Smedley
    0

    I tried a number of different approaches, including Upgrading to Umbraco 7.7, however in the end I decided to take a more direct approach to upgrade less.

    1. Checkout the 2.1.0 branch of Merchello
    2. Update project to .NET 4.5.2
    3. Update Braintree SDK via nuget to 3.3.0
    4. Update to Umbraco 7.6.13 - A conflict with a version of AutoMapper made this necessary.
    5. Run the Umbraco upgrade wizard.
    6. Check that payments now use TLS 1.2 (They do)
Please Sign in or register to post replies

Write your reply to:

Draft