Copied to clipboard

Flag this post as spam?

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


  • Bhawna Jain 17 posts 148 karma points
    Jun 06, 2019 @ 06:47
    Bhawna Jain
    0

    Factory returned model of type which does not implement IPublishedContent.

    I am not able to save any of my content page and hence not able to publish them (refer the attached image).

    Things which I have tried so far:

    1. Changing "Umbraco.ModelsBuilder.ModelsMode" to Dll, LiveDll and PureLive.
    2. Cleared nu cache.

    This issue have appeared before in my project, but at that time I changed the mode to live which allowed me to save & publish the content, then switching back to Dll solved it. But this time, I have tried every combination but still not able to solve it.

    enter image description here

  • Marc Goodson 970 posts 6476 karma points MVP 4x c-trib
    Jun 09, 2019 @ 16:22
    Marc Goodson
    0

    Hi Bhawna

    The generated models in Modelsbuilder are designed to implement IPublishedContent...

    What properties do you have on BlogLandingPage document type?

    The odd thought I had is maybe a custom property you have defined on the doc type - clashes in name with one on IPublishedContent, but with a different signature, and therefore is generating a version of the model that now doesn't implement IPublishedContent properly!

    Are there any errors logged when you regenerated models?

    Has the BlogLandingPage got 'Is Element Type' ticked for it in the 'permissions section'

    regards

    Marc

  • Bhawna Jain 17 posts 148 karma points
    Jun 17, 2019 @ 05:38
    Bhawna Jain
    0

    Yes, BlogLandingPage has a field for nested content (having a document type with "Is an Element type" ticked).

    About the clash you mention, how can I refresh the content in IPublishedContent, only way I know is to clear nu cache from "Published Status" tab under settings under templating.

Please Sign in or register to post replies

Write your reply to:

Draft