-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 7.10, 8.10, 9.10, 10.2
-
Component/s: Layouts & Widgets, Seam / JSF UI
- install Nuxeo
- install JSF UI (with 7.10 it is the default UI)
- create a custom document type having a field with files:files (see dragAndDrogFilesWidget.png)
- sync the project with the server
- create a document and attach 3 files using the button Add New Attached File
- save the document (see 3files.png)
- observe the JSON output shows the 3 files (see 3files.json)
- Edit the document
- select Delete for the third document
- save the document (see 2 files.png)
- observe the delete file appears as null (see 2files.json):
{ "file": null, "filename": null }
- click the Edit tab
- observe the third attached file is still detected (see emptyFile.png)
Expected behavior: when deleting an attached file through the files widget, it should not be set as null but rather disappear completely.
Note: deleting through the Files tab shows this is possible. Moreover in later versions using WebUI, the issue does not happen (the deletion is actually done through the Blob.RemoveFromDocument operation)
Impact: this is an issue for clients like DotNet using operations that will list the blobs and expect them to be either present or not but not null, leading to an NPE:
17/09/2018 14:11:54 ::> System.AggregateException: Une ou plusieurs erreurs se sont produites. ---> NuxeoClient.ServerErrorException: {"entity-type":"exception","code":"java.lang.NullPointerException","status":500,"message":null} à NuxeoClient.Client.<ProcessResponse>d__61.MoveNext() --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) à System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() à NuxeoClient.Client.<ProcessRequest>d__60.MoveNext() --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) à System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() à NuxeoClient.Client.<RequestJson>d__54.MoveNext() --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) à System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() à NuxeoClient.Operation.<Execute>d__61.MoveNext() --- Fin de la trace de la pile d'exception interne ---
It would be very tedious to list all the code assuming the blobs are not null rather than fixing the null value in the DB.
Moreover, on a data-consistency view, it is better to fix the blob storage than to test for nullity.
Workaround: use the Edit tab (when not disabled) to delete the file
- is required by
-
NXP-21025 Remove deprecated code for LTS 2017
- Resolved