[MAGNOLIA-6247] JavaFree Module templatescript cannot be found when magnolia.resources.dir is not Magnolia Home Created: 05/Jun/15  Updated: 09/Jun/15  Resolved: 09/Jun/15

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 5.4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Christopher Zimmermann Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
duplicate
duplicates MAGNOLIA-6214 FreeMarker template scripts should be... 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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

I set the

magnolia.resources.dir=${magnolia.home}/light-modules

And put the "Hello Magnolia" sample in there.
I was able to create a page with that template from "Hello Magnolia"
but when it tried to render it I get an exception.

Caused by: java.io.FileNotFoundException: Template "/hello-magnolia/templates/pages/hello.ftl" not found. The quoted name was interpreted by this template loader: info.magnolia.freemarker.FreemarkerHelper$ConfigDelegatingTemplateLoader@7ff4ef56.
	at freemarker.template.Configuration.getTemplate(Configuration.java:995)

However everything works as expected when resource dir is just HOME. So apparently some problem in the path resolution of the ftl file.



 Comments   
Comment by Philip Mundt [ 07/Jun/15 ]

I don't think this is a bug. I rather believe it's an issue of the documentation. Up to that part of the documentation, there is no hello.ftl but rather an hello.html. Change it in your definition and you should be good to go...no?

Comment by Magnolia International [ 08/Jun/15 ]

Looks like if magnolia.home points to a folder outside the webapp it does not work as well (even if magnolia.resources.dir=magnolia.home): Templates are found, but changes not detected. I'm checking if it does not come from my setup.

Comment by Magnolia International [ 09/Jun/15 ]

Known issue, and indeed has already been reported while we already knew
See MAGNOLIA-6214

Generated at Mon Feb 12 04:12:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.