struts-community-plugins / struts2-jquery

Struts2 jQuery Plugin
Apache License 2.0
83 stars 49 forks source link

Version 5.0 error in template submit-close.ftl #304

Closed afattahi54 closed 2 years ago

afattahi54 commented 2 years ago

Thanks for new version :)

After upgrade to version 5.0.0, I face this error:

FreeMarker template error:
Template inclusion failed (for parameter value "/template/simple/submit-close.ftl"):
Syntax error in template "template/simple/submit-close.ftl" in line 22, column 95:
?no_esc can't be used here, as the current output format isn't a markup (escaping) format: undefined(mimeType=null, class=f.c.UndefinedOutputFormat)

----
FTL stack trace ("~" means nesting-related):
    - Failed at: #include "/${parameters.templateDir}/...  [in template "template/jquery/submit-close.ftl" at line 22, column 3]
----

Java stack trace (for programmers):
----
freemarker.core._MiscTemplateException: [... Exception message was already printed; see it above ...]
    at freemarker.core.Include.accept(Include.java:164)
    at freemarker.core.Environment.visit(Environment.java:347)
    at freemarker.core.Environment.visit(Environment.java:353)
    at freemarker.core.Environment.process(Environment.java:326)
    at freemarker.template.Template.process(Template.java:383)
    at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:154)
    at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:588)
    at com.jgeppert.struts2.jquery.components.Submit.end(Submit.java:255)
    at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:40)
jogep commented 2 years ago

@afattahi54 are you using Struts2 version 6.0.0 as the simple theme is provided by Struts itself.

afattahi54 commented 2 years ago

Yes I have not set/change any struts defaults about theme

sdutry commented 2 years ago

@afattahi54 do you have your own versions of Freemarker defined, or do you have custom settings for Freemarker defined. (it's complaining about not having a default markup (escaping) format as output format)

Can you provide a (minimal) project setup to reproduce the issue?

afattahi54 commented 2 years ago

@sdutry the below was set in freemaker.properties.

output_format=undefined

I removed and now it works.

Thanks!