[MAGNOLIA-5575] Template definition without a title causes NPE Created: 28/Dec/13  Updated: 14/Jan/14  Resolved: 13/Jan/14

Status: Closed
Project: Magnolia
Component/s: rendering
Affects Version/s: 5.2.1
Fix Version/s: 5.2.2

Type: Bug Priority: Major
Reporter: Federico Grilli Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

The exception is thrown when trying to add a new page when one the available templates has no title.
The issue is at info.magnolia.rendering.template.assignment.MetaDataBasedTemplateDefinitionAssignment.getAvailableTemplates(Node) line #156 where title can be null. We should rather log a warning and try to fail more gracefully.
Furthermore, proper i18n support will be introduced by replacing deprecated MessagesManager with SimpleTranslator.



 Comments   
Comment by Daniel Lipp [ 14/Jan/14 ]

All fine but I think u should also mention (e.g. in the title, description or wherever) that - on that occasion - u introduced proper i18n support here. After all that's what most of the changes are about.

Generated at Mon Feb 12 04:06:26 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.