Can you confirm the taxonomy isn’t still showing in the “Registered Types/Taxes” section or in the Tools sections?
Also is it possible that you moved the registration code at some point?
Only way I can think of that conflicts for slug names would come up.
We don’t delete any terms/associations created, so those should still all be in place in the database.
I don’t see any indication of the Tax being present in either of those locations.
Not sure what you mean by moved the registration code.
Here’s a 2 minute video to show:
https://www.useloom.com/share/eeee151d1c6a40059f4a9008ed2d24a8
Cheers,
Mike
Ahh, the “type” detail was what was getting you.
https://codex.wordpress.org/Function_Reference/register_taxonomy#Reserved_Terms
Since “type” got added to the list of reserved terms above, I went ahead and added it to the slug blacklist. However, if you had it registered before I made this change, then you would have had no problem previously.
While generally suggested against, it does appear that we can bypass this with the following snippet of code.
function mike_bypass_type_tax_slug( $maybe_exists, $slug ) {
if ( $slug === 'type' ) {
return false;
}
return $maybe_exists;
}
add_filter( 'cptui_taxonomy_slug_exists', 'mike_bypass_type_tax_slug', 10, 2 );
I’m limiting this bypass to just this slug you’re using. May be worth exploring getting everything converted over to a non-reserved slug, in case you’re seeing some oddities, but you may be running just fine as a whole.
Hi Michael,
Thanks for this. Did you push this to your codebase for an update or must I write this code to my functions file?
I could use another slug, but I do have that data registered to that slug already that I wish to revive. Perhaps I can change the slug, or map it over by export/import to another slug/taxonomy after I regain access.
Cheers,
Mike
This would go into your functions file. I don’t plan to whitelist “type” as a possible slug to use, so this is just a quick bypass for you.
Once you get things registered again in your install, we do have built in capabilities to migrate, if you want to. As always, back up first if you do that.
Thanks, done. Don’t see the data for this slug/tax. Maybe I had it under the slug types (plural). I deleted the tax with the CPTUI interface, I’ll check the DB to see if there is any data if you’re sure (which I would expect you are), that the data in the table remains.
Sorry, what table should I find this in?
This isn’t going to restore settings, it’s just going to allow you to register the slug again. If you have backups of the database, you should be able to grab the settings again as well, for what it’s worth. Otherwise, just need to re-register the slug and match up the settings as best you can recall, and you should be good.
We definitely don’t delete terms/post data created with the content types created with CPTUI.
All of CPTUI’s settings are saved in the options table, using these option names:
cptui_post_types
cptui_taxonomies