Copied to clipboard

Flag this post as spam?

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


  • Sebastian Dammark 583 posts 1407 karma points
    Jun 13, 2019 @ 08:25
    Sebastian Dammark
    0

    IPublishedElement could not be found, in global helper file

    I have a global helper file and I get the following error:

    IPublishedElement could not be found
    

    I've imported the following namespaces

    @using Umbraco;
    @using Umbraco.Web;
    @using Umbraco.Core.Models;
    

    What is it that I'm missing ?

    It's a cloud solution straight out of the box.

  • Søren Kottal 713 posts 4571 karma points MVP 6x c-trib
    Jun 13, 2019 @ 10:37
    Søren Kottal
    101

    IPublishedElement is in Umbraco.Core.Models.PublishedContent

  • Anders Bjerner 487 posts 2996 karma points MVP 8x admin c-trib
    Jun 13, 2019 @ 10:56
    Anders Bjerner
    0

    Umbraco 8 changed that, so the namespace is Umbraco.Core.Models.PublishedContent now:

    https://github.com/umbraco/Umbraco-CMS/blob/v8/dev/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs#L4

  • Anders Bjerner 487 posts 2996 karma points MVP 8x admin c-trib
    Jun 13, 2019 @ 11:20
    Anders Bjerner
    0

    Sorry Søren. I just re-read your comment, and that's actually what you're writing. #H5IS

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies