[wp-trac] [WordPress Trac] #65241: get_editable_roles() returns empty array in multisite

WordPress Trac noreply at wordpress.org
Thu May 28 07:04:56 UTC 2026


#65241: get_editable_roles() returns empty array in multisite
--------------------------------------------------+---------------------
 Reporter:  neo2k23                               |       Owner:  (none)
     Type:  defect (bug)                          |      Status:  new
 Priority:  normal                                |   Milestone:  7.0.1
Component:  General                               |     Version:
 Severity:  normal                                |  Resolution:
 Keywords:  has-patch has-unit-tests 2nd-opinion  |     Focuses:
--------------------------------------------------+---------------------

Comment (by mehul0810):

 I have reviewed the ticket, and my current understanding is that this is
 more of a migration/data integrity issue than a WordPress Core bug.

 WordPress uses the configured database prefix to determine the expected
 table names and related prefixed keys. If a multisite database is migrated
 and the table prefix is changed after installation, the migration process
 needs to update all prefix-dependent data, not only `$table_prefix` and
 the physical table names.

 The [WordPress migration documentation](https://developer.wordpress.org
 /advanced-administration/upgrade/migrating/#altering-table-prefixes)
 already calls out that changing table prefixes requires updating prefixed
 usermeta keys as part of the migration. In this ticket, the stale
 `wp_10_user_roles` option appears to be the same category of issue:
 prefix-dependent data was left behind under the old prefix.

 Because of that, it feels this can be better handled by the migration
 tooling or by an explicit repair step, using tools such as WP-CLI or SQL
 commands or a migration plugin that is responsible for completing the
 prefix migration.

 cc: @mindctrl @neo2k23

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/65241#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list