Affects Version/s: 7.10, 8.10, 9.10, 10.2
- 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):
- 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:
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