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.
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)
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.
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.
Namespace not found
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:
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?
Hi Jon
What is "StickySubnavAC" class?
/Alex
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
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.
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.
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.
is working on a reply...