Skip to content

Fixed loading translation values for User Profile attributes#28408

Closed
agagancarczyk wants to merge 10 commits into
keycloak:mainfrom
agagancarczyk:isssue-27837
Closed

Fixed loading translation values for User Profile attributes#28408
agagancarczyk wants to merge 10 commits into
keycloak:mainfrom
agagancarczyk:isssue-27837

Conversation

@agagancarczyk

Copy link
Copy Markdown
Contributor

Closes #27837

@agagancarczyk agagancarczyk added this to the 25.0.0 milestone Apr 3, 2024
@agagancarczyk agagancarczyk self-assigned this Apr 3, 2024
@agagancarczyk agagancarczyk requested a review from a team as a code owner April 3, 2024 13:53
jonkoops
jonkoops previously approved these changes Apr 3, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use the useFetch() utility here?

@agagancarczyk agagancarczyk Apr 3, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good @jonkoops , let's useFetch() instead

@ssilvert ssilvert left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried the code out and it's not working. When I click on the button to bring up the translations dialog I get a NullPointerException on the server. I am using the latest nightly build of the server.
Caused by: java.lang.NullPointerException: Cannot invoke "org.keycloak.models.UserSessionModel.getUser()" because "userSession" is null

The request that is failing is http://localhost:8180/admin/realms/test/localization/en.
500 Internal Server Error

@agagancarczyk Maybe try this with the latest nightly and see if you see this too?

@jonkoops

jonkoops commented Apr 4, 2024

Copy link
Copy Markdown
Contributor

@ssilvert I've also been seeing that error locally in other places, it is related how things are proxied during development. It should work if you do a full production build and test against that. Unfortunately, this also makes it impossible to run the Cypress tests on some suites against the development server.

I think we should unify the dev server and the Keycloak server, so that the Keycloak server always is responsible for serving the front-end, even during development. I've started #27311 as a thought experiment on how to accomplish this.

@ssilvert

ssilvert commented Apr 4, 2024

Copy link
Copy Markdown
Contributor

@agagancarczyk @jonkoops OK, I was able to run the code by doing a full build and scenario 1 is fixed.

I am still seeing scenario 2 from the issue. Agi, note that I updated the steps for scenario 2 as I was unclear in my original post.

I also added scenario 3, which is another related problem. See the issue.

@ssilvert

ssilvert commented Apr 4, 2024

Copy link
Copy Markdown
Contributor

I think we should unify the dev server and the Keycloak server, so that the Keycloak server always is responsible for serving the front-end, even during development. I've started #27311 as a thought experiment on how to accomplish this.

@jonkoops That would be amazing if you can pull it off. It would also solve some other problems I've seen such as changes to message bundles that are not being reflected in dev mode.

@jonkoops

jonkoops commented Apr 4, 2024

Copy link
Copy Markdown
Contributor

I'll try to put some time into it when we're done with the PatternFly migration 👍

@agagancarczyk

Copy link
Copy Markdown
Contributor Author

@agagancarczyk @jonkoops OK, I was able to run the code by doing a full build and scenario 1 is fixed.

I am still seeing scenario 2 from the issue. Agi, note that I updated the steps for scenario 2 as I was unclear in my original post.

I also added scenario 3, which is another related problem. See the issue.

@ssilvert scenario 2 has also been fixed. Can you try again? I pushed a fix yesterday. Maybe you are expecting something else? I'll take a look at scenario 3.

@agagancarczyk agagancarczyk marked this pull request as draft April 16, 2024 07:48
@agagancarczyk agagancarczyk force-pushed the isssue-27837 branch 3 times, most recently from 5c80ea7 to f9d6f10 Compare April 18, 2024 11:53
@agagancarczyk agagancarczyk marked this pull request as ready for review April 18, 2024 12:11
Signed-off-by: Agnieszka Gancarczyk <agancarc@redhat.com>
Signed-off-by: Agnieszka Gancarczyk <agancarc@redhat.com>
Signed-off-by: Agnieszka Gancarczyk <agancarc@redhat.com>
Signed-off-by: Agnieszka Gancarczyk <agancarc@redhat.com>
Signed-off-by: Agnieszka Gancarczyk <agancarc@redhat.com>
Signed-off-by: Agnieszka Gancarczyk <agancarc@redhat.com>
Signed-off-by: Agnieszka Gancarczyk <agancarc@redhat.com>
Signed-off-by: Agnieszka Gancarczyk <agancarc@redhat.com>
Signed-off-by: Agnieszka Gancarczyk <agancarc@redhat.com>
@agagancarczyk

Copy link
Copy Markdown
Contributor Author

Closing this PR as it's old in favour of #28899

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Translation values not loaded for User Profile attributes

3 participants