Dear all,
I have introduced entities into our DSpace 8.2 installation. While I have modified some relationships, all entities remain standard and mostly functional. However, I am experiencing an issue with unselecting entities in the submission form.
I defined a <relation-field> that is non-repeatable, as shown below:
<relation-field>
<relationship-type>isPublicationOfIssue</relationship-type>
<search-configuration>publication</search-configuration>
<repeatable>false</repeatable>
<label>Publication</label>
<hint></hint>
<linked-metadata-field>
<dc-schema>journalIssue</dc-schema>
<dc-element>relation</dc-element>
<dc-qualifier>publication</dc-qualifier>
<input-type>onebox</input-type>
</linked-metadata-field>
<externalsources></externalsources>
</relation-field>
The problem is that the UI does not update immediately after deleting or unselecting the entity, it only refreshes after performing another action (like adding an entity in another relation-field). Additionally, I encounter the following error, which appears to be related to the system expecting a repeatable field. When I set the field as repeatable, unselecting works fine; the issue only occurs with non-repeatable fields.
ERROR TypeError: Cannot read properties of null (reading 'context')
at DsDynamicFormControlContainerComponent.onRemove (ds-dynamic-form-control-container.component.ts:471:94)
at DsDynamicFormControlContainerComponent_ng_container_14_ds_existing_metadata_list_element_1_Template_ds_existing_metadata_list_element_remove_0_listener (ds-dynamic-form-control-container.component.html:70:17)
at executeListenerWithErrorHandling (core.mjs:25638:16)
at Object.wrapListenerIn_markDirtyAndPreventDefault [as next] (core.mjs:25672:22)
at ConsumerObserver.next (Subscriber.js:91:33)
at SafeSubscriber._next (Subscriber.js:60:26)
at SafeSubscriber.next (Subscriber.js:31:18)
at Subject.js:34:30
at errorContext (errorContext.js:19:9)
at EventEmitter_.next (Subject.js:27:21)
Has anyone experienced similar issues or found a solution?
Thank you and best regards,
Martin