Open henning-gerhardt opened 1 year ago
This happens if nothing is selected for "Metadata format of upload file"
. Even if it appears like MODS
is selected here, the selected value is NULL until one selects a value by hand.
This leads to metadaformat
being NULL here:
https://github.com/kitodo/kitodo-production/blob/3f6010fb0a4369570d624bf500d3cd452ea1e204/Kitodo/src/main/java/org/kitodo/production/forms/validators/ImportConfigurationMappingValidator.java#L58
I think this has been resolved in the current master branch. Configuring an ImportConfiguration of type FileUpload
without explicitely setting a metadata format still does not correctly set the displayed default value "MODS" in the background, but the exception is handled in the form validation and displays a proper error message (instead of an unhandled stack trace):
(it should save the configuration successfully since MODS appears to be selected, though)
@henning-gerhardt & @BartChris can you confirm this?
@solth I can confirm that the message is now displayed and no stack trace is shown, so the situation is improved in Master. However, the German translation for the message is missing: https://github.com/kitodo/kitodo-production/blob/ca015ec490301b52471d91fd513b891b2ea95950/Kitodo/src/main/resources/messages/messages_de.properties#L639
Describe the bug Creating a new import configuration can cause a null pointer exception like
To Reproduce Steps to reproduce the behavior:
Expected behavior In case of a configuration error an error message should appear and not a null pointer exception
Release 3.6.0-SNAPSHOT (master branch from March 1th 2023 commit 5b60965afb8a9512b0021b416ad98291971e66a4)