• Resolved philsafc

    (@philsafc)


    Just says “Category has failed to be deleted”

    From reading around I think it is because I put a space in the Taxonomy Slug but I cannot figure out how to fix this issue.

    It wont let me delete ones that dont have a space in either.

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

    (@tw2113)

    The BenchPresser

    Can you visit your CPTUI > Tools submenu, and then click the “Taxonomies” tab and paste me the blob of text on the right?

    Thread Starter philsafc

    (@philsafc)

    {“Job Category”:{“name”:”Job Category”,”label”:”jobs”,”singular_label”:”job”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”hierarchical”:”false”,”show_ui”:”true”,”show_in_menu”:”true”,”show_in_nav_menus”:”true”,”query_var”:”true”,”query_var_slug”:””,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”1″,”rewrite_hierarchical”:”0″,”show_admin_column”:”false”,”show_in_rest”:”true”,”show_in_quick_edit”:””,”rest_base”:””,”rest_controller_class”:””,”labels”:{“menu_name”:””,”all_items”:””,”edit_item”:””,”view_item”:””,”update_item”:””,”add_new_item”:””,”new_item_name”:””,”parent_item”:””,”parent_item_colon”:””,”search_items”:””,”popular_items”:””,”separate_items_with_commas”:””,”add_or_remove_items”:””,”choose_from_most_used”:””,”not_found”:””,”no_terms”:””,”items_list_navigation”:””,”items_list”:””},”meta_box_cb”:””,”object_types”:[“jobs”]},”Job”:{“name”:”Job”,”label”:”jobs”,”singular_label”:”job”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”hierarchical”:”false”,”show_ui”:”true”,”show_in_menu”:”true”,”show_in_nav_menus”:”true”,”query_var”:”true”,”query_var_slug”:””,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”1″,”rewrite_hierarchical”:”0″,”show_admin_column”:”false”,”show_in_rest”:”true”,”show_in_quick_edit”:””,”rest_base”:””,”rest_controller_class”:””,”labels”:{“menu_name”:””,”all_items”:””,”edit_item”:””,”view_item”:””,”update_item”:””,”add_new_item”:””,”new_item_name”:””,”parent_item”:””,”parent_item_colon”:””,”search_items”:””,”popular_items”:””,”separate_items_with_commas”:””,”add_or_remove_items”:””,”choose_from_most_used”:””,”not_found”:””,”no_terms”:””,”items_list_navigation”:””,”items_list”:””},”meta_box_cb”:””,”object_types”:[“jobs”]},”Roles”:{“name”:”Roles”,”label”:”Roles”,”singular_label”:”Role”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”hierarchical”:”false”,”show_ui”:”true”,”show_in_menu”:”true”,”show_in_nav_menus”:”true”,”query_var”:”true”,”query_var_slug”:””,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”1″,”rewrite_hierarchical”:”0″,”show_admin_column”:”false”,”show_in_rest”:”true”,”show_in_quick_edit”:””,”rest_base”:””,”rest_controller_class”:””,”labels”:{“menu_name”:””,”all_items”:””,”edit_item”:””,”view_item”:””,”update_item”:””,”add_new_item”:””,”new_item_name”:””,”parent_item”:””,”parent_item_colon”:””,”search_items”:””,”popular_items”:””,”separate_items_with_commas”:””,”add_or_remove_items”:””,”choose_from_most_used”:””,”not_found”:””,”no_terms”:””,”items_list_navigation”:””,”items_list”:””},”meta_box_cb”:””,”object_types”:[“team”]}}

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Alrighty @philsafc,

    the space is most definitely creating a problem. However the capitalization is also seeming to create some problems as well.

    1. This feels like settings that were originally created a long time ago, as both of these topics would have been taken care of and prevented by the current iteration of the plugin. Have you been a long time user of CPTUI? If yes, we appreciate it ??

    2. As information, according to WordPress core, at least the last time I checked, post type and taxonomy slugs are meant to be lowercased. Underscore characters are also meant to be used in place of spaces. For URL purposes, when dashes are recommended, the “rewrite slug” field can be used.

    3. I can definitely re-paste to you a blob of text that you can re-import with the “Job Category” item removed and thus no longer registered. However, we should also look into the capitalization of “Job” and “Roles” as well. With that though, I’m not quite as gung-ho ready to help with those edits, because I’m not sure how your site will react to suddenly having those slugs be a different capitalization case.

    Let me know if you want me to provide the import-able settings with just the “Job” and “Roles” taxonomies, and we can take care of the rest after.

    Thread Starter philsafc

    (@philsafc)

    I’m pretty new to the plugin. I only downloaded it the other day and then ran into this issue when I wanted to delete some of the custom post types and taxonomies I’d been playing around with.

    If you could sort out the issue I would appreciate it.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    If you’re brand new, then I’m legitimately curious how you got these versions of the taxonomies saved. The only way I can think of would be if you had javascript disabled since that’s how we enforce lowercase characters and no spaces in the slugs.

    Give this import a try:

    {"job":{"name":"job","label":"jobs","singular_label":"job","description":"","public":"true","publicly_queryable":"true","hierarchical":"false","show_ui":"true","show_in_menu":"true","show_in_nav_menus":"true","query_var":"true","query_var_slug":"","rewrite":"true","rewrite_slug":"","rewrite_withfront":"1","rewrite_hierarchical":"0","show_admin_column":"false","show_in_rest":"true","show_in_quick_edit":"","rest_base":"","rest_controller_class":"","labels":{"menu_name":"","all_items":"","edit_item":"","view_item":"","update_item":"","add_new_item":"","new_item_name":"","parent_item":"","parent_item_colon":"","search_items":"","popular_items":"","separate_items_with_commas":"","add_or_remove_items":"","choose_from_most_used":"","not_found":"","no_terms":"","items_list_navigation":"","items_list":""},"meta_box_cb":"","object_types":["jobs"]},"roles":{"name":"roles","label":"Roles","singular_label":"Role","description":"","public":"true","publicly_queryable":"true","hierarchical":"false","show_ui":"true","show_in_menu":"true","show_in_nav_menus":"true","query_var":"true","query_var_slug":"","rewrite":"true","rewrite_slug":"","rewrite_withfront":"1","rewrite_hierarchical":"0","show_admin_column":"false","show_in_rest":"true","show_in_quick_edit":"","rest_base":"","rest_controller_class":"","labels":{"menu_name":"","all_items":"","edit_item":"","view_item":"","update_item":"","add_new_item":"","new_item_name":"","parent_item":"","parent_item_colon":"","search_items":"","popular_items":"","separate_items_with_commas":"","add_or_remove_items":"","choose_from_most_used":"","not_found":"","no_terms":"","items_list_navigation":"","items_list":""},"meta_box_cb":"","object_types":["team"]}}
    

    Just double click the content and copy/paste.

    Thread Starter philsafc

    (@philsafc)

    thanks that has fixed the issue with the taxonmonies. I have been able to delete the jobs taxonomie completely now.

    I haven’t got javascript disabled so don’t know how or why I was able to do this.

    It still won’t let me remove custom post types so I guess the capital letter is causing a similar issue there.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Very likely.

    For what it’s worth, all I was doing was taking the blob of text, which technically is considered JSON data, and lowercasing a couple of the fields for each entry, then re-pasting back to you to import.

    As an alternative, if you’re just wanting to remove all of them, and start fresh, you can also import {""} and that will clear the all the CPTUI content types you created for the import type. That last part meaning if you were on the post types or taxonomies tab. It won’t take out BOTH.

    Thread Starter philsafc

    (@philsafc)

    thanks I will keep that in mind.

    after importing your blob – it broke the “roles” taxonomie. there was a long error showing in the table.

    I have totally deleted the taxonomy now and created a new one. creating it with the same name just brought the issue back so had to create a new name.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Can you provide the actual error?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Any changes here @philsafc ? or are you good at this point?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Can’t delete CPT or Taxonomy’ is closed to new replies.