[MGNLETK-76] NullPointerException when calling MagnoliaTemplatingUtilities.getInstance().createLink(content) from outside a web context Created: 16/Mar/12 Updated: 03/Apr/12 Resolved: 02/Apr/12 |
|
| Status: | Closed |
| Project: | Extended Templating Kit (closed) |
| Component/s: | None |
| Affects Version/s: | 1.4.3 |
| Fix Version/s: | 2.0.2 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Tomas Brimor | Assignee: | Jan Haderka |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Date of First Response: | |||||||||
| Description |
|
I'm calling MagnoliaTemplatingUtilities.getInstance().createLink(content) from outside a web context (code initiated by an activation) and end up with a nullpointerexception in the below method: info.magnolia.module.extendedtemplatingkit.DomainNamePathTransformer#transform WebContext ctx = MgnlContext.getWebContextOrNull(); ExtendedAggregationState state = (ExtendedAggregationState) ctx.getAggregationState(); Obviously I end up with a null ctx.. not sure if I'm not allowed to use the MagnoliaTemplatingUtilities outside a web context? |
| Comments |
| Comment by Milan Divilek [ 19/Mar/12 ] |
|
Hello Tomas, thanks for reporting this issue. Should be fixed for one of upcoming releases. |
| Comment by Ondrej Chytil [ 03/Apr/12 ] |
|
Backport under |