[MGNLSTK-698] InternalLinkModel throws NPE when referenced node doesn't exist (anymore) and link title is empty Created: 04/Nov/10  Updated: 29/Dec/10  Resolved: 29/Dec/10

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: paragraphs
Affects Version/s: 1.3.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Vivian Steller Assignee: Ondrej Chytil
Resolution: Cannot Reproduce 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   

To reproduce:

  1. create an internal page link referencing page X, do not enter a link title
  2. delete the referenced page X
  3. reload the page where you entered the link

Result:
Freemarker Exception that states a NullPointerException on line 82:
String pageTitle = getLinkNode().getTitle();
since getLinkNode() now obviously returns null

Expected Result:
A nice message showing that the result page doesn't exist anymore (in edit mode). In preview mode the link shouldn't be rendered at all in these cas
es.



 Comments   
Comment by Ondrej Chytil [ 29/Dec/10 ]

Not able to reproduce on several STK versions. If target link is deleted "Target page of link does not exist" is displayed instead.

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