Repository navigation
realmName attribute is empty in Email template #27051
|
Hello, I am trying to put together a custom theme for emails and I encountered an issue. When running the code locally (docker compose) I get the expected result. But running it in our DEV environment results in the realmName attribute being empty when the email is generated. Our realms are called dev and stage so no special characters. We do not set display names for the realms. I checked the database and the name column is properly set. Keycloak version: 22.0.5 The function where realmName is used: Result locally for realm myrealm: https://subdomain.myrealm.company.com Thank you! |
Replies: 2 comments 1 reply
|
What happens is that when the Realm settings page is saved, the Display name value is saved even if it was not changed. This means that the first time the Realm settings page is saved the displayName record is created in the database with an empty value. The realm.displayName is no longer null but an empty string and retrieved by the template provider. |
|
Is this the expected behaviour or can this be considered a bug? |
What happens is that when the Realm settings page is saved, the Display name value is saved even if it was not changed. This means that the first time the Realm settings page is saved the displayName record is created in the database with an empty value. The realm.displayName is no longer null but an empty string and retrieved by the template provider.