You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug #5405 introduced an improvement where the first medium of a selected structure element would be automatically shown in the gallery of the metadata editor. However, this revealed a bug in the system where a Null Pointer Exception would be thrown when the obligatory MediaView folder is not configured in a project settings and the user opened a process of that project in the metadata editor with at least one medium assigned to the root element (e.g. not assigned to any other structure element).
This exception is caused by the hidden p:graphicImage element in the file gallery.xhtml with ID mediaViewData - that is meant for storing the image to be displayed in the OpenLayers component of the gallerys detail view - not checking for a complete project configuration but instead always trying to load the mime type of said MediaView project folder configuration.
To Reproduce
Steps to reproduce the behavior:
Create a project where a folder is correctly configured as MediaView
Create a process in that project
Add at least one image to the process and save the process so that the image is assigned to the logical root node
Change the project configuration and remove the configuration for the MediaView folder
Open the process in the metadata editor again
Observe the NPE
Expected behavior
Either setting a MediaView folder in the project settings should be mandatory or (better) the function loading the image for the OpenLayers detail view of the metadata editor gallery should check whether the MediaView is properly configured or at least not null before trying to retrieve it's mime type. In any way, a NullPointerException should not be displayed in the circumstances described above.
Screenshots
Release
3.6.0-SNAPSHOT
The text was updated successfully, but these errors were encountered:
Describe the bug
#5405 introduced an improvement where the first medium of a selected structure element would be automatically shown in the gallery of the metadata editor. However, this revealed a bug in the system where a Null Pointer Exception would be thrown when the obligatory
MediaView
folder is not configured in a project settings and the user opened a process of that project in the metadata editor with at least one medium assigned to the root element (e.g. not assigned to any other structure element).This exception is caused by the hidden
p:graphicImage
element in the filegallery.xhtml
with IDmediaViewData
- that is meant for storing the image to be displayed in the OpenLayers component of the gallerys detail view - not checking for a complete project configuration but instead always trying to load the mime type of saidMediaView
project folder configuration.To Reproduce
Steps to reproduce the behavior:
MediaView
MediaView
folderExpected behavior
Either setting a
MediaView
folder in the project settings should be mandatory or (better) the function loading the image for the OpenLayers detail view of the metadata editor gallery should check whether theMediaView
is properly configured or at least not null before trying to retrieve it's mime type. In any way, a NullPointerException should not be displayed in the circumstances described above.Screenshots
Release
3.6.0-SNAPSHOT
The text was updated successfully, but these errors were encountered: