[MAGNOLIA-4635] NPE when empty title of a document is set Created: 31/Oct/12  Updated: 27/Nov/12  Resolved: 27/Nov/12

Status: Closed
Project: Magnolia
Component/s: admininterface
Affects Version/s: 4.5
Fix Version/s: 4.5.7

Type: Bug Priority: Neutral
Reporter: Roman Kovařík Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MGNLDMS-244 Fallback to name only, when title is ... Closed
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   

Steps to reproduce:
1. Double click on for example /demo-project/img/logos/magnolia-logo in admincentral.
2. Erase the title 'magnolia-logo'.
3. Save -> NPE



 Comments   
Comment by Jan Haderka [ 22/Nov/12 ]

the comment in the test says:

   //THEN any exception occurs

but it should say //THEN no exception occurs shouldn't it?

Comment by Roman Kovařík [ 22/Nov/12 ]

Agree. These lines were coincidentally removed/replaced when solving http://jira.magnolia-cms.com/browse/MGNLDMS-244
https://git.magnolia-cms.com/gitweb/?p=magnolia_main.git;a=blobdiff;f=magnolia-module-admininterface/src/test/java/info/magnolia/module/admininterface/SaveHandlerImplDocTitlesTest.java;h=eb54a6951e27c7c6ee4259a3f9d8de8fbba019d1;hb=d09bd71793f86fcef88497c8c1079867ba979fcf;hp=1efeb649839f93b31a173b25714af3509965b686;hpb=0b4cbcafc5f1d1e8e097e8c14580c9bb676a0a8c

Comment by Jan Haderka [ 26/Nov/12 ]
+        verify(data).setAttribute(FileProperties.PROPERTY_FILENAME, "untitled");

But that is not right - if the name is not set explicitly via title, then the name of the node should be used as a file name.

Comment by Roman Kovařík [ 26/Nov/12 ]

It will be fixed together with http://jira.magnolia-cms.com/browse/MGNLDMS-244

Generated at Mon Feb 12 03:57:35 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.