Make WordPress Core

Opened 3 months ago

Last modified 3 months ago

#61713 assigned defect (bug)

— no role for this site —

Reported by: hamidsna's profile hamidsna Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.5.5
Component: General Keywords: reporter-feedback
Focuses: Cc:

Description

Hello, sometimes my site mistakenly creates a user with a user role (— no role for this site —). I used to be able to find it easily in the users section, but now there is nothing to find them
Please give me a solution to find them, there are too many users and I can't check them all

Change History (4)

#1 follow-up: @rajinsharwar
3 months ago

Hello there, thank you for your Trac ticket. You can try finding the "No Role" in the Users tab to find the users with no role. Let me know if you can find it, and if we can close this ticket. Thanks!

Last edited 3 months ago by rajinsharwar (previous) (diff)

#2 in reply to: ↑ 1 @hamidsna
3 months ago

Replying to rajinsharwar:

Hello there, thank you for your Trac ticket. You can try finding the "No Role" in the Users tab to find the users with no role. Let me know if you can find it, and if we can close this ticket. Thanks!

I tested on two different sites, none of them show me the list
I disabled all plugins, changed the theme to default wordpress, changed the .htaccess file to default but nothing shows for me

https://i.ibb.co/QPgj14w/sshot-5.jpg
https://i.ibb.co/q1fYvBk/23.jpg

#3 follow-up: @rajinsharwar
3 months ago

  • Keywords reporter-feedback added

That's weird! Can you please try to follow the below instructions to share more information about the issue @hamidsna?

  1. Clone your LIVE site or any site that's having the issue in a STAGING site.
  2. Enable WP DEBUG. Ensure that you do not have any debug.log file under your wp-content folder.
  3. In your code, navigate under wp-admin/includes/class-wp-users-list-table.php
  4. In the file, around line 244, you will notice a line like
    if ( ! empty( $avail_roles['none'] ) ) {
    
  5. Just above that, paste this line of code:
error_log( print_r( $avail_roles, true ) );
  1. Reload the WP Users page in your Admin Dashboard.
  2. A new wp-content/debug.log file will be created where you should see an array of users. Please attach your debug.log file here in this ticket.

Thanks!

#4 in reply to: ↑ 3 @hamidsna
3 months ago

Replying to rajinsharwar:

That's weird! Can you please try to follow the below instructions to share more information about the issue @hamidsna?

  1. Clone your LIVE site or any site that's having the issue in a STAGING site.
  2. Enable WP DEBUG. Ensure that you do not have any debug.log file under your wp-content folder.
  3. In your code, navigate under wp-admin/includes/class-wp-users-list-table.php
  4. In the file, around line 244, you will notice a line like
    if ( ! empty( $avail_roles['none'] ) ) {
    
  5. Just above that, paste this line of code:
error_log( print_r( $avail_roles, true ) );
  1. Reload the WP Users page in your Admin Dashboard.
  2. A new wp-content/debug.log file will be created where you should see an array of users. Please attach your debug.log file here in this ticket.

Thanks!

I added the code you sent, it did what you said, the log file is created, but there is nothing in it

https://i.ibb.co/XjxW3PT/44.jpg

Note: See TracTickets for help on using tickets.