-
Bug
-
Resolution: Done
-
Undefined
-
None
-
False
-
-
False
-
-
Before reporting an issue
[X] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
user-profile
Describe the bug
Starting with Keycloak 24.0.2, when creating a user profile with a "select-radiobuttons" with options validation "on" and "off", in the display the first option is rendered as "n" and the second one is empty.
Here is the display in the keycloak admin, user detail page.
!image
The problem exist too in the account page for the personnal info, with exactly the same bug.
Please note that the problem was not here with Keycloak 24.0.1.
Version
24.0.2
Regression
[X] The issue is a regression
Expected behavior
The user is attribute multi select is displayed with the values of the multiselect, in this example "on" and "off" for instance.
Actual behavior
The rendering of the HTML is broken:
- the label of the first value is "n" instead of "on".
- the label is missing for the second attribute.
```
<div class="pf-c-form__group-control"><div class="pf-c-radio"> <input id="on" data-testid="on" class="pf-c-radio__input" type="radio" aria-invalid="false" data-ouia-component-type="PF4/Radio" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Radio-1" value="on" data-form-type="other"> <label class="pf-c-radio__label" for="on">n</label> </div> <div class="pf-c-radio pf-m-standalone"> <input id="off" data-testid="off" class="pf-c-radio__input" type="radio" aria-invalid="false" data-ouia-component-type="PF4/Radio" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Radio-2" value="off" checked=""> </div>
</div>
{ "attributes": [ {code}h3. How to Reproduce? Create a user attribute of type "select-radiobuttons" with "on" and "off" as valid values. Here is a configuration of the concerned attribute, here named "optin". ![image|https://github.com/keycloak/keycloak/assets/1038299/da34b85d-65c7-49ab-87c6-a5ed9faa0253] Here is the complete save of the user profile json config.
{
{ "min": 3, "max": 255 }
"name": "username",
"displayName": "${username}",
"validations": {
"length":,
{ "view": [ "admin", "user" ], "edit": [ "admin", "user" ] }
"username-prohibited-characters": {},
"up-username-not-idn-homograph": {}
},
"permissions":,
{ "max": 255 }
"multivalued": false
},
{
"name": "email",
"displayName": "${email}",
"validations": {
"email": {},
"length":},
{ "roles": [ "user" ] }
"required":,
{ "view": [ "admin", "user" ], "edit": [ "admin", "user" ] }
"permissions":,
{ "max": 255 }
"multivalued": false
},
{
"name": "firstName",
"displayName": "${firstName}",
"validations": {
"length":,
{ "roles": [ "user" ] }
"person-name-prohibited-characters": {}
},
"required":,
{ "view": [ "admin", "user" ], "edit": [ "admin", "user" ] }
"permissions":,
{ "max": 255 }
"multivalued": false
},
{
"name": "lastName",
"displayName": "${lastName}",
"validations": {
"length":,
{ "roles": [ "user" ] }
"person-name-prohibited-characters": {}
},
"required":,
{ "view": [ "admin", "user" ], "edit": [ "admin", "user" ] }
"permissions":,
"multivalued": false
},
{
"name": "optin",
"displayName": "Product",
"validations":Unknown macro: { "options"},
{ "inputHelperTextAfter": "Test text", "inputType": "select-radiobuttons" }
"annotations":,
{ "roles": [ "user" ] }
"required":,
{ "view": [ "admin", "user" ], "edit": [ "admin", "user" ] }
"permissions":,
"multivalued": false
}{ "name": "user-metadata", "displayHeader": "User metadata", "displayDescription": "Attributes, which refer to user metadata" } {code}], "groups": [
],
"unmanagedAttributePolicy": "ENABLED"
}
```
Anything else?
No response
- links to