Skip Navigation

[Resolved] Remove custom field reference from database

This support ticket is created 3 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 8 replies, has 2 voices.

Last updated by Vane 3 years, 10 months ago.

Assisted by: Jamal.

Author
Posts
#1650445

Hi,

I deleted some custom post types, taxonomies, fields and relationship ( say I did a kinda Toolset reset ) and I want to recreate some term type CFs again.
After deleting all in Toolset, I run WP-Optimize's
https://wordpress.org/plugins/wp-optimize/
DB optimization to clear remnants, but I still could not recreate the CFs again, having:
"Warning: field slug already used"
I searched Toolset forum and I found this:
https://toolset.com/forums/topic/remove-all-definitions-from-db/
I followed what its Solution paragraph suggested.
I deleted a bunch of unnecessary CFs but I haven't found those ones what I want to recreate ( and wanted to delete first there )

Pls. note the thread I referred to is from Jan 2016 and I'm not sure whether Term meta was handled by Toolset that time.
No cache is enabled, I logged out and in again multiple times but it didn't help.

Thank you!

#1650527

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

To better assist you with this issue, I'll need to have access to your admin area and to a database interface. If no database interface is available, I'll need FTP access to install a script that will help me browse the database.
Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

Or I might take a copy of your website and investigate the issue locally, then I'll get back to you with more insights and hopefully a solution. Let me know what suits you.

#1650839

Pls. search in DB for CF ( term meta ) slugs:
is-filter
and
is-rating-criteria

They were in the custom taxonomy field group created for my previous custom taxonomy with slug:
context
but - amongst others - I deleted them, being forced to use a new approach.

I want to add them now both to default WP taxonomy named tags.
You can see it's usage if you check my tags and check a CF column named
Is Brand?

I know I can create them with a slightly modified slug, but I prefer to know why I was not able to clear this part of the DB... 🙂

Thank you!

#1651567

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Vane! I took the duplicator package and built a local copy. I was able to add "Is Rating Criteria?" without issue, after removing it completely.

It seems that the field was still on Toolset settings without being attached to a field group. Check this screencast, you can follow the same steps, to remove completely both fields:
hidden link

Go to Toolset->Custom Fields->Term fields->Control fields and delete both fields. Then you can add the fields again to any fields group. If you still have the notice that the slug is already used, refresh the page to purge the browser cache and try again.

I hope this helps. Let me know your feedback.

#1651617

Hi Jamal,

I mentioned that there ( Toolset->Custom Fields->Term fields->Control fields ) I havent found those CF slugs.
I searched for strings and I also manually checked all CFs, what I found unnecessary ( being remnants of deleted plugins or themes ) I switched to "Manage by Access" and I deleted more than 50 of them.

Now I was able to create those in
Tags Field Group
you can see them they are listed ( though having
Warning: field slug already used )

but if you check Posts / Tags on admin,
you will not find them either in list's columns or as an input field on tag creation form area.

I logged out and in, hoping for a maintenance script runs after log out or in, I also checked that Tag list page in both EN ang HU languages, but no reference for the 2 newly added term metas.

Now in
Toolset->Custom Fields->Term fields->Control fields
both is-filter and is-rating-criteria
is listed as 1 instance each...

So those slugs are still stored somewhere.

Pls. note I use WPML and WPML default language is HU.

Thank you

#1651989

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

The fields are still there on your install, check this screenshot hidden link

On my local copy, I was able to add the field again(newly created) inside a new fields group and I can get it on the tags screen check hidden link

Would you allow me to do the manipulation on your live site? I will remove both fields and recreate them again inside the "Tags Field Group"? If, yes, please take a database copy.

#1652091

I know they are there (sreenshot #1), I informed you about it, but they were added by me today, so they should not be there on your copy, but only if you added them yourself 🙂

Yes, you can do manipulation on live site, you can remove and delete them and recreate them.
This is what I did previously, but that time they were in another term field group ( Context Term Field Group ), so I created the one used now, added
Is Brand? ( successfully ),
but the 2 others got the warnings and as far as I remember that time I could not save the field group with them, so they were not even shown on Term Field Group details page.

I see on your screenshot you added it to a different field group, so pls. try to add it into an existing one after removing and deleting them.

Also, pls. don't publish screenhots where my domain can be seen,
thank you!

#1652655

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for your feedback and my apologies for the misunderstanding. I added the "Is Filter" checkbox and I recorded a short video to explain what I meant by the browser cache. hidden link

First, I opened the terms field group in a browser tab, then I removed the field "Is Filter" from term field control in another browser tab.
I wasn't able to add the field because the browser was having the field in its cache, then I reloaded the field group page, and I was able to add the field again.

I did not add the "Is Rating Criteria" to let you do it, to be sure that you can also add the field. I hope it is ok for you.

I remain at your disposal. Let me know if you still need assistance with this issue.

Best regards,
Jamal

#1653131

Hi Jamal,

now I was able to add the 2nd term meta you let me do without any issue, without reloading that page.

Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.