Skip to content

Template inclusion failed in checkbox.ftl when overriding the bootstrap theme #364

@stertooy

Description

@stertooy

Apologies in advance if this is due to my own limited understanding of this plugin, but here goes...

I'm using a custom theme (let's call it my-custom-theme) which sets the bootstrap theme, provided by this plugin, as its parent. This theme overrides some files, but in particular it does not override bootstrap/checkbox.ftl or bootstrap/simple/checkbox.ftl.

[...]
Caused by: freemarker.core._MiscTemplateException: Template inclusion failed (for parameter value "/template/~~~my-custom-theme/simple/checkbox.ftl"):
Template not found for name "template/~~~my-custom-theme/simple/checkbox.ftl".
The name was interpreted by this TemplateLoader: org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader@546ebaed.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #include "/${attributes.templateDir}/...  [in template "template/bootstrap/checkbox.ftl" at line 50, column 10]
----
[...]
Caused by: freemarker.template.TemplateNotFoundException: Template not found for name "template/~~~my-custom-theme/simple/checkbox.ftl".
The name was interpreted by this TemplateLoader: org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader@546ebaed.

The line mentioned in the error is

<#include "/${attributes.templateDir}/${attributes.expandTheme}/simple/checkbox.ftl" />

I was under the impression that, since I don't provide a my-custom-theme/simple/checkbox.ftl file, the expandTheme parameter would ensure it tries to load bootstrap/simple/checkbox.ftl instead. But that does not seem to be the case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions