[MAGNOLIA-1788] Simplify / remove FreemarkerUtil, handling of AlertUtil/message in FreemarkerHelper and other improvements. Created: 17/Oct/07  Updated: 19/Dec/16  Resolved: 04/Nov/15

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.5 RC1
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Won't Do Votes: 0
Labels: cleanup
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MAGNOLIA-2508 Allow passing a template stream/reade... Closed
supersession
supersedes MAGNOLIA-1466 Merge FreemarkerUtil and FreemarkerHe... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

AlertUtil's message is currently added to the freemarker context only in FreemarkerUtil (contrary to other default values which are added by FreemarkerHelper. Not sure how to handle this, for two reasons:

  • "message" seems a too generic key name (ie it might "accidentally" be used by the template for another purpose)
  • we're having more and more "default values" added to the freemarker context, and maybe they just all belong to the magnolia context, which is already exposed to the template as "ctx".

The feature where we passed a template stream/reader to FreeMarker templates inline also needs a review/cleanup. It is used by the mail module and we could probably be using a TemplateLoader to achieve this. In fact, Freemarker provides an abstract URLTemplateLoader, and it would be fairly trivial to implement it so that it fetches a page from a given Magnolia instance pretty much the same way the mail module does it at the moment.



 Comments   
Comment by Michael Mühlebach [ 04/Nov/15 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

Generated at Mon Feb 12 03:30:20 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.