Skip Navigation

[Resolved] User Form – This form can not edit users with a role of [blank]

This support ticket is created 4 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 2.08 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 8 replies, has 2 voices.

Last updated by JamesS2731 4 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#1475675
Screenshot 2020-01-23 at 22.19.09.png
Screenshot 2020-01-23 at 16.57.38.png
Screenshot 2020-01-23 at 16.57.03.png

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

#1476289

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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

#1476859

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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

#1477293

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

#1480303

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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.

#1480401

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

#1480631

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

#1484323

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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

#1500821

That's awesome. Fixed it! Many thanks for all your help Waqar!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.