[MGNLSTK-650] InternalTeaserModel throws NPE when target does not exist (anymore) Created: 01/Jul/10  Updated: 23/Jan/13  Resolved: 07/Jul/10

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

Type: Bug Priority: Major
Reporter: Bert Leunis Assignee: Ondrej Chytil
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File standard-templating-kit-parent.patch    
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Date of First Response:

 Description   

Using STK we created a teaser, using the info.magnolia.module.templatingkit.paragraphs.InternalTeaserModel. If the target page of the teaser is deleted or moved, a NPE is thrown from the findImage() method. The calling method is getImage():

Content target = getTarget();
image = findImage(target);

If the target == null, findImage() should not be called.



 Comments   
Comment by Ondrej Chytil [ 07/Jul/10 ]

In original paragraph "internaPage" is condition which handles this problem.

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