[wp-trac] [WordPress Trac] #63068: Administrator Role Changed to "No Roles" Causes Internal Server Error

WordPress Trac noreply at wordpress.org
Thu Mar 6 18:54:27 UTC 2025


#63068: Administrator Role Changed to "No Roles" Causes Internal Server Error
------------------------------+-----------------------------
 Reporter:  jomonthomaslobo1  |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  General           |    Version:
 Severity:  normal            |   Keywords:
  Focuses:  administration    |
------------------------------+-----------------------------
 **Environment Details:**
 WordPress Version: 6.8 Beta 1
 PHP Version: 8.1
 Database: MySQL 8.0 / MariaDB 10.5
 Web Server: Apache/Nginx
 Theme: Twenty Twenty-Four
 Plugins Installed: WP Beta Tester

 **Bug Description:**
 After upgrading to WordPress 6.8 Beta 1, if the only Administrator user is
 changed to “No Roles Assigned”, the site crashes with an Internal Server
 Error (500). This should be handled gracefully and don't allow role change
 if tehre is only one user.
 **
 Expected Behavior**
 1. WordPress should prevent removing the last Administrator role.
 2. An error message should be displayed instead of allowing the change.
 3. The system should gracefully handle such role changes instead of
 causing a site crash.

 **Actual Behavior**
 The site crashes immediately after saving the role change.
 **
 Steps to Reproduce**
 1. Upgrade to WordPress 6.8 Beta 1.
 2. Ensure there is only one administrator account.
 3. Go to Users > All Users, select the administrator account.
 4. Change the role to “No Role for This Site” and save.


 **Result:** The site shows a 500 Internal Server Error,
 [[Image(https://i.ibb.co/ZzjHC12C/Screenshot-
 From-2025-03-07-00-07-36.png)]]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63068>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list