Copied to clipboard

Flag this post as spam?

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


  • Chris van Schalkwyk 4 posts 84 karma points
    Dec 30, 2017 @ 22:50
    Chris van Schalkwyk
    0

    The view found at '~/Views/Home.cshtml' was not created

    Hi,

    I am still fairly new to Umbraco o would appreciate any help / advice.

    We are using Umbraco version 7.6.5 assembly: 1.0.6428.37121. We have multiple landing pages with content under each with multiple domains set to the respective landing page. Since we have added these we periodically get the following error when loading the home page - The view found at '~/Views/Home.cshtml' was not created - and the only way we have found to get the site to work is to open the home doctype and re-save it.

    I cannot pinpoint exactly when it happens, but currently at random times when updating or adding content it will happen.

    Any suggestions as to why this is happening and what I can do this to resolve this.

    Thanks in advance Chris

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Jan 02, 2018 @ 09:30
    Alex Skrypnyk
    0

    Hi Chris

    It couldn't happen when new content has been created, what about application permissions on 'views' folder? Are they the same?

    Do you have some logic on create content events?

    Thanks,

    Alex

  • Chris van Schalkwyk 4 posts 84 karma points
    Jan 02, 2018 @ 18:53
    Chris van Schalkwyk
    0

    Hi Alex,

    Thanks for the help.

    You are right - it does not happen when new content is created. The site was running a few hours ago and the client just informed that we were getting the error again. I had to re-save the home doctype to get it working. Nothing had been created / edited in the admin section.

    What do you mean by are the application permissions the same? There is only one application pool group that has full control.

    Chris

  • Rune Hem Strand 147 posts 911 karma points hq c-trib
    Jan 02, 2018 @ 19:34
    Rune Hem Strand
    100

    Hi Chris,

    hope you're enjoying your time with Umbraco despite the difficulties you're facing at the moment.

    It is most likely not a permission issue. There is a good thread here that should give you an answer https://our.umbraco.org/forum/templates-partial-views-and-macros/84476-exception-views-was-not-created

    This answer for a quick fix https://our.umbraco.org/forum/templates-partial-views-and-macros/84476-exception-views-was-not-created#comment-283122

    And this for the "proper" explanation https://our.umbraco.org/forum/templates-partial-views-and-macros/84476-exception-views-was-not-created#comment-283560

    As you see there is a link to the Umbraco issue tracker ( http://issues.umbraco.org/issue/U4-10780 ), where you can see the bug has been identified, is currently in review and will be fixed in an upcoming release.

    TLDR; Something tripped the modelsbuilder (which generates the model used in a view). That is why saving a doctype seems to fix it, as that will make the modelsbuilder rebuild the models.

    Try setting the modelsbuilder to run in Dll mode permantly. That should hopefully work. This will compile the models to a dll in the /bin folder. You can do this in web.config by changing

    <add key="Umbraco.ModelsBuilder.ModelsMode" value="PureLive" />
    

    to

    <add key="Umbraco.ModelsBuilder.ModelsMode" value="Dll" />
    

    do make sure the models are properly generated. This can be done on the modelsbuilder dashborad in the Developer section. Once the DLL (/bin/Umbraco.Web.PublishedContentModels.dll) has been created you should no longer see the error.

    Hope that will solve it for you!

    All the best
    Rune

  • Chris van Schalkwyk 4 posts 84 karma points
    Jan 03, 2018 @ 04:06
    Chris van Schalkwyk
    0

    Hi Rune,

    It has been a steep learning curve but really enjoying Umbraco.

    Thanks for your suggestions.

    I changed the "PureLive" to "Dll" as suggested in the post, regenerated the models and so far I have not seen the issue again. It actually also helped fixed another issue I was having with page load time.

    I will check things again in the next day or so and update here again.

    Thanks again.

    Chris

  • Rune Hem Strand 147 posts 911 karma points hq c-trib
    Jan 03, 2018 @ 10:22
    Rune Hem Strand
    0

    Hi Chris

    That is great to hear!!! Both that you're enjoying Umbraco and got your issue resolved :) 🙂

    I would be interested in hearing what issues, other than the models, it fixed for you.

    h5yr
    /Rune

    Ps.: Remember to mark the answer as a solution - Makes it easier to find for people searching the forum :)

  • Chris van Schalkwyk 4 posts 84 karma points
    Jan 03, 2018 @ 18:24
    Chris van Schalkwyk
    0

    Hi Rune,

    Thanks - I have marked your answer as a solution. I was waiting for a reasonable time for the client to verify that the issue was not still happening. All is good :)

    As for the other issue - it was a speed issue. When it was still a "single" site the site performed well. As soon as I added the other landing pages and content, the sites would take around 20-30 secs to load the homepage and subsequent pages the first time round. If you continued browsing the site straight away if worked as normal. Close the browser and return an hour later and it would be slow to load like the first time again etc. Since I made the changes from PureLive to Dll, the sites have been running great.

    Thanks again.

    Chris

  • Paul Griffiths 370 posts 1021 karma points
    Jan 02, 2018 @ 19:48
    Paul Griffiths
    0

    Hi Chris,

    I had something similar where an image kept on disappearing from my home page and when i republished the node it would be fine until it randomly disappeared again. Though troubleshooting i was able to replicate by recycling the app pool so this in my case this was the trigger, can you test this theory with yours?

    Further investigation highlighted that it was a permission issue and in my case i had to grant sufficient permission to IUSR and IIS_IUSRS to the app data directory.

    Thanks Paul

Please Sign in or register to post replies

Write your reply to:

Draft