[wp-trac] [WordPress Trac] #14572: post_author_meta_box causes fatal error on site with large userbase.

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 9 18:52:23 UTC 2010


#14572: post_author_meta_box causes fatal error on site with large userbase.
----------------------------+-----------------------------------------------
 Reporter:  tomdebruin      |       Owner:                
     Type:  defect (bug)    |      Status:  new           
 Priority:  normal          |   Milestone:  Future Release
Component:  Administration  |     Version:  3.0.1         
 Severity:  normal          |    Keywords:  needs-patch   
----------------------------+-----------------------------------------------

Comment(by ryan):

 The whole code path for this is a mess.  We call get_editable_user_ids()
 to determine whether we should display the post author meta box. We then
 call post_author_meta_box() where get_editable_user_ids() is called again.
 We now have two copies of this information in memory. From there we pass
 the IDs to wp_dropdown_users() which does another users query or uses more
 memory. Lame.

 We need a proper get_users() function that can list users for a given blog
 (current blog by default) and return just IDs or entire user objects.
 get_users_of_blog() could call this and get_editable_user_ids() could be
 deprecated.  WP_User_Search could use get_users() too.  All places that
 query on user_level need to be removed.  There's no need to treat
 multisite and single site differently when look for the users on a given
 blog.  $prefix_capabilities should always be used.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14572#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list