DSpace / dspace-angular

DSpace User Interface built on Angular.io
https://wiki.lyrasis.org/display/DSDOC8x/
BSD 3-Clause "New" or "Revised" License
132 stars 433 forks source link

Browser hangs due to infinite loop when editing groups #3257

Open jlipka opened 2 months ago

jlipka commented 2 months ago

Describe the bug

In DSpace v8, there is a bug when editing (access control) groups under certain circumstances (see steps to reproduce). As a result, the browser hangs due to an infinite loop and the target page is never reached.

To Reproduce

  1. Login as admin
  2. Go to "EDIT > COLLECTION".
  3. Select any collection - e.g. "Statistics > Books"
  4. Click on "Assign Roles"
  5. Click on any link to edit a group -- if none exists, create one using the UI buttons, in my case on "sandbox.dspace.org" the group is called "COLLECTION_7f052d6e-f7f7-4661-8347-701016969365_WORKFLOW_ROLE_editor".
  6. Scroll down to the last section called "Groups" and click any link in the paginated table, for example, the "Administrator" item.
  7. Now an endless loop starts, the browser hangs after a while and the UI gets stuck, the target link is never reached

While debugging or logging on the console, you can see (at least) in this line - https://github.com/DSpace/dspace-angular/blob/ee7e8358e7e0fd0b69f7c2e308d539670a103026/src/app/access-control/group-registry/group-form/group-form.component.ts#L537 - that this function is called in an infitine loop.

Other click sequences do not necessarily lead to the problem.

Expected behavior

The click on the link should not lead to an infinite loop.

tdonohue commented 2 months ago

Moving this to the maintenance board & flagging as high priority. I have not verified the behavior myself, but it sounds like a bug. Someone should also verify whether the same bug appears in 7.6.x or not.

amgciadev commented 1 month ago

Hi, I've replicated the issue in a 8.x instance, and can confirm that this does not happen in a 7.6.2 instance.

alexandrevryghem commented 1 month ago

Atmire would like to claim this

tdonohue commented 1 month ago

Thanks @alexandrevryghem ! Assigned to you