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

Admin Console doesn't show user when user attribute has annotation inputType #23740

Closed
2 tasks done
jbman opened this issue Oct 5, 2023 · 8 comments · Fixed by #23537
Closed
2 tasks done

Admin Console doesn't show user when user attribute has annotation inputType #23740

jbman opened this issue Oct 5, 2023 · 8 comments · Fixed by #23537
Labels
area/admin/ui impact/high kind/bug Categorizes a PR related to a bug priority/blocker Highest Priority. Has a deadline and it blocks other tasks team/ui
Milestone

Comments

@jbman
Copy link

jbman commented Oct 5, 2023

Before reporting an issue

Area

admin/ui

Describe the bug

When user profile is activated and an attribute has annotation with key "inputType" (e.g. inputType=select) then the user view just shows error message "undefined has no properties".

image

Version

22.0.4

Expected behavior

User view is rendered

Actual behavior

Error is shown
Browser console shows at react-dom.production.min.js:189:29

TypeError: undefined has no properties D SelectComponent.tsx:16 React 9 Ot EditUser.tsx:121 useFetch useFetch.ts:33 promise callback*useFetch/< useFetch.ts:31 React 6 Xr EditUser.tsx:81 useFetch useFetch.ts:33 promise callback*useFetch/< useFetch.ts:31 React 3 ct scheduler.production.min.js:13 At scheduler.production.min.js:14 EventHandlerNonNull* scheduler.production.min.js:14 <anonymous> scheduler.production.min.js:19 react-dom.production.min.js:189:29 React 12 Ot EditUser.tsx:121 useFetch useFetch.ts:33 (Async: promise callback) useFetch useFetch.ts:31 React 6 Xr EditUser.tsx:81 useFetch useFetch.ts:33 (Async: promise callback) useFetch useFetch.ts:31 React 3 ct scheduler.production.min.js:13 At scheduler.production.min.js:14 (Async: EventHandlerNonNull) <anonymous> scheduler.production.min.js:14 <anonymous> scheduler.production.min.js:19

How to Reproduce?

  • Activate user profile
  • Create a new attribute and set it as viewable and writable for Admin
  • Add annotation inputType=select
  • Open a user (e.g. admin)

Anything else?

Could reproduce with 22.0.4 but not with latest nightly release.

@jbman jbman added kind/bug Categorizes a PR related to a bug status/triage labels Oct 5, 2023
@jbman jbman changed the title Admin Console doesn't show user when user attribute with annotation inputType Admin Console doesn't show user when user attribute has annotation inputType Oct 5, 2023
@sschu
Copy link
Contributor

sschu commented Oct 5, 2023

@jonkoops @ssilvert I would rate this as critical (it is at least for us) and schedule to be fixed for 22.0.5. Do you agree?

@jbman
Copy link
Author

jbman commented Oct 5, 2023

In addition to this bug, we discovered that attributes are not send or retrieved by the Admin console user view in 22.0.4.
This occurs when an admin-readable and -writable attribute is defined without any annotation.

Also on nightly it wasn't possible to store a value without error in JS console. Do we need to report this as own bug? (Did not search if it already is.)

Update: Created #23774

@antikalk
Copy link
Contributor

antikalk commented Oct 5, 2023

I guess this is related to #23180 which is closed.

@ssilvert
Copy link
Contributor

ssilvert commented Oct 6, 2023

#23180 should have been in 22.0.4.

We are making some fixes in this area right now. I'll give everyone a heads up to make sure the bugs reported here are addressed.

@jonkoops
Copy link
Contributor

jonkoops commented Oct 6, 2023

#23180 should have been in 22.0.4.

This was back-ported, see #23180 (comment). But it was never the whole fix.

@jonkoops jonkoops added priority/blocker Highest Priority. Has a deadline and it blocks other tasks and removed status/triage labels Oct 6, 2023
@jonkoops
Copy link
Contributor

jonkoops commented Oct 6, 2023

I would rate this as critical (it is at least for us) and schedule to be fixed for 22.0.5. Do you agree?

Yes, it most certainly is. And it will be fixed by #23537.

@jonkoops jonkoops added this to the 22.0.5 milestone Oct 6, 2023
pedroigor added a commit that referenced this issue Oct 6, 2023
Closes #23507, #23584, #23740, #23774

Co-authored-by: Jon Koops <jonkoops@gmail.com>
jonkoops added a commit to jonkoops/keycloak that referenced this issue Oct 6, 2023
jonkoops added a commit to jonkoops/keycloak that referenced this issue Oct 6, 2023
@jbman
Copy link
Author

jbman commented Oct 9, 2023

Retested with nightly, looks good now. Thanks for fast fixing!

@jonkoops
Copy link
Contributor

jonkoops commented Oct 9, 2023

Thanks for verifying that @jbman, we'll likely have a patch release next week if all goes well.

jonkoops added a commit to jonkoops/keycloak that referenced this issue Oct 10, 2023
jonkoops added a commit to jonkoops/keycloak that referenced this issue Oct 10, 2023
jonkoops added a commit to jonkoops/keycloak that referenced this issue Oct 10, 2023
pedroigor added a commit that referenced this issue Oct 13, 2023
Backports #23507, #23584, #23740, #23774, #22982

Co-authored-by: Pedro Igor <pigor.craveiro@gmail.com>
srose pushed a commit to srose/keycloak that referenced this issue Dec 20, 2023
kamontat pushed a commit to kamontat/keycloak that referenced this issue Jan 20, 2024
Closes keycloak#23507, keycloak#23584, keycloak#23740, keycloak#23774

Co-authored-by: Jon Koops <jonkoops@gmail.com>
Signed-off-by: Kamontat Chantrachirathumrong <14089557+kamontat@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/admin/ui impact/high kind/bug Categorizes a PR related to a bug priority/blocker Highest Priority. Has a deadline and it blocks other tasks team/ui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants