No Code Attached Yet bug
avatar pbrugma
pbrugma
18 Mar 2024

Steps to reproduce the issue

Define an account user field and make this field mandatory. Create a new account and add a value to the newly created user field. Logon with the new account and access the View Profile function (option=com_users&view=profile). Click on Update Profile. The user field value is displayed with grey background (= cannot be changed). Change the name, password or email address and save this change. Error message "Mandatory field: " is displayed and change is not applied.

Expected result

Save the account update, with the mandatory user field value as displayed with grey background.

Actual result

Error message "Mandatory field: " when user updates user profile.

System information (as much as possible)

J4.4.3 with Dutch language

Additional comments

See attached files. I am not sure the files are uploaded. Something happened but there is no traces of 1 txt en 3 jpg files.

avatar pbrugma pbrugma - open - 18 Mar 2024
avatar pbrugma pbrugma - change - 18 Mar 2024
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 18 Mar 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 18 Mar 2024
avatar brianteeman
brianteeman - comment - 18 Mar 2024

Sounds like you have not set the permissions of the field correctly

avatar pbrugma pbrugma - change - 18 Mar 2024
Title
J4.4 Mandatory user field error when user updates profile
J4.4 Mandatory user field error when user updates profile (user cannot change password)
avatar pbrugma
pbrugma - comment - 18 Mar 2024

Any idea which permission is incorrect?
The user field is mandatory. In the user profile view the field has a value (value is displayed). Why does the system say that the value is missing?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43088.

avatar Hackwar Hackwar - change - 24 Mar 2024
Labels Added: bug
avatar Hackwar Hackwar - labeled - 24 Mar 2024
avatar chmst
chmst - comment - 26 Mar 2024

Check the permission in the field itself. The screen is an example for you where to change permissions
grafik

avatar pbrugma
pbrugma - comment - 26 Mar 2024

chmst thanks for your reply.
The proposed permission change makes it possible for the user to update the mandatory field. That is not what we are looking for. For the administrator the user field (in our case membership number) should be mandatory to complete. For the user the user field should be display-only.
When the user field is set to Mandatory its content is displayed on the Profile View/Update screen, but cannot be updated (that is what we want). When the user tries to change the name, password or email address in the Profile Update function, the system replies that the user field is mandatory. The user field (display-only) value is visible. I expect the system to use the content of the user field as displayed.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43088.

avatar mabdelaziz77
mabdelaziz77 - comment - 4 May 2024

I think this is the scenario:
Normally the disabled field is not submitted with the form, so when the table checks for that field before saving the record, it does not find it in the submitted form data, so it is considered empty and the error message is displayed because it is a mandatory field!

What is the best solution to handle that issue?
If there is an acceptable approach I can implement it.
I think about adding a javascript function to set the field disabled attribute to false before submitting the form, so the field value can be submitted with the form.

Add a Comment

Login with GitHub to post a comment