Copied to clipboard

Flag this post as spam?

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


  • Mark 255 posts 612 karma points
    Oct 13, 2015 @ 09:11
    Mark
    0

    Intermittent error: No template exists to render the document - but the template does exist!

    This error is happening in v7.2.4 and in v7.2.8.

    Every now and again, any page on one of two umbraco sites starts reporting the "No template exists to render the document" 404 page. Publishing the page makes it work again (note, we don't need to do anything with the template, merely publish the page that is reporting the "missing template" issue).

    It doesn't always happen on the same page, no changes are made to the templates in the CMS, no changes are made to the document in the CMS. So, it seems to be an intermittent problem, and can't be reproduced.

    This obviously causes us big problems when it happens on pages that mean customer's don't pay us! As we don't know it's a problem until we test it. This means we need to go through EVERY page on the site to test it, a few times a day. This is a big problem for us.

    I get the impression from looking on the forum that this is isn't something that's been addressed or fixed, maybe I'm wrong.

    In absence of a solution, I'm wondering if there is a workaround. For example, would it be possible to catch a 404 somehow, check if the page being requested exists and check if the template exists, try to publish it, then try and redirect to it? Can anyone advise on this, or a better method?

    Thanks!

  • Mark Bowser 273 posts 860 karma points c-trib
    Oct 13, 2015 @ 19:23
    Mark Bowser
    0

    Are you noticing anything strange in the umbraco logs at App_Data\Logs\umbracoTraceLog.txt on the days where this happens? That might be tricky to find because the day where the problem happens might be a different day than the day you discover the problem. Sorry about that.

    It sounds like something is happening to the xml cache on disk at App_Data\umbraco.config or possibly even to the examine indexes. My hope is that you'll look at the logs and see something related to the indexes or the xml cache being locked. These are just my first wild guesses.

    How long has this been happening? Does it fix it when you republish the entire site? Or just when you republish the specific node?

  • Mark 255 posts 612 karma points
    Oct 13, 2015 @ 20:47
    Mark
    0

    Hi Mark,

    Thanks for coming back to me. The issue has been happening for several months. I was hoping the upgrade to 7.2.8 might fix it, as that has been suggested previously, but it hasn't helped.

    As you say, the logs are hard to trawl, but I've been going through them and have seen the following that don't relate to errors that I can explain (I'm not sure if they are happening when a page goes down, though):

    2015-10-12 06:58:37,531 [6] ERROR Umbraco.Core.MainDom - [P144/T1/D2] Error while running callback, remaining callbacks will not run.
        System.NullReferenceException: Object reference not set to an instance of an object.
           at Umbraco.Web.Scheduling.BackgroundTaskRunner`1.Shutdown(Boolean force, Boolean wait)
           at umbraco.content.<>c__DisplayClass2.<.ctor>b__1()
           at Umbraco.Core.MainDom.OnSignal(String source)
           at Umbraco.Core.MainDom.Stop(Boolean immediate)
           at System.Web.Hosting.HostingEnvironment.StopRegisteredObjects(Boolean immediate)
    
    
    2015-10-11 18:10:12,602 [130] ERROR Archetype.PropertyEditors.ArchetypePropertyEditor+ArchetypePropertyValueEditor - [P2596/T129/D4] Value cannot be null.
    Parameter name: input
    System.ArgumentNullException: Value cannot be null.
    Parameter name: input
       at System.Guid.Parse(String input)
       at Archetype.PropertyEditors.ArchetypePropertyEditor.ArchetypePropertyValueEditor.ConvertEditorToDb(ContentPropertyData editorValue, Object currentValue)
    

    I assume I'm just looking for ERROR entries, and not WARN entries! :-)

    I'm going to put some monitoring software on some of the key pages, to monitor when a page stops working, hopefully that will allow me to check the logs within a reasonable time frame to see if anything show up.

  • Mark 255 posts 612 karma points
    Oct 15, 2015 @ 15:26
    Mark
    0

    Hi Mark,

    Some interesting developments. One of our pages went down again today. We can isolate it to within a 30 minute window.

    To resolve the issue, I first tried doing a "republish entire site" by right clicking "Content" in the content section. This did not resolve the problem. Then I tried publishing the page by right clicking the page in the content section and clicking "publish". This also did not resolve the problem. Finally I clicked the "Save & Publish" button. This DID fix the problem. Hopefully that would give you some indication as to what the problem might be.

    I've gone through the logs. I'd be happy to email it to you, as I might be missing something. But in the meantime, here is an entry that look odd:

    2015-10-15 15:37:06,546 [62] WARN  Umbraco.Core.PropertyEditors.LegacyPropertyEditorIdToAliasConverter - [P4704/T72/D13] A legacy GUID id was generated for property editor Umbraco.Grid. This occurs when the legacy APIs are used and done to attempt to maintain backwards compatibility. Consider upgrading all code to use the new Services APIs instead to avoid any potential issues.
    

    In the above, I'd like to know what [P4704/T72/D13] means. Any ideas?

    There are some macro errors that are occurring fairly regularly. Do you think these could cause a page to get into a broken state?

    Our site is making heavy use of the new Grid functionality, with heavy use of the Macro property type.

    Thanks, Mark

  • Johnny Thomsen 2 posts 72 karma points
    Nov 16, 2015 @ 11:24
    Johnny Thomsen
    0

    Hi Mark.

    I Am having the exact same issue as you, and did pretty much the same as you without success.

    I was able to solve it with setting a domain name.

    Startpage => Do Something Else => Culture and Hostnames

    and then add the domain name so it seems there is a routing issue ?

    Regards Johnny Thomsen

  • Shannon Deminick 1524 posts 5269 karma points MVP 2x
    Nov 16, 2015 @ 12:49
    Shannon Deminick
    0

    Hi all,

    I've not seen this issue before. This issue occurs when no template item can be resolved for the current content item.

    I have some questions on everyone's setup though since perhaps this could occur based on varying situations:

    • Are you using 100% MVC or 100% Webforms templates? Or a mixture of both?
    • What is the complete statement you are seeing? There are various different statements that can be displayed that start with "No template exists to render the document at url.... " , some of which end with "In addition, no template exists to render the custom 404.", others might end with "In addition, no rendering engine exists to render the custom 404."
    • Do you have multiple root nodes in your site? And what domains (if any) are assigned to those nodes ?
    • Do you have any custom IContentFinder's ?

    I have some other questions for members of the core team regarding the template lookup as well so will report back with those findings.

  • Stephen 767 posts 2273 karma points c-trib
    Nov 16, 2015 @ 13:18
    Stephen
    0

    Looking into it. Just to answer one question,

    In the above, I'd like to know what [P4704/T72/D13] means. Any ideas?

    Means: process (ie w3wp.exe) ID 4704, thread ID 72, AppDomain ID 13.

    When a process starts, AppDomain ID is 1, then grows each time the application restarts. Process ID changes when the application pool itself is recycled. This helps us track application restarts and isolate applications when 2 application domains run simulateously during a restart.

  • Stephen 767 posts 2273 karma points c-trib
    Nov 16, 2015 @ 13:22
    Stephen
    0

    More: if you can reproduce on a dev environment, can you try and turn log4net priority to "Debug" in ~/Config/log4net.config? That should write more details about the routing and templates in the UmbracoLog.txt file. Including, which template we are looking for, etc.

  • Johnny Thomsen 2 posts 72 karma points
    Nov 16, 2015 @ 13:24
    Johnny Thomsen
    0

    Hi Shannon.

    1. 100% MVC
    2. Statement,: "404 Not found No template exists to render the document at url '/xxx/'. In addition, no template exists to render the custom 404…"
    3. No - Single root node.
    4. No Custom IContentFinder.
  • Mark 255 posts 612 karma points
    Nov 16, 2015 @ 13:36
    Mark
    0

    Embarrassingly, my issue was caused by having multiple root nodes without having domains assigned.

    Some documents (pages) beneath the homepage were named the same as other documents on the root (the documents on the root were holding settings, news items, etc, and didn't require templates).

    I would have picked up on it faster, but Umbraco would usually serve the correct page (from beneath the homepage), but other times resolve to one of the root documents, so the issue seemed intermittent.

    I've never looked into how Umbraco resolves document IDs from request URLs, but it seems it can resolve to a different document from one request to another (if they have the same name), even when there has been no CMS interaction between those requests.

  • Mark 255 posts 612 karma points
    Nov 16, 2015 @ 13:39
    Mark
    0

    Johnny, could it be that you have documents of different types with the same name anywhere beneath the root node? And could one of those document types have no template? Just a thought.

  • Stephen 767 posts 2273 karma points c-trib
    Nov 16, 2015 @ 13:41
    Stephen
    0

    Umbraco maintains a cache of "routes" ie (url <--> ID). That cache is used both when getting the url of a node, and when getting a node from a url. It is a 1-to-1 map.

    If nodes 1 and 2 both are named "node" and are under different roots and roots are ignored, they will both have url "/node". Meaning that depending on which url you'll compute first, the cache will contain either 1==/node or 2==/node and that is more or less random, yes.

    It definitively can be confusing, but making it determistic would be pretty expensive, as it would mean that anytime we compute a url, we have to check against every other node url to make sure there isn't a collision.

Please Sign in or register to post replies

Write your reply to:

Draft