templating: new directives
(MAGNOLIA-4151)
|
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.5 |
| Type: | Sub-task | Priority: | Critical |
| Reporter: | Daniel Lipp | Assignee: | Daniel Lipp |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Date of First Response: |
| Description |
|
When trying to register the new Directives we get the following Content2Bean Exception: It looks like for any reason the wrong FreemarkerConfig#addSharedVariable is called (not the one with params String, Object but with String, TemplateModel. This already happens in 4.4 branch so it's actually not clear what change introduced it. |
| Comments |
| Comment by Magnolia International [ 25/Aug/11 ] |
|
For the record: this was never changed, but what likely happened is: content2bean looks for a matching "add" method. It finds the first one (addSharedVariable(String name, Object value) and is content with it. Obviously this highly depends on the order of the methods, i.e depends on how the code was compiled. In most cases, it seems the source order is kept, but probably when hot deploying classes, this order can change. Reported this as |