Copied to clipboard

Flag this post as spam?

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


  • Steven Harland 78 posts 518 karma points c-trib
    Aug 24, 2016 @ 06:26
    Steven Harland
    0

    Alt Templates and Allowed Templates

    Hi all,

    I've got a site running Umbraco 7.4.3 and I've noticed that the alt template functionality seems to work for any document type and template regardless of the allowed templates that are specified against each document type.

    For example, I can go to any page on the site and append /home or ?alttemplate=home to the URL and it will attempt to render the home template but for the current node, which could be anything. It causes a YSOD because the model passed in is not what the view expects. Before rendering an alt template I would expect the list of allowed templates to be checked, possibly resulting in a 404 if the template is not allowed, but that's not the case.

    As far as I can tell the allowed templates only determine what content editors can set as the template against a specific node and not what templates can be rendered as alt templates.

    Is this correct behaviour? If so, why?

    Thanks.

    Steven

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Aug 24, 2016 @ 06:37
    David Brendel
    0

    Hi Steven,

    for me thats sounds like a bug. Normally it should check if the template is allowed for the node and as you said return a 404 or something like that.

    Feel free to post this as an issue on the issue tracker: http://issues.umbraco.org/dashboard

    Regards David

  • Ben Norman 167 posts 276 karma points
    Jun 04, 2018 @ 06:23
    Ben Norman
    0

    This is expected behaviour.

    It is probably turned off with UmbDebug or something. I'm not sure if I have ever tried turning it off.

    I have used it for testing updates to pages without affecting the running site, ie debugging. I have also used it for rendering a PDF version of the page and RSS feeds as well.

  • Steven Harland 78 posts 518 karma points c-trib
    Jun 11, 2018 @ 09:20
    Steven Harland
    1

    Issue and further discussion of this is here: http://issues.umbraco.org/issue/U4-8550

Please Sign in or register to post replies

Write your reply to:

Draft