WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
Long slugs for custom post types are truncated by database (1 post)

  1. PaulMorris
    Member
    Posted 2 years ago #

    Whatever you do, don't rename your custom post type's slug to something with a lot of characters.

    I renamed mine and all my posts disappeared from my site. (!) I checked the database using phpMyAdmin and they were still there. It took me some searching to see that the new slug I had given them had been truncated so that was why they weren't appearing. (Apparently there is a 20 character limit? At least in my setup.) To fix it I had to rename the slug to the truncated version (in the Types admin interface), and then rename it again to something shorter.

    So a nice feature would be to prevent the user entering slugs that are too long and will be truncated by the database, or to truncate them in Types so that the two don't get out of sync like this.

    Just thought I'd share my mishap. Thanks for a well-done plugin.

    -Paul

    http://wordpress.org/extend/plugins/types/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.