Copied to clipboard

Flag this post as spam?

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


  • jake williamson 200 posts 840 karma points
    Oct 31, 2018 @ 12:59
    jake williamson
    0

    default template isn't working as expected when no template is selected in the node?

    this maybe a misunderstanding on how this feature works but...

    i've created a doctype and set a default template: enter image description here

    if i create a node based on this doctype it works as expected.

    however...

    if for some crazy reason i decide to change the template drop down to 'choose' in the info tab of the node:

    enter image description here

    i get a ysod stating:

    No physical template file was found for template Index
    

    why isn't it loading the default?! or am i missing something...

    i get that a doctype needs a default template and can have multiple templates but i was working on the basis that if none was set, it would fall back to the default?

    any clarity on this one would, as ever, be amazin ;)

    cheers,

    jake

  • jake williamson 200 posts 840 karma points
    Oct 31, 2018 @ 13:04
    jake williamson
    0

    interestingly, i've been some debugging using a controller and it appears the ysod happens before it even gets to the controller...

  • Michaël Vanbrabandt 863 posts 3346 karma points c-trib
    Oct 31, 2018 @ 14:17
    Michaël Vanbrabandt
    0

    Hi Jake,

    Default Template in this situation means, when you have 2 or more templates assigned to a Document Type, the Default one is the first Template that will be auto assigned to content node which you create in the content section.

    When you set a content node to choose, then the default template is not the one that will be used. It means no view is needed for this content node and therefore doesn't have a "real url" in the front end website.

    Hope this helps!

    /Michaël

  • jake williamson 200 posts 840 karma points
    Oct 31, 2018 @ 14:23
    jake williamson
    0

    hi michaël,

    thank you for the reply - interesting!

    i wonder if the real solution for this then is that the 'template' select doesn't show in the info tab for nodes based on doctypes without a template or only one template?!

    the pain that i currently have is that i've changed the template name in a site and all the nodes that were based on that template have now reverted to 'choose...' in the template select! this means ysods for all those nodes...

    the solution appears to be working through the site and selecting the template for each node...

    i had it in my head that it'd fall back to the default!

    thank you for the clarity on the issue ;)

    cheers,

    jake

  • Michaël Vanbrabandt 863 posts 3346 karma points c-trib
    Oct 31, 2018 @ 14:57
    Michaël Vanbrabandt
    0

    Jake,

    hmm interesting about the name update of a template that all content nodes aren't updated and fallback to no template.

    Will check this!

    You are correct, selecting the template of the nodes solves the problem.

    Your welcome for the help!

    Have a nice day!

    /Michaël

  • Michaël Vanbrabandt 863 posts 3346 karma points c-trib
    Nov 13, 2018 @ 07:39
    Michaël Vanbrabandt
    0

    Hi jake,

    can you select the answer for this thread so that others can see the solution when they have the same problem?

    Thanks!

    Have a nice day!

    /Michaël

Please Sign in or register to post replies

Write your reply to:

Draft