[wp-trac] [WordPress Trac] #20329: Custom Post Type - 500 error when viewing list in WP backend

WordPress Trac wp-trac at lists.automattic.com
Thu Mar 29 23:23:32 UTC 2012


#20329: Custom Post Type - 500 error when viewing list in WP backend
--------------------------+------------------------------
 Reporter:  rivkadr       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  3.3.1
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Old description:

> This does not appear to be occurring under administrator roles; only for
> lesser roles that have been given edit privileges for the custom post
> type in question.
>
> Appears to be the same as what has been reported in this thread here:
>
> http://wordpress.org/support/topic/500-internal-server-error-for-custom-
> post-type
>
> Important things to note:
>
> - adding &orderby=date to the end of the url allows the list to load
>
> - we have multiple installs of this database (dev, local, and live
> server). The loading of the list works on two of those installs, both of
> which contain only 250 posts in that custom post type. The one install
> that keeps throwing up the 500 error has 1500 posts in it. That's the
> only difference between the 3 installs (all users, permissions, and
> server settings are the same)
>
> The custom post type was created using the following code:
>
> $labels = array(
>                         'name' => _x('Sites', 'post type general name'),
>                         'singular_name' => _x('Site', 'post type singular
> name'),
>                         'add_new' => _x('Add New', 'site'),
>                         'add_new_item' => __('Add New Site'),
>                         'edit_item' => __('Edit Site'),
>                         'new_item' => __('New Site'),
>                         'view_item' => __('View Site'),
>                         'search_items' => __('Search Sites'),
>                         'not_found' =>  __('No sites found'),
>                         'not_found_in_trash' => __('No sites found in
> Trash'),
>                         'parent_item_colon' => ''
>                 );
>
>                 $args = array(
>                         'labels' => $labels,
>                         'public' => true,
>                         'publicly_queryable' => true,
>                         'show_ui' => true,
>                         'menu_position' => 5,
>                         'supports' => array('title', 'thumbnail', 'page-
> attributes', 'revisions'),
>                         'taxonomies' => array('post_tag','sitestatus',
> 'selection-status'),
>                         'hierarchical' => true,
>                         'capability_type' => 'site',
>                         'capabilities' => array(
>                                 'publish_posts' => 'publish_sites',
>                                 'edit_posts' => 'edit_sites',
>                                 'edit_others_posts' =>
> 'edit_others_sites',
>                                 'delete_posts' => 'delete_sites',
>                                 'delete_others_posts' =>
> 'delete_others_sites',
>                                 'read_private_posts' =>
> 'read_private_sites',
>                                 'edit_post' => 'edit_site',
>                                 'delete_post' => 'delete_site',
>                                 'read_post' => 'read_site',
>                         )
>                 );
>
>                 register_post_type('site', $args);

New description:

 This does not appear to be occurring under administrator roles; only for
 lesser roles that have been given edit privileges for the custom post type
 in question.

 Appears to be the same as what has been reported in this thread here:

 http://wordpress.org/support/topic/500-internal-server-error-for-custom-
 post-type

 Important things to note:

 - adding &orderby=date to the end of the url allows the list to load

 - we have multiple installs of this database (dev, local, and live
 server). The loading of the list works on two of those installs, both of
 which contain only 250 posts in that custom post type. The one install
 that keeps throwing up the 500 error has 1500 posts in it. That's the only
 difference between the 3 installs (all users, permissions, and server
 settings are the same)

 The custom post type was created using the following code:
 {{{
 $labels = array(
                         'name' => _x('Sites', 'post type general name'),
                         'singular_name' => _x('Site', 'post type singular
 name'),
                         'add_new' => _x('Add New', 'site'),
                         'add_new_item' => __('Add New Site'),
                         'edit_item' => __('Edit Site'),
                         'new_item' => __('New Site'),
                         'view_item' => __('View Site'),
                         'search_items' => __('Search Sites'),
                         'not_found' =>  __('No sites found'),
                         'not_found_in_trash' => __('No sites found in
 Trash'),
                         'parent_item_colon' => ''
                 );

                 $args = array(
                         'labels' => $labels,
                         'public' => true,
                         'publicly_queryable' => true,
                         'show_ui' => true,
                         'menu_position' => 5,
                         'supports' => array('title', 'thumbnail', 'page-
 attributes', 'revisions'),
                         'taxonomies' => array('post_tag','sitestatus',
 'selection-status'),
                         'hierarchical' => true,
                         'capability_type' => 'site',
                         'capabilities' => array(
                                 'publish_posts' => 'publish_sites',
                                 'edit_posts' => 'edit_sites',
                                 'edit_others_posts' =>
 'edit_others_sites',
                                 'delete_posts' => 'delete_sites',
                                 'delete_others_posts' =>
 'delete_others_sites',
                                 'read_private_posts' =>
 'read_private_sites',
                                 'edit_post' => 'edit_site',
                                 'delete_post' => 'delete_site',
                                 'read_post' => 'read_site',
                         )
                 );

                 register_post_type('site', $args);
 }}}

--

Comment (by dd32):

 Cna you please check your PHP error logs to see what the error is that
 you're running into?

 I believe it'll either me Memory usage, or timeouts, specifically due to
 the large number of items you have, and the many "parent dropdowns"
 present in the Quick Edit..  but without the specific error, it's hard to
 determine.

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


More information about the wp-trac mailing list