WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
Can't add custom types (all slugs are WP reserved?) (14 posts)

  1. kcorcoran
    Member
    Posted 9 months ago #

    Trying to add a custom post type and regardless of what slug I try to use I get the following error...

    You cannot use this slug because it is a reserved word, used by WordPress. Please choose a different slug.

    Please advise.

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

  2. Srdjan
    Member
    Plugin Author

    Posted 8 months ago #

    Hi kcorcoran,
    are you still having this issue?

  3. eceleste
    Member
    Posted 7 months ago #

    @srdjan... I don't know about @kcorcoran, but I am seeing this with 1.4.0.1.

    I can create a new type, but whenever I try to edit it I get the message "You cannot use this slug because it is a reserved word, used by WordPress. Please choose a different slug."

    Could this be a conflict with another plugin? I have CPT-onomies also installed.

  4. eceleste
    Member
    Posted 7 months ago #

    I think I see the problem in line 185 and 186 of wpcf.php which states...

    $reserved = array_merge( array_combine( $reserved_names, $reserved_names ),
            array_merge( $post_types, $taxonomies ) );

    The problem seems to be that in the preceding few lines the $post_types array has included the custom post types created by the plugin itself. So, of course, the WP_Error at line 188 will be returned.

    Not sure what the fix is, since there is some other stuff going on (like a $context variable used to "avoid checking itself"), so I am still not sure how to resolve this. The upshot is, though, that I can't edit any existing custom type, since it thinks they are all their own reserved words!

  5. Srdjan
    Member
    Plugin Author

    Posted 7 months ago #

    Yes, you are right but part where you can see 'avoid checking itself' should just remove post_type/taxonomy from list of registered post types or taxonomies.

    Types checks for:
    1. fixed list of terms which are reserved
    2. does not allow registering post_type with same name as some custom taxonomy (or other way)

    Can you try with surely unique names (maybe try something silly just for test)?

  6. trishahdee
    Member
    Posted 4 months ago #

    I'm having the same issue. I've tried all types of possible slugs but still get the error message. For instance, I've tried: "cakeartx" which I can't see why that would be reserved.

    Is there any fix for this?

  7. trishahdee
    Member
    Posted 4 months ago #

    Update

    I deactivated all plugins and I'm getting the same warning, even when I use a slug like "adosifjpa".

  8. agnes.b
    Member
    Posted 4 months ago #

    Hi @trishahdee, this is Agnes from Toolset support team.

    Types considers reserved words not only the WordPress default ones but every page slug as well. Even the ones you have in Trash. If you have a page with a slug "cakeart" you cannot use it for Custom Post Types post slug.

    Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

  9. trishahdee
    Member
    Posted 4 months ago #

    Thank you for your response. Yes I understand that any slug I created could be the problem but I have tried all kinds of nonsense slugs and get the same result. I know that there are no slugs like I've tried on the site as I've done a search of the database for them and they are not there.

  10. trishahdee
    Member
    Posted 4 months ago #

    UPDATE

    We have a more severe problem then just the slugs... I don't know if it was your recent update or something on our end, but the 3 custom post types I created are missing. The two taxonomies and the eight custom field groups are there but not the custom post types. When I try to recreate them, this is when I'm getting the duplicate slug warning. This is a serious problem. I think I need more professional help then this free support forum. Do you have paid support for major problems like this?

  11. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    WordPress is free software and this free, volunteer-staffed forum is the only support resource available via wordpress.org. If this is not sufficient for your needs, you may want to consider hiring someone.

  12. trishahdee
    Member
    Posted 4 months ago #

    esmi,

    I'm sorry, I should have been clearer in my update as was addressing Agnes from Toolset support team, not WordPress.org team. my bad.

  13. agnes.b
    Member
    Posted 4 months ago #

    @trishahdee, please go to
    Types Community Support. There it will be possible to email for your site access data and debug this issue for you.

  14. trishahdee
    Member
    Posted 4 months ago #

    Thank you angnes.b :D

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.