Skip Navigation

[Gelöst] "This form can not edit users with a role of"

This support ticket is created vor 4 Jahren, 10 Monaten. 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Dieses Thema enthält 8 Antworten, hat 3 Stimmen.

Zuletzt aktualisiert von marcialB vor 4 Jahren, 9 Monaten.

Assistiert von: Christian Cox.

Author
Artikel
#1503553

Hi there

When a users on our platform want to change something in their profile, they see that message:

This form can not edit users with a role of

But there is no role added at the end of that text.

I'm pretty sure it worked a few days ago. I since added a new custom user field to the users and to that CRED form. But I can't imagine how this could affect this.

I'd like to provide more information but have no idea what you need next. But I can grant you backend access.

Best,
Marcial

#1503815

Hi, I'll be glad to take a closer look. Please provide login credentials here and let me know where I can find the Form on the front-end of the site.

#1505749

Okay I can see another similar report here: https://toolset.com/forums/topic/user-form-this-form-can-not-edit-users-with-a-role-of-blank/

The issue seems to occur when multiple roles are used, and we have escalated the problem to our developers. I don't think it will be a quick resolution, because it affects quite a large amount of our codebase. I will be glad to connect this ticket to our internal bug tracker so I can keep you posted as we work to resolve the situation.

Waqar proposed one possible solution, but it requires manually updating the database for each User that has this problem.

#1506603

Hi Christian

Thanks for your feedback. I was hoping there was a simpler solution. But for now, I'll check the database and get back to you in case I'm unsure what to change.

Best,
Marcial

#1507325

Thanks, I'll stand by for your update.

#1512653

Hi Christian

The code in the affected user looks like this:

 a:3:{s:8:"Mitglied";b:1;s:8:"mitglied";b:1;s:6:"editor";b:1;} 

That user had two roles. When removing the "editor" role via wordpress backend, it looks like this:

 a:2:{s:8:"Mitglied";b:1;s:8:"mitglied";b:1;} 

In other users with only one role it's like this:

 a:2:{s:8:"Mitglied";b:1;s:8:"mitglied";b:1;} 

So there's no difference now. But it still doesn't work for that user. The same error message pops up.

What now?

#1513463

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Marcial,

Christian is currently out today, however he will be back tomorrow to continue working on this issue with you.

Thank you for the continued patience.

#1515299

So if a User only has one role "Mitglied", then the capability value should be:

a:1:{s:8:"mitglied";b:1;}

Lowercase "m", and not repeated.

#1516105

Hi Christian

Thank you very much. I was able to find/replace the faulty entries in phpMyAdmin and thus solved the problem for all the users.

I assume the problem started when importing the users (WP ALL Import with an Excel-Sheet). The user role was written with an uppercase first letter.

Thanks again!