Copied to clipboard

Flag this post as spam?

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


  • Elliott Brown 40 posts 210 karma points
    Mar 06, 2020 @ 10:00
    Elliott Brown
    0

    'PublishedPropertyBase' is inaccessible due to its protection level

    Hi, I'm in the process of upgrading Umbraco from 7 to 8. One of the issue I've encountered is that the site being upgraded uses property editors that are no longer used. When I do the DB conversion it fails for this reason.

    Because we the site is fairly large, my plan was to produce a report listing each node and all of the properties it uses with their propertyEditorAlias's listed alongside. Unfortunately I'm getting the following error... Can anyone help?

    Thank you!

    IPublishedContent node = Umbraco.TypedContent(xxxx);
    @foreach (IPublishedProperty prop in node.Properties)
     {
         <ul>
                 <li>@prop.PropertyTypeAlias
    @((Umbraco.Core.Models.PublishedContent.PublishedPropertyBase)prop).PropertyType.PropertyType.PropertyEditorAlias
                 </li>
         </ul>
     }
    

    Severity Code Description Project File Line Suppression State Error CS0122 'PublishedPropertyBase' is inaccessible due to its protection level ClickLearn.Cms C:\Source Code\ClickLearn.cms\ClickLearn.Cms\Views\SiteStats.cshtml 63 Active

Please Sign in or register to post replies

Write your reply to:

Draft