-
Notifications
You must be signed in to change notification settings - Fork 512
Open
Labels
affects: 8.xIssue impacts 8.x releasesIssue impacts 8.x releasesaffects: 9.xIssue impacts 9.x releasesIssue impacts 9.x releasesaffects: mainIssue impacts "main" (latest release).Issue impacts "main" (latest release).bugusability
Description
Describe the bug
Part 1 - When a new user logs in for the first time and is presented with the end user agreement, after checking accept, clicking the 'Save' button initially does nothing.
- After reloading the page, interactivity is restored and the button works.
Part 2 - After clicking 'Save' successfully, the page stalls indefinitely and never redirects to the home page.
- The PATCH request to update end-user metadata on the ePerson succeeds as expected, and then a call to
/server/apisucceeds, but the page remains at/info/end-user-agreement?redirect=%252Fhomewithout redirecting. - Navigation via click also doesn't work, but manually changing the URL does and no other issues were observed after that.
Observed on 8.x, 9.x, main, and https://sandbox.dspace.org/, using Chrome. On the demo site, observed part 2 (stalling after submission), although not part 1.
To Reproduce
Steps to reproduce the behavior:
- Create and log in as a new user
- Attempt to check 'accept' and click 'Save' normally. If nothing happens, reload and try again.
- Once the 'Save' click succeeds, stay on the page to see it stalling indefinitely.
Expected behavior
- The 'Save' button should have full interactivity on the initial load of the page.
- When 'Save' is clicked and if submit succeeds, the page should redirect to
/homesuccessfully.
Related work
N/A
Notes
The submit functionality for the end user agreement can be found here:
/**
* Submit the form
* Set the End User Agreement, display a notification and (optionally) redirect the user back to their original destination
*/
submit() {
this.endUserAgreementService.setUserAcceptedAgreement(this.accepted).pipe(
switchMap((success) => {
if (success) {
this.notificationsService.success(this.translate.instant('info.end-user-agreement.accept.success'));
return this.route.queryParams.pipe(map((params) => params.redirect));
} else {
this.notificationsService.error(this.translate.instant('info.end-user-agreement.accept.error'));
return of(undefined);
}
}),
take(1),
).subscribe((redirectUrl) => {
if (isNotEmpty(redirectUrl)) {
this.router.navigateByUrl(decodeURIComponent(redirectUrl));
}
});
}
Workarounds:
- For part 1, the 'Save' button consistently had normal functionality after a page reload.
- For part 2, once the ePerson request has succeeded, this was possible to bypass just by manually resetting the URL to home or elsewhere.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
affects: 8.xIssue impacts 8.x releasesIssue impacts 8.x releasesaffects: 9.xIssue impacts 9.x releasesIssue impacts 9.x releasesaffects: mainIssue impacts "main" (latest release).Issue impacts "main" (latest release).bugusability
Type
Projects
Status
🏗 In Progress