Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserGroupView missing alertTemplate #2062

Closed
mamelara opened this issue Oct 14, 2022 · 1 comment
Closed

UserGroupView missing alertTemplate #2062

mamelara opened this issue Oct 14, 2022 · 1 comment
Labels
bug good first issue A good place to start contributing to MetacatUI!
Milestone

Comments

@mamelara
Copy link
Collaborator

Describe the bug
When testing out the groups view under settings, I noticed there was an Uncaught error happening when a team save fails:

UserGroupView.js?v=2.22.0:260 Uncaught TypeError: this.alertTemplate is not a function
    at n.showAlert (UserGroupView.js?v=2.22.0:260:11)
    at error (UserGroupView.js?v=2.22.0:235:11)
    at Object.error (UserGroup.js?v=2.22.0:223:7)
    at c (jquery-1.9.1.min.js?v=2.22.0:3:7857)
    at Object.fireWith [as rejectWith] (jquery-1.9.1.min.js?v=2.22.0:3:8658)
    at k (jquery-1.9.1.min.js?v=2.22.0:5:14040)
    at XMLHttpRequest.r (jquery-1.9.1.min.js?v=2.22.0:5:18226)

After some further debugging it looks like when UserGroupView was extracted from UserView, the alertTemplate was missed in the refactor. It is still present in UserView but should be moved to the UserGroupView class.

To Reproduce
Steps to reproduce the behavior:

  1. In order to enforce a failure, you will want to change the url arg in the ajax call in UserGroup to point to a different URL that would produce a save error.
  2. Go to settings page and click on groups
  3. Open up console and create a new group, you should see the same error

Expected behavior
An alert banner should be raised when a group is failed to be created

@mamelara mamelara added the bug label Oct 14, 2022
@robyngit robyngit added the good first issue A good place to start contributing to MetacatUI! label Oct 17, 2022
robyngit added a commit that referenced this issue Nov 7, 2022
@robyngit robyngit added this to the 2.23.0 milestone Nov 7, 2022
@robyngit
Copy link
Member

robyngit commented Nov 7, 2022

Thank you for the detailed issue report, @mamelara! This will be fixed on the next release.

@robyngit robyngit closed this as completed Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue A good place to start contributing to MetacatUI!
Projects
None yet
Development

No branches or pull requests

2 participants