Keeping getting Invalid taxonomy when adding terms
-
I created a new taxonomy. However, every time I go add a new term I get an “Invalid taxonomy” message.
-
Also running a multisite network if that helps.
What’s the taxonomy slug you chose/used?
I choose office as the slug.
{“office”:{“name”:”office”,”label”:”Offices”,”singular_label”:”Office”,”description”:””,”public”:”true”,”publicly_queryable”:”false”,”hierarchical”:”false”,”show_ui”:”true”,”show_in_menu”:”true”,”show_in_nav_menus”:”true”,”query_var”:”false”,”query_var_slug”:”office”,”rewrite”:”false”,”rewrite_slug”:”office”,”rewrite_withfront”:”1″,”rewrite_hierarchical”:”1″,”show_admin_column”:”false”,”show_in_rest”:”false”,”show_in_quick_edit”:””,”rest_base”:””,”rest_controller_class”:””,”labels”:{“all_items”:”All Offices”,”edit_item”:”Edit Office”,”view_item”:”View Office”,”update_item”:”Update Office Name”,”add_new_item”:”Add New Office”,”new_item_name”:”New Office Name”,”parent_item”:”Parent Office”,”parent_item_colon”:”Parent Office:”,”search_items”:”Search Offices”,”popular_items”:”Popular Offices”,”separate_items_with_commas”:”Seperate Offices with Commas”,”add_or_remove_items”:”Add or remove Offices”,”choose_from_most_used”:”Choose from Most Used Offices”,”not_found”:”No Offices Found”,”no_terms”:”No Offices”,”items_list_navigation”:”Offices List Navigation”,”items_list”:”Offices list”,”menu_name”:””},”meta_box_cb”:””,”object_types”:[“brokers”]}}
I tried creating something very basic and it does not work as well.
“boomdash23”:{“name”:”boomdash23″,”label”:”Booms”,”singular_label”:”Boom”,”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”:[“brokers”]}}Hmm. As is, with both of those, and the only thing I’m changing is the object type, I’m not experiencing any issues with creating new terms. Whether it be on the term management page or “inline” while adding a new post. I changed the object type to be just the standard “post” post type.
Also I double checked and we don’t have any strings of “Invalid taxonomy” in the plugin, so that’s probably coming from WordPress core, for what reason we don’t know yet.
Interesting. I will mess around a bit. I will see if I can find a workaround using the WordPress UI first before I dive into code.
I will keep you updated. Thanks for looking into it for me.Okay, so I have an UI workaround.
Create the taxonomy with hierarchical set to false.
Create a new post that the tax is assigned and add a tag on the sidebar.
Save the post.
Once the post is saved I was able to add new tags to the tax directly from the Edit Tags page.One if two things can be assumed. 1) A post entry for which the tax is assign must already exist, or 2) Saving the post bypasses some other issue that exists on the Edit Tags page.
If someone needs the new tax to be hierarchical, follow the instructions above. Then edit the tax and change hierarchical to true
If I get some time I will try to poke around in the code.
- This reply was modified 5 years, 2 months ago by redonxcom.
Definitely glad you got something worked out for that, but my head is thinking that’s way too much work needing done for this, and something else has to be going on with the install to be causing the initial headache. I just don’t know what and don’t have the access to try and figure out why. For what it’s worth, I don’t expect or desire the access either, unless somehow absolutely necessary ??
Very odd case, regardless.
- The topic ‘Keeping getting Invalid taxonomy when adding terms’ is closed to new replies.