Skip to content

Deletion of identifier input field in submission form yields TypeError: Cannot read properties of null (reading 'get') #4736

@saschaszott

Description

@saschaszott

Describe the bug

When deleting identifier input fields in the submission form, a TypeError is thrown. This issue can be reproduced both in DS9 (DSpace Demo) and in the DSpace Sandbox instance.

Steps to Reproduce:

  1. Start a new item submission.
  2. Select a collection, e.g. “1-step Workflow collection”.
  3. Enter a new ISSN.
  4. Click “Add more” under Identifiers.
  5. Click the trash can button to delete the first identifier form input field.

Error message:

TypeError: Cannot read properties of null (reading 'get')

Additional Information:

  • Even with more than two identifier input fields, the error can be observed when removing any field (except the last one).
  • I was able to reproduce the problem in my local instance. The following line of code appears to be responsible for the error (this.group.get):

if (changes && !this.isRelationship && hasValue(this.group.get(this.model.id))) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    📋 To Do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions