Tell us what you are trying to do? Add an edit profile link so users can edit their own profile. I created the user form, followed the instructions (see documentation link below) and this works fine for me (as overall admin) editing my own user profile, but if another user (and admin also in this case) third to do the same, they get the following message:
The user was not saved because of the following problem:
This form can not edit users with a role of
Taking advice from the various forum posts on this subject, I've checked permission for the form (see attached pics) and have also tried deactivating all plugins (except Toolset) to see if that fixes the issue. It hasn't.
Is there any documentation that you are following? Yes - https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing
Is there a similar example that we can see? hidden link
What is the link to your site? hidden link
As always, any thought or ideas most welcomed.
Kind regards
James
Hi James,
Thank you for contacting us and I'd be happy to assist.
During the initial testing on my own website, I couldn't reproduce this issue.
Can you please share temporary admin login details, so that I can see exactly how this form is set up?
Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.
regards,
Waqar
Hi James,
Thank you for sharing the admin access.
I created similar content templates, user edit forms and edit form links on my test website, but the form worked as expected for users with different roles, every time.
To troubleshoot this in more depth, I'll need a clone/snapshot of your website, so that it can be tested on a different server, without affecting your actual website.
I've set your next reply as private and you can share a clone/snapshot, as suggested in this guide:
https://toolset.com/faq/provide-supporters-copy-site/
Important: Please also share which user(s) was used for testing when you saw the error message.
regards,
Waqar
Hi Waqar,
Just a quick update. I've just created a new user, logged in as them and updated their Rider profile without an error. I've asked Roy to try again and see if he can now update his.
I'll let you know the outcome.
Kind regards
James
Hi James,
Thank you for sharing the duplicator package and I was able to successfully deploy it on my server.
I'll be performing some tests and troubleshooting on it and will share my findings with you.
Meanwhile, you're also welcome to share any further results from your side.
Hi Waqar,
Many thanks. I look forward to any thoughts.
Roy (roybarton)tested editing his profile again, but got the same message as before. So it appears new users are Ok, and I'm Ok (as main admin).
Kind regards
James
Hi Waqar,
Just a quick update. I changed Authors for Roys profile and they could edit the Rider without issue. As such, it may just be Roys user profile that causing the issue
Kind regards
James
Hi James,
Thank you for waiting while I performed some troubleshooting on your website's clone.
I noticed that the issue seems specific to the user with ID: 4 ( "roybarton" ), since its user meta entry for key "wpkc_capabilities" is saved differently, then other users, in the "wpkc_usermeta" table.
a:13:{s:26:"wpcf_custom_post_type_view";b:1;s:26:"wpcf_custom_post_type_edit";b:1;s:33:"wpcf_custom_post_type_edit_others";b:1;s:25:"wpcf_custom_taxonomy_view";b:1;s:25:"wpcf_custom_taxonomy_edit";b:1;s:32:"wpcf_custom_taxonomy_edit_others";b:1;s:22:"wpcf_custom_field_view";b:1;s:22:"wpcf_custom_field_edit";b:1;s:29:"wpcf_custom_field_edit_others";b:1;s:25:"wpcf_user_meta_field_view";b:1;s:25:"wpcf_user_meta_field_edit";b:1;s:32:"wpcf_user_meta_field_edit_others";b:1;s:13:"administrator";b:1;}
Usually, the user role information is the first item in this serialized data:
a:13:{s:13:"administrator";b:1;s:26:"wpcf_custom_post_type_view";b:1;s:26:"wpcf_custom_post_type_edit";b:1;s:33:"wpcf_custom_post_type_edit_others";b:1;s:25:"wpcf_custom_taxonomy_view";b:1;s:25:"wpcf_custom_taxonomy_edit";b:1;s:32:"wpcf_custom_taxonomy_edit_others";b:1;s:22:"wpcf_custom_field_view";b:1;s:22:"wpcf_custom_field_edit";b:1;s:29:"wpcf_custom_field_edit_others";b:1;s:25:"wpcf_user_meta_field_view";b:1;s:25:"wpcf_user_meta_field_edit";b:1;s:32:"wpcf_user_meta_field_edit_others";b:1;}
I've shared these findings with the concerned team for further review and will keep you updated on the progress through this ticket.
For now, a workaround can be to either delete this user and create a new one or update the user meta entry record in the database for this existing user, but only if you're comfortable with making database changes, through a tool like phpMyAdmin.
( ref: hidden link )
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
That's awesome. Fixed it! Many thanks for all your help Waqar!