WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 16 months ago

#20329 closed defect (bug)

Custom Post Type - 500 error when viewing list in WP backend — at Version 1

Reported by: rivkadr Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3.1
Component: Administration Keywords:
Focuses: Cc:

Description (last modified by dd32)

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);

Change History (1)

comment:1 dd322 years ago

  • Description modified (diff)

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.

Note: See TracTickets for help on using tickets.