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

    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 1178 posts 7893 karma points MVP 5x c-trib
    Jun 09, 2019 @ 16:22
    Marc Goodson

    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'



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

    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.

  • alimac 174 posts 341 karma points
    Mar 14, 2020 @ 00:14

    Just in case this helps anyone else, I was having the same problem with the error above.

    In my situation I was trying to create nodes programatically, but realised it was because I was creating a document type that had 'Is element type' selected as Marc suggested. Just switch that back off and it should work.

  • kate smith 2 posts 71 karma points
    Mar 14, 2020 @ 00:50
    kate smith

    I can't reproduce this in the latest version of the codebase, so I'm going to assume it's been fixed already along the way! 9apps Vidmate

Please Sign in or register to post replies

Write your reply to: