Copied to clipboard

Flag this post as spam?

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


  • Jon 3 posts 73 karma points
    Jan 17, 2018 @ 20:12
    Jon
    0

    Running a site using Umbraco 7.7.7 with the Modelsbuilder in PureLive mode. After creating a new Document Type I go to use it and am getting a:

    The type or namespace name 'Sticky_Subnav_AC' could not be found (are you missing a using directive or an assembly reference?)
    

    However if I go the Models.generated file I can see what looks like all the needed setup (partial class w/ matching namespace, the proper attributes, etc) are all present.

    Am I missing something?

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Jan 18, 2018 @ 08:33
    Alex Skrypnyk
    0

    Hi Jon

    What is "StickySubnavAC" class?

    /Alex

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Jan 18, 2018 @ 08:51
    Nik
    0

    Hi Jon,

    I've seen this where the new models haven't been loaded into memory yet. The easiest solution I've found is to just save the document type again. It's as if the first save is updating the Models.generated.cs file and the second save gets it loaded into memory.

    I've not had a chance to debug the behaviour further as it wasn't the case previously but seems to have been the case since about 7.7.6 or 7.7.7 (not sure which)

    Thanks,

    Nik

  • Jon 3 posts 73 karma points
    Jan 24, 2018 @ 16:04
    Jon
    0

    It does seem that this was the issue, however the only way I was able to solve it was to restart the instance that this is deployed on.

  • Jeff Scranton 1 post 71 karma points
    May 14, 2018 @ 16:29
    Jeff Scranton
    0

    We just ran into this same issue on version 7.7.7 and the only way to get it working was to created a different document type altogether.

    Once we had the new document type created we had to "kick" the site by using our FTP client to edit the web.config file at the site root.

    Every time we make a change to the document type (model), we kick the site by editing the web.config file. This forces the models to rebuild in PureLive mode.

    I wonder if sometimes our site is being moved on Azure to another server OR that we have failed-over to a different server that has no idea about the model we want to use, OR the caches are different enough that it throws a wobbly.

  • Jon 3 posts 73 karma points
    May 14, 2018 @ 17:29
    Jon
    0

    I think it's an issue with how azure caches (or at least the way we have it deployed on azure), but I could be wrong. My reasoning for thinking this is that it is very hit or miss.

    I would say that it happens less than 5% of the time when I am expecting it to and the only way I seem to be able to get past it is to restart the instance that is running Umbraco. Once it is restarted everything works again for a random amount of edits/regeneration of the models and then it needs to be restarted again.

    It's not ideal, but if I only have to deal with it in my dev environment than I'm not all that worried about it.

Please Sign in or register to post replies

Write your reply to:

Draft