All of my custom posttypes are 404’ing

All of the posts made within custom posttypes have suddenly become uneditable, and will 404 when you try to view them.Screenshot

The posts in the admin panel are greyed out (posts in the standard post/pages etc are fine).

Read More

Things I have Tried

  • I have tried using GIT BISECT but problem persists beyong where I know it to be working.
  • Tried downgrading wordpress
  • Checked various database elements such as post status and post author.
  • Tried setting and resetting permalinks.
  • Deactivated All plugins

New posts seem to be fine, and work normally. But my metaboxes have also vanished!! Again, GIT suggests this problem going back beyond where I know them to be working.

It seems, as GIT is incapable of finding the solution, that it must either be related to the database or the wordpress core itself (as my GIT repo only tracks the theme)

WordPress is up to date.


Edit
This is the function that creates the post types:

register_post_type($object_name,
        array(
            'labels' => mf_create_labels($object_name),
            'public' => true,
            'supports' => array('title','editor','thumbnail','page-attributes')         
        )
    );

using this to create labels:

function mf_create_labels($label){
    return array(
        'name' => __($label),
        'singular_name' => __($label),
        'add_new' => _x('Add New', $label),
        'add_new_item' => __('Add New '.$label),
        'edit_item' => __('Edit '.$label),
        'new_item' => __('New '.$label),
        'view_item' => __('View '.$label),
        'search_items' => __('Search '.$label),
        'not_found' =>  __('No ' . $label . ' found'),
        'not_found_in_trash' => __('No ' . $label . '  found in Trash'), 
        'parent_item_colon' => ''
    );
}

Update

I have got the meta boxes back, it seems WordPress now insists on having the posttype declared in all lower case, despite be declaring the post types with capital letters


Please, if you have any idea where to look for the issue, comment. No suggestion too small at this stage

Related posts

Leave a Reply

1 comment

  1. 404’s were being caused by problem with the WP Super Cache section in my .Htaccess file.

    Greyed out areas AND metaboxes not showing up were being caused by WordPress suddenly having a serious issue with using capitals at the start of Custom Post Type names.

    Why these issues suddenly came to bite me? I have no idea!!