Support » Plugin: Custom Content Type Manager » Custom content types are gone

  • Resolved Camilo


    Hey everyone,

    Everything was working fine with plugin version and WP 3.5 but then I created a new content type and when I tried to manage its field I got a message saying ‘Invalid post type’. After that, all custom content types were gone.

    I checked the database and the posts are still there but they ain’t showing up in the backend neither the frontend.

    Tried disabling and activating the plugin but no luck. I think next I’m gonna try updating to WP 3.5.1 but I just wanted to share this on here. Maybe I’m doing something wrong or this is a real bug.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Updated to WP 3.5.1, still same problem.

    Enabled debug mode using define('WP_DEBUG', true); and there are no error messages.

    Plugin Contributor fireproofsocks


    I can’t reproduce this one: I’ve had a couple vague reports of things like this, but I’ve never been able to reproduce it, so I suspect it’s at least partially related to something in your server environment (e.g. text encoding?). If you can outline exact steps that will guarantee this behavior, then I can diagnose and fix it. Unfortunately WP_DEBUG doesn’t do much other than show simple PHP warnings and errors that any decent programmer should have fixed long before releasing a plugin.

    Understand how WP handles post types: WP is totally oblivious to what’s in its database. The only thing that puts a post-type on WP’s radar is declaring it via the register_post_type() function, so if your definition gets corrupted, then your post-types never get declared, and WP has no knowledge of them. There’s a feature request to build out a detection tool/wizard that would help recover from this scenario (or migrate from some other plugin): but I haven’t needed it for any projects yet, so it hasn’t been implemented.

    There’s functionality for exporting/importing your post-type definitions (see the CCTM->Tools menu), and it’s a good idea to keep a backup of your definitions since recreating your post-types and fields can take a while.

    As a last resort, check your wp_options database table for the row where option_name=’cctm_data’ and see if you can read/salvage anything there. WP stores option data as a serialized string, which can be problematic and fragile and prone to corruption. Again, I’ve heard of this happening, but I’ve been unable to isolate the issue on any of my dev environments.

    These are the settings for cctm_data in wp_options:

    		s:9:"CCTM Site";
    		s:67:"This site was created in part using the Custom Content Type Manager";

    I just edited e-mail and url in this post for obvious reasons.

    As far as I can see, it seems the cctm_version is mismatching with the installed version (

    Plugin Contributor fireproofsocks


    Your data got corrupted, unfortunately: that’s just default stuff in there. There should be full-blown arrays and data under the post_type_defs and custom_field_defs nodes. So you’ll have to recreate your definitions and custom fields unless you have a backup of your database or of your field defs. Again, I haven’t been able to reproduce this behavior, so I can’t tell you what might have caused this.

    Yes, I realized about that when I peeped into a database backup. I replaced it with the data from the backup and everything came back to life.

    Thanks for the support!

    Plugin Contributor fireproofsocks


    Export a backup of your definitions under CCTM –> Tools.

    Support is always appreciated 😉

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom content types are gone’ is closed to new replies.