Main Content

Magnolia Community Forums: Development: Site module prototype templates fail to render


  • arjen
    arjen
    Full name: Arjen Schipmolder
    Posts: 5
    Last post: Jul 19, 2017 4:03:05 PM
    Registered on: Jul 12, 2017
    Site module prototype templates fail to render
    #1 by arjen on Jul 12, 2017 3:54:23 PM

    Hi,

    I've been given an existing project to add some new features to but I'm stuck getting the existing project to run smoothly to begin with and I was hoping someone has seen this issue before and can give me some pointers...

    After troubleshooting I narrowed the cause of the issues down to the use of template prototypes that, for some reason, don't work but instead I get an exception when loading any page using these templates:

    RenderException: No template script defined for the template definition [info.magnolia.rendering.template.configured.ConfiguredTemplateDefinition@444d333f[id=custom-templating-module:pages/category,name=category,renderType=site,description=<null>,title=Category,templateScript=<null>,autoGeneration=info.magnolia.rendering.template.configured.ConfiguredAutoGeneration@285f9021[content={},generatorClass=<null>]]]
    info.magnolia.rendering.engine.RenderException: No template script defined for the template definition [info.magnolia.rendering.template.configured.ConfiguredTemplateDefinition@444d333f[id=custom-templating-module:pages/category,name=category,renderType=site,description=<null>,title=Category,templateScript=<null>,autoGeneration=info.magnolia.rendering.template.configured.ConfiguredAutoGeneration@285f9021[content={},generatorClass=<null>]]]
    at info.magnolia.rendering.renderer.AbstractRenderer.render(AbstractRenderer.java:148)
    etc
    etc


    When checking the JCR all pages have their renderType set to 'site' and they have no templateScript set.
    I then checked for the prototype node in the JCR as per the user guide (https://documentation.magnolia-cms.com/display/DOCS/Template+prototype) and found it here:

    /modules/custom-templating-module/config/<project name>/templates/prototype


    This has one templateScript parameter which is set to /custom-templating-module/templates/pages/main.ftl (and for the rest it's got definitions for the different areas)

    I checked all paths and this template does exist and looks ok to me.

    Eventually, as a test, I ended up changing the category page template and set it's renderType to freemarker with templateScript to the same main.ftl file and that works fine up to the first @cms.area include as that too fails, but at least i know rendering via freemarker alone does work.

    Does anybody have any ideas why the site module wouldn't work or how to troubleshoot this further?

    Thanks!
    Arjen

    Magnolia Community 5.4.5
    (dependencies include magnolia-site and magnolia-site-app)
    JRE 1.7
    Tomcat 7

  • arjen
    arjen
    Full name: Arjen Schipmolder
    Posts: 5
    Last post: Jul 19, 2017 4:03:05 PM
    Registered on: Jul 12, 2017
    Re: Site module prototype templates fail to render
    #2 by arjen on Jul 12, 2017 3:57:24 PM

    Sorry guys, wrong list so please ignore.

    Arjen

You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon
  • icon https://me.yahoo.com/