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

WordPress Trac noreply at wordpress.org
Fri May 22 13:17:23 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 neo2k23):

 @mindctrl yes and no.... and i disagree and lean more towards yes
 because...:

 Why is this the only option that has this structure in the option table?

 {prefix}{blog_id}{option_name}

 if it had been {prefix}{option_name} it would have been not a single
 issue.

 There is not a single valid reason to add the blog_id into the option
 itself as the option is already stored in {prefix}_{blog_id}_{options}
 table.

 So the issue is more or less caused by the way wordpress creats the
 user_roles option in the database for multisite.

 The issue does not occur in a single site as the {blog_id} is not present
 in the variable itself

 So it is more like a "bug"

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


More information about the wp-trac mailing list