CustomPress: Invalid Post Type Errors

I’ve created three custom post types and a custom taxonomy using the CustomPress plugin. Everything is working as it should, with one exception: any time I try to perform any bulk actions from the post admin screen(s), I get a blank screen with an “Invalid Post Type” error. For example, I can’t search custom posts, I can’t edit more than one at a time, I can’t delete more than one at a time, and I can’t even empty the trash (have to click “delete permanently” on each individual item in the trash).

Any help is greatly appreciated!

Running WP 3.4.2, BuddyPress 1.6.1.

  • Paychex
    • Flash Drive

    Alright, just noticed something else going on here… something's messed up…

    When looking at the custom post type list pages, the count of posts is correct, but the post table(s) show all posts regardless of type.

    For example, I have 42 posts under the type "tools", and the count in the upper left of the Tools page is 42. However, the table itself shows all 501 total items (the total of all my posts, regardless of type — see the attached screenshot). It doesn't matter which post type table I'm looking at; they're basically displaying everything, regardless of type.

    Help!!

  • Timothy
    • Chief Pigeon

    Hey there.

    Ya I see whilst searching form the post type area it returns from all post types.

    I don’t however get an issue whilst removing multiple articles within a custom post type or with quick edit.

    Are you on a single install or Multisite? If Multisite how are you setting that up.

    Just want to try and create that.

    I’ll ping Arnold (our dev on this plugin) about the first issue which I can see happening.

    Thanks.

  • Paychex
    • Flash Drive

    Thanks for the help, Arnold and Timothy.

    I'm trying the beta now, I'll let you know.

    The SEO plugin is Yoast's WordPress SEO (never had a conflict with it before). I disabled it, along with every other non-essential plugin, and still no luck. And just to clarify Timothy's comment, I can't search, either — basically any global function returns the error attached.

    Some background (should have included this in the original post, apologies): These posts (~500) are from external (non-WP) sites. They came into WP from a master CSV (by way of the CSV Importer plugin), then assigned a post type (by way of the Convert Post Types plugin).

  • Paychex
    • Flash Drive

    Okay – given the roundabout way I got content into WP, I decided the best course of action was to start from a fresh set of DB tables, and that seems to have done the trick. A bit of a grenade-fix, but it’s working.

    Here’s exactly what I did:

    1) Exported my content to XML (tools > export > everything).

    2) Changed the DB prefix in wp-config. << ka-boom

    3) Activated CustomPress, recreated by custom post types and taxonomy (carefully using the same system names from the failed first attempt).

    4) Took a snapshot of my DB, for good measure.

    5) Imported the WP XML (tools > import).

    6) Verified the ‘all items’ totals for each custom post type match the ‘published’ amount.

    While this seems to have worked, it’s not a fix for the faint of heart (unless you’re into re-setting plugins). But in my case, it’s important the content is accurate, manageable, and safely stored, so weird DB issues are big red lights — I’d rather re-set plugins than lose ~500 posts. I’ve got some more work to do on the front and back ends, but once I’m sure I’m in the clear I’ll mark this ‘resolved’.

    Arnold: is there anything to worry about in using the CustomPress beta? I’ve no need for shortcodes at the moment.

  • Arnold
    • El Macho WP

    I think probably you had damaged indexes in the MySQL database. Especially since they originally came in as posts and then wereconverted to a custom post type. It’s likely that rebuilding the indexes may have fixed it as well.. There is a type_status_date index that includes the post_type, post_status, and post_date. If it gets corrupted then it wouldn’t searh rpoperly between types.

  • Arnold
    • El Macho WP

    I think probably you had damaged indexes in the MySQL database. Especially since they originally came in as posts and then wereconverted to a custom post type. It’s likely that rebuilding the indexes may have fixed it as well.. There is a type_status_date index that includes the post_type, post_status, and post_date. If it gets corrupted then it wouldn’t searh rpoperly between types.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.