• Resolved pzh20

    (@pzh20)


    I seems to have a problem after changing the slug of a custom post type. So I have deactivated and removed the plugin. When I reinstalled it, the menu already showed a CPT and when I try and add a new one I get the message “Please choose a different post type name. nominations matches an existing page slug, which can cause conflicts.”

    I need to remove it and all the tables and start again.

    How?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Based on the provided error, you already have a page named “nominations” and you’re also trying to register a post type with a slug of “nominations”. We try to help the users as best we can, so we try to prevent naming those the same, because we do see conflicts on the frontend around the topic.

    There’s no tables for us to remove for “starting over” as we only store our settings in two rows in the database. Everything else is handled by WordPress core.

    If you for sure want a “nominations” post type, then I’d recommend seeing about renaming the slug for the “nominations” page to something else, or vice versa.

    Thread Starter pzh20

    (@pzh20)

    I uninstalled CPT UI and reinstalled it but when I looked there was a previous post type showing in the menu from my previous attempt. I deleted it but when I tried to recreate it I got this error. It seems like some settings aren’t being removed when I uninstalled it. How can I remove these settings and start again (I have root access to the server if I need to delete records from the database)

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    For the sake of aiding in content ownership, and because we have a whole 2 settings saved anywhere, we consciously don’t delete the settings upon uninstallation. They can be found in the wp_options table with the keys of cptui_post_types and cptui_taxonomies. However, deleting these and then re-trying isn’t going to resolve the nominations slug collision problem because it already exists as the page slug and we are checking for that before registrations are completed and saved to our options.

    We don’t have a way to override that detection via the UI, but would technically be possible during import. I know I have some open issues regarding slug collisions during import though, I just haven’t moved forward with them much at the moment.

    Thread Starter pzh20

    (@pzh20)

    I see, it’s not a slug for a duplicate cpt, but I’ve always had a page call nominations and created a cpt called nominations too. When I set up a second cpt called nominations_user then tried to rename the slug that things seemed to go wrong.
    How would you suggest I proceed?

    Many thanks
    Pete

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    At this point, I am curious if your previous nominations post type had the “has_archives” parameter set to true. This is because if it did, then with my experience there would very likely be conflicts with that page, though at times perhaps not realized.

    If it’s not meant to have archives, then I think the act of visiting example.com/nominations/ wouldn’t run so much risk.

    That said though, if you really want to get it imported in, you can use the Tools menu item and the “post types” tab to grab a copy of a JSON-version of the settings, and then edit a couple spots, then paste it in to import.

    For example, at the start of that JSON I have for one of my personal sites, there’s this: {"music_video":{"name":"music_video","label":"Music Videos",...

    If I wanted to rename that “music_video” slug to something else, say pluralization before importing, I could change it to: {"music_videos":{"name":"music_videos","label":"Music Videos",... and then paste in the entirety of the JSON, on the left.

    I’d say for you, maybe just get one post type registered so that there’s minimal issue with editing JSON data directly, and then after getting imported, proceed with using the UI for the rest of things.

    Thread Starter pzh20

    (@pzh20)

    It did have the Has Archive set. All I want now is to start again. Just to be sure, with the Has Archive set, the CPT should not be named the same a any page.

    Regards Pete

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    That’s just when I most foresee potential issues. My personal thoughts are they shouldn’t be named the same regardless. However, I can’t stop you either ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Cannot fully remove CPT UI’ is closed to new replies.