[PROCRES-2] Subnodes are not appended Created: 14/Jan/16  Updated: 19/May/22  Resolved: 19/May/22

Status: Closed
Project: Processed Resources App
Component/s: None
Affects Version/s: 1.0
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Antti Hietala Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Javadoc for ResourcesTextTemplateRenderer says:

This renderer uses the content and its subnodes as a Freemarker template source. Subnodes are appended to the content of the current node.

A comment in a CSS file that we bootstrap into the resources workspace says the same:

/sample-css/using-freemarker
/* child nodes are inlined */

I expected that the content of child nodes is appended to the parent node but this is not happening. Only the parent is served.

I had to manually add a Freemarker directive at the end of the parent file to iterate through the child nodes and render their content such as:

[#list cmsfn.children(content) as child ]
    ${cmsfn.decode(child).text}
[/#list]

To reproduce the issue, request the parent node http://localhost:8080/magnoliaAuthor/resources/sample-css

  • Expected result: Child node /sample-css/using-freemarker is appended to the parent.
  • Actual result: Only the parent is served.

The ability to merge child nodes fits the use case of merging multiple small JavaScript files into a single file.



 Comments   
Comment by Roman Kovařík [ 19/May/22 ]

Hello,

This ticket is now marked as closed due to one of the following reasons:

  • A long period of inactivity
  • Uses an old or Beta version of an application, module, or framework that we no longer support
  • The issue is no longer reproducible or has been fixed in later versions

If you are still facing a problem or consider this issue still relevant, please feel free to re-open the ticket and we will reach out to you.

Thank you,
The Magnolia Team

Generated at Mon Feb 12 10:31:23 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.