Copied to clipboard

Flag this post as spam?

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


  • Remko 118 posts 283 karma points
    Jul 20, 2021 @ 11:39
    Remko
    0

    After migration to umbraco 8, error after logging in: Value cannot be null. Parameter name: source

    I've migrated a lot of Umbraco 7 sites already, but this one is a reall pain in the ass..

    Step already did before upgrading:

    1. Upgraded all datatypes to latest V7 versions, so no obsolete pickers were left
      1. Removed all datatypes of external packages that aren't supported in U8 anymore.
      2. Removed all old versions of nodes by using Unversion
      3. Installed clean install of Umbraco 8(.4) and finally set connection string to my U7 site.
      4. Gone through upgrade steps en finally logged into Umbraco

    Then this error appears: Value cannot be null. Parameter name: source (in Umbraco.Core.Persistence.Factories.PublicAccessEntryFactory.BuildEntity)

    And no content tree is shown. This is actual error

    Does anybody have a clue where to begin with this one? Tried everything: rebuilding cache, rebuilding Internal index, restarting site etc, but nothing seems to help...

    Any help would be appreciated!

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Jul 25, 2021 @ 10:18
    Marc Goodson
    1

    HI Remko

    Looks like there might be something awry in the UmbracoAccessRule database table.

    When you right click a content node in Umbraco you have the option to set a 'Public Access' rule - you choose which Member Groups are allowed to access the content, and you get to pick a 'login' page and an 'error page' to display if the person isn't logged in.

    Now your site might not have a protected area, or at some point it might have, or somebody did a test or something - in the old days of Umbraco these rules were stored as files in the app_data folder, I think around 7.2 they got moved into a database table... which is I think called UmbracoAccessRule...

    So if you can run

    Select * from umbracoAccessRule 
    

    from your database table, then I reckon your going to find an entry in there, that has some kind of null value or is referencing a content id or member group id, that no longer exists... and can no longer be 'mapped' to the V8 version of the PublicAccessEntity...

    If you delete that rogue entry it should all be back and running ok...

    fingers crossed!

    regards

    marc

  • progproger 52 posts 130 karma points
    Sep 01, 2023 @ 17:05
    progproger
    0

    Thank you very much! Additionally, all columns in the umbracoAccessRule table are non-nullable. Hence it's impossible to get any null entries.

    Based on the SQL profiler analysis, it appears that the 'GetApplicationTrees' method executes the following query:

    SELECT * FROM [umbracoAccess] LEFT JOIN [umbracoAccessRule] ON [umbracoAccess].[id] = [umbracoAccessRule].[accessId] ORDER BY ([umbracoAccess].[nodeId])

    Using that query (because of the left join for sure) you can find the mentioned null entries from the umbracoAccessRule, then remove an entry from the umbracoAccess table.

Please Sign in or register to post replies

Write your reply to:

Draft