Skip Navigation

[Resolved] I have many Toolset WooCommerce fildes that I didnt create

This support ticket is created 3 years, 4 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 25 replies, has 3 voices.

Last updated by Shane 3 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#2170825
screencapture-staging31-gobeetravel-wp-admin-admin-php-2021-09-16-13_12_40.png

Suddanlly I see in the product era alot of new fildes
"Toolset WooCommerce"
Please see the image
I didnt create it and I cant even delete it!!
Please help me
Thanks
Doron

#2170917

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Those field groups are generated by Toolset.

There is a mechanism which checks whether the field group already exists, and if not it creates it.

It seems that one of the other plugins you have on your site is interfering in the query for this check, prompting Toolset to think the field group does not exist and so create a new one.

The first step is to delete the surplus field groups.

Go to Toolset > Settings > Custom Code and add a new code snippet. Do not activate the snippet.

Add the following code:

$cfgs = get_posts( [ 
    'post_type' => 'wp-types-group',
    'title' => 'Toolset WooCommerce',
    'numberposts' => -1
]);
foreach ( $cfgs as $cfg ){
    wp_delete_post( $cfg->ID, true ); 
}

Choose to "Run now" the snippet, which will run the code one time only.

A new field group will be generated when you are in the site back end because now there is no such field group.

Then the task is to work out which plugin causes the problem.

You would probably want to do this testing on a staging site.

Deactivate all plugins that have anything to do with WooCommerce, except WooCommerce itself and Toolset WooCommerce Blocks.

Check at Toolset > Custom Fields to see there is only one Toolset WooCommerce field group.

Activate the disabled plugins one by one, each time visiting in the back end the list of products and the list of orders, and checking the list of custom field groups to see if additional field groups have been created.

Once we have determined which plugin is causing the problem we can see how to proceed.

#2170925

well
after running the code it deletes all my custom fields, not ony the "Toolset WooCommerce"
So now I need to recreate them?

#2170963

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2021-09-16 at 12.52.23.png

I tested that code before sharing it, as you can see the code is very simple and only deletes custom field groups with a title "Toolset WooCommerce".

If other field groups have gone missing I'm sorry about that. You may want to recover them from a recent backup, or if that is not possible you can recreate the field groups. When adding fields to the group you should find your existing fields available via the "Choose from previously created fields" button.

#2171139

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Doron,

Are there any updates here on this one?

Thanks,
Shane

#2171261
too.jpg

yes, now I'm In a bigger problem...
I lost other fildes and I don't think that the suggested solution is good

#2171289

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Doron,

It should've only deleted the field groups so the data is still there on each post.

What you need to do is to remake each of the field groups and re-add your existing fields using the method Nigel described in his posts.

The fields you had weren't permanently deleted so the data is still there.

Thanks,
Shane

#2173483

Hi
So it made alot of new problems on my site
I didnt find any problematic plugin and the code you sent didnt delete it all, but it also delete other fildes
and another problem not, if I update a product, it is deleting the content of other fildes
can I create for you a staging site and you can test it?
Thanks
doron

#2173485

ok
I created this new staging site for this mission
hidden link

how can I send safely the credentials?
Thanks
Doron

#2173797

Please help me

#2174081

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Doron,

My apologies for the delayed response as my shift closed on Friday and the forums are generally closed on the weekends.

I've enabled the private fields for your next response so that you can provide the credentials.

Also ensure that you've restored a backup on your live environment before the code was applied.

Thanks,
Shane

#2174285

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2021-09-20 at 1.43.08 PM.png

Hi Doron,

Thank you for the credentials, I tested this out and saw that it does indeed delete your other field groups as well.

However the fields are still there and if the field group is remade then your fields and data will still show up on your post type. See Screenshot

if I update a product, it is deleting the content of other fildes

Is it that when you update a product it deletes something else or deletes another product. Please provide a bit more clarity on this one here.

Thanks,
Shane

#2174327

Hi
Did you use the same code? can you send me please a code that won't delete the other fields?

I cant see the fields now
let me try to recreate all of them and I will update you

#2174331
too2.jpg

ok
So, I recreate some of the fields
then I edit the product
and the field that I marked in red lost its content
Thanks
Doron

#2174377

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Doron,

Are you able to restore this staging site to its original state before I applied the code?

I may be able to re-delete the fields by just providing the ID's of the custom field groups that should get deleted rather than having the code loop through the field groups.

This might help to make things a little better.

Please let me know.
Thanks
Shane