You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Jeromy Evans (JIRA)" <ji...@apache.org> on 2008/04/25 10:36:05 UTC

[jira] Created: (WW-2615) Improve feedback for missing tag templates

Improve feedback for missing tag templates
------------------------------------------

                 Key: WW-2615
                 URL: https://issues.apache.org/struts/browse/WW-2615
             Project: Struts 2
          Issue Type: Improvement
    Affects Versions: 2.1.1
            Reporter: Jeromy Evans
            Assignee: Jeromy Evans
            Priority: Minor


Currently if a template for a tag is not found an error is logged only for the first exception, even if it attempted to find templates in multiple themes  

As an improvement, the log should identify which other templates it attempted to load to help developers isolate if they have a template hierarchy issue.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (WW-2615) Improve feedback for missing tag templates

Posted by "Jeromy Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeromy Evans closed WW-2615.
----------------------------

    Resolution: Fixed

ParseException is now thrown by FreemarkerTemplateEngine

Could not load the FreeMarker template named 'myTemplate':
Attempted: /template/custom/myTemplate.ftl
Attempted: /template/simple/myTemplate.ftl
The TemplateLoader provided by the FreeMarker Configuration was a: freemarker.cache.MultiTemplateLoader

[UIBean] error when rendering
freemarker.core.ParseException: Token manager error: freemarker.core.TokenMgrError: Lexical error at line 7, column 72.  Encountered: "#" (35), after : "" in template/simple/myTemplate.ftl
	at freemarker.template.Template.<init>(Template.java:152)

> Improve feedback for missing tag templates
> ------------------------------------------
>
>                 Key: WW-2615
>                 URL: https://issues.apache.org/struts/browse/WW-2615
>             Project: Struts 2
>          Issue Type: Improvement
>    Affects Versions: 2.1.1
>            Reporter: Jeromy Evans
>            Assignee: Jeromy Evans
>            Priority: Minor
>             Fix For: 2.1.2
>
>
> Currently if a template for a tag is not found an error is logged only for the first exception, even if it attempted to find templates in multiple themes  
> As an improvement, the log should identify which other templates it attempted to load to help developers isolate if they have a template hierarchy issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WW-2615) Improve feedback for missing tag templates

Posted by "Jeromy Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeromy Evans resolved WW-2615.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.2

Now provides more information:

[FreemarkerTemplateEngine]
Could not load the FreeMarker template named: 'myTemplate':
Attempted: /template/custom/myTemplate.ftl
Attempted: /template/simple/myTemplate.ftl
The TemplateLoader provided by the FreeMarker Configuration was a: freemarker.cache.MultiTemplateLoader
FreeMarker Template Caching is disabled (struts.freemarker.templatesCache=false)

[UIBean] error when rendering
java.io.FileNotFoundException: Template /template/custom/myTemplate.ftl not found.
	at freemarker.template.Configuration.getTemplate(Configuration.java:489)
...

If template caching is enabled it also identifies that the template has been added to the missing template cache and won't be attempted again.

> Improve feedback for missing tag templates
> ------------------------------------------
>
>                 Key: WW-2615
>                 URL: https://issues.apache.org/struts/browse/WW-2615
>             Project: Struts 2
>          Issue Type: Improvement
>    Affects Versions: 2.1.1
>            Reporter: Jeromy Evans
>            Assignee: Jeromy Evans
>            Priority: Minor
>             Fix For: 2.1.2
>
>
> Currently if a template for a tag is not found an error is logged only for the first exception, even if it attempted to find templates in multiple themes  
> As an improvement, the log should identify which other templates it attempted to load to help developers isolate if they have a template hierarchy issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (WW-2615) Improve feedback for missing tag templates

Posted by "Jeromy Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeromy Evans reopened WW-2615:
------------------------------


FreemarkerTemplateEngine also accidentally swallows FreeMarker's ParseException if the exception occurs in a template successfully loaded after the first.

Ie. first attempt causes a FileNotFoundException.  The template in the parent theme exists but throws a ParseException (which is an IOException).  The exception is swallowed by the framework and only the FileNotFound exception is reported.  

Grrr...

> Improve feedback for missing tag templates
> ------------------------------------------
>
>                 Key: WW-2615
>                 URL: https://issues.apache.org/struts/browse/WW-2615
>             Project: Struts 2
>          Issue Type: Improvement
>    Affects Versions: 2.1.1
>            Reporter: Jeromy Evans
>            Assignee: Jeromy Evans
>            Priority: Minor
>             Fix For: 2.1.2
>
>
> Currently if a template for a tag is not found an error is logged only for the first exception, even if it attempted to find templates in multiple themes  
> As an improvement, the log should identify which other templates it attempted to load to help developers isolate if they have a template hierarchy issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.