[MGNLSTK-566] Invalid DMS-links cause RunTimeException in several paragraphs Created: 21/Jan/10 Updated: 23/Jan/13 Resolved: 08/Jul/10 |
|
| Status: | Closed |
| Project: | Magnolia Standard Templating Kit (closed) |
| Component/s: | paragraphs |
| Affects Version/s: | 1.2.1 |
| Fix Version/s: | 1.3.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sebastian Frick | Assignee: | Ondrej Chytil |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | stk | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Patch included: |
Yes
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Description |
|
Invalid links pointing to DMS (several paragraphs are affected, for instance change a dms-handle in stkExtrasExternalPage-paragraph manually) cause a RunTimeException in STKUtil.getAsset(Content content, String nodeDataName, String variationName). It's not possible to edit the paragraph afterwards. StKUtil can be called in Freemarker-Templates directly, so there is no possiblity to catch this exception. There should be logged a WARN-message and returned null for this cases. public static Asset getAsset(Content content, String nodeDataName, String variationName) { catch (AssetNotFoundException e) { log.warn("Asset not found.", e); }catch (DAMException e) { log.warn("Can't create asset.", e); } return asset; Freemarker-Exception in detail: get(image) failed on instance of info.magnolia.module.templatingkit.paragraphs.ExternalTeaserModel Java backtrace for programmers: |