I created an Edit CRED form in order for my users to edit their info.
When I try to edit the info, the form gives me an error:
"The user was not saved because of: Users with the level (missing term) can't be modified through this form".
But the form is setted up to update any users levels except admin, and my testing user is an author, so I don't understand the error message.
Hello. Thank you for contacting the Toolset support.
I'm not aware with the error you shared, I would like to have more information first. Error says user with the level missing term cant be modified.
Based on the information you shared and screenshot, I see that you set the edit form to edit all roles excluding administration that means you set the form to edit any role other than administrator.
I would like to know where you add the edit form? Did you created any taxonomy level or can you tell me how you assigned level taxonomy to users?
- Do you see the form is working as expected with you disable all non-Toolset plugins as well as with default theme?
I added the edit form in a single page "Edit my profil".
I did not create any taxonomy level and I am editing user level's through the "Users" tab in WP dashboard.
Yesterday I've cleaned up all users levels and kept only the main ones (Admin / Editor / Author / Subscriber).
Now, I get another error. The form is setted up to edit all levels except Admin, but it actually shows up only for admin and not Editor / Author / Subscriber.
I tried to disabled Toolset Access and it brought me came back to the previous error (User with "" level access cannot...)
I reinitiated Toolset settings (Toolset / Settings / Access / Reinitiate), but no change
I tried with default WP theme, and the error is still there
For the debug info, do I have a specific field to add it or I just copy-paste here?
It seems you changed the admin access details as the previously shared admin access details is not working now. Can you please share working admin access details.
I have set the next reply to private which means only you and I have access to it.
I'm not sure what caused this but it looks like this issue is specific to this user or maybe you have some plugin that affect this.
Please note that I've removed the user password and confirm password fields from edit form as its not recommended. You may try to add reset password process for that.
I noticed that user with ID: 248 (toolset) since its user meta entry for key "wp_capabilities" is saved differently. The value for the meta key "wp_capabilities" for toolset user was stored as:
As you can see the role administrator is added at first place in serialize array for user meta wp_capabilities.
After that when I try to save the form: hidden link
I can save it.
I'm not sure what plugin or any other thing caused this but you will have to keep track of this to check what plugin is responsible that is changing the wp_capabilities metakey.
User data:
I've created the user through WordPress account tab, like we usually do. I have no clue why WordPress would save it differently. Could it be
Edit form
I've tested with 3 user accounts, and yes, only the toolset one can be edited through the form. All others brings back the "User with (blank) role cannot be edited".
So it's may really be related to the way it was stored in the database, because WP seems not to recognize user role status.
"Mon profil" page:
I've tested with 3 accounts too, and except for the administrative one, the page would not show user info (name and email).
This said, after editing user info for 'toolset', data showed up in the page.
For the second non admin user, trying to update user info (even if it didn't work) made data show up in the "Mon profil" page. So maybe it was a one time bug.
I've tested with and without Toolset plugin enabled, and same results.
Edit form
I've tested with 3 user accounts, and yes, only the toolset one can be edited through the form. All others brings back the "User with (blank) role cannot be edited".
So it's may really be related to the way it was stored in the database, because WP seems not to recognize user role status.
==>
Please disable all other plugins to ensure and that way you will be able to know that if there is any plugin overriding the user capabilities.
I've tested with and without Toolset plugin enabled, and same results.
==>
Please try to create a new site where only Toolset plugins installed and create a new user and see if you can experience the same thing. If you want me to setup a sandbox site for you let me know, I will setup it and send you the link so you can play with it.
Please open a ticket for every new question you may have as we entertain only one question per ticket.