Copied to clipboard

Flag this post as spam?

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


  • Joshua Weber 20 posts 152 karma points
    Sep 20, 2023 @ 11:32
    Joshua Weber
    0

    NullReferenceException: Object reference not set to an instance of an object. after Upgrading from 11 to 12.

    Hello Umbraco Community, I've just upgraded my Umbraco Project from 9 to 12.

    The project worked fine all the way until I ended up at the current version of 12.1.2, right after the upgrade from 11. All content is still available in the Backoffice and the Backoffice reports that all content is published just as it should, yet all views report the Error "NullReferenceException: Object reference not set to an instance of an object." which should mean that the node I am trying to access is unavailable or null. But I know for a fact that the node is published and available, with the correct ID in the Backoffice.

    I already tried reloading / rebuilding the Database cache, dotnet clean etc.

    Any Idea as to why that is?

    Best regards, Joshua

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Sep 21, 2023 @ 09:43
    Nik
    1

    Hi Joshua,

    Could you elaborate on where you are getting the error, and are there are more details such as a stack trace or additional information within the Umbraco Logs when the error occurs?

    Thanks

    Nik

  • Joshua Weber 20 posts 152 karma points
    Sep 27, 2023 @ 08:21
    Joshua Weber
    0

    Hello Nik,

    sorry for my late reply, I was on holiday these past few days. It seems to affect all content which has been registered in the CMS, meaning the error pops up the moment I visit any registered URL on my page. For example: I have an Image with the ID 1337 and I call it in my master.cshml. So I use Umbraco.Media(1337) but in the end, the app thinks this media file does not exist. Which isn't the case, as the backoffice displays the file just fine with the according ID.

    Best regards, Joshua

  • Joshua Weber 20 posts 152 karma points
    Oct 04, 2023 @ 13:29
    Joshua Weber
    100

    So Editors note here.

    Sadly what helped fix my Project was creating an empty instance of Umbraco 12 and migrating my views, controllers and DB to that.

    I guess it seems to have been some sort of technical debt carried over from older versions since we have been maintaining this instance for a LONG time.

    Sorry if this isn't really concluding anything but we were never abled to pinpoint the mystery.

    Best regards,

    Joshua

Please Sign in or register to post replies

Write your reply to:

Draft