I had a razor sub menu running on my page quite happily until I had to upgrade from 4.7.0 to 4.7.1 (no biggy). However, I'm using HasAccess to show/hide elements. It is now giving me an error
Error loading Razor Script Razor.cshtml Object reference not set to an instance of an object.
It seems to be breaking here:
int member = Member.CurrentMemberId();
Boolean boo = library.HasAccess(member, item.Path);
I've found a few things that have fallen over with the upgrade but this is confusing me
(Yes, I've got @using umbraco.cms.businesslogic.member;)
Upgrade to 4.7.1 breaking HasAccess
I had a razor sub menu running on my page quite happily until I had to upgrade from 4.7.0 to 4.7.1 (no biggy). However, I'm using HasAccess to show/hide elements. It is now giving me an error
It seems to be breaking here:
I've found a few things that have fallen over with the upgrade but this is confusing me (Yes, I've got @using umbraco.cms.businesslogic.member;)
I've output the member and path variables and these are both fine
I can get round this using umbraco.cms.businesslogic.web.Access, but need to create a dedault user id
You should report this on Codeplex Issue Tracker for Umbraco.
I use this in my Umbraco 4.7.1 Razor navigation menu:
if(library.HasAccess(item.Id, item.Path))
This works fine
I found the solution here
greetings,
Anthony
is working on a reply...