Error parsing thymeleaf template

断了今生、忘了曾经 提交于 2019-12-11 09:06:36

问题


this is bugging me for a while and there seems to be nothing helpful online; basically I can't find anything for the particular exception message, and I have no idea what to look for other than the exception message.

I've got a receipt page in my application, that used to work, but now it throws

org.thymeleaf.exceptions.TemplateProcessingException: Error processing template: dialect prefix "th" is set as non-lenient but attribute "th:src" has not been removed during process (/static/receipt:57)

where th:src is the first occurrence of a 'th' element. I don't do any custom processing - just an HTML page with a very little thymeleaf. The page gets parsed, as when I have errors in the syntax, it tells me that Thymeleaf engine failed to parse the page. Also to mention, this page was generated by MS Word and then adapted for my needs. It is possible to rewrite it from scratch, but I'd like to find out what is not working and why it keeps giving me this message anyway.

MY problem seems to be identical to this forum entry http://forum.broadleafcommerce.org/viewtopic.php?f=14&t=1478 (the guy didn't get an answer).

Thanks in advance.


回答1:


I figured out it was due to the datatables4j dialect added to the Thymeleaf template engine. The receipt page in question has a table that was not marked with the datatables4j notation. It led to the errors described in the question. As soon as I've removed the dialect, all the datatables4j tables were gone from everywhere, but so was the exception.



来源:https://stackoverflow.com/questions/14950195/error-parsing-thymeleaf-template

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!