[MGNLSTK-957] Internal link component throws freemarker exception if target is not available Created: 22/May/12  Updated: 07/Jun/12  Resolved: 06/Jun/12

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: demoproject
Affects Version/s: 2.0.2
Fix Version/s: 2.0.4

Type: Bug Priority: Major
Reporter: Frank Sommer Assignee: Robert Šiška
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

Tested on demoauthor instance. Try to reference a not existing page in a internal link component and a freemarker stack trace will occure.

stkFunctions.getReferencedContent(content, "link", RepositoryConstants.WEBSITE) throws an uncatched runtime exception.



 Comments   
Comment by Ondrej Chytil [ 22/May/12 ]

Thanks for reporting the issue Frank.

Comment by Christian Ringele [ 06/Jun/12 ]

This is a very common case, so it should have higher prio.

Comment by Jan Haderka [ 07/Jun/12 ]

Is this really an issue? Should not it be clearly visible to the author that there is invalid link rather then hiding the problem? Issue doesn't occur on public since the error handler deployed there will hide such errors, but imho it should be clearly shown on the author instance, otherwise editor will just activate page w/o fixing it since he/she will most likely not even notice there is an error. WDYT?

Comment by Jan Haderka [ 07/Jun/12 ]

Contrary to the commit message, internal links title says that target doesn't exist in case of broken links. No more freemarker errors, so all is as it should be.

Generated at Mon Feb 12 07:32:01 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.