Skip Navigation

[Closed] Toolset WooCommerce keeps generating new field groups (1000+ so far)

This support ticket is created 3 years 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: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 4 voices.

Last updated by thomasB-2 3 years ago.

Assisted by: Waqar.

Author
Posts
#2265987
chrome_A2KE3Hoed6.png
msedge_TLkzxPSNY3.png

Toolset WooCommerce keeps generating new field groups (1000+ so far). I have tried to delete them, but they are greyed out in the custom field group area and cannot be deleted. I found another user who had a similar problem and posted about it in the support forum, but then said they found the fix... but not what the fix was. It has been doing this for months, and keeps generating more. I just haven't had a chance to deal with figuring out what it is doing and where these field groups are coming from.

#2266273

Nigel
Supporter

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

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

Hi Aaron

We've had one report of this previously, but in that case the problem occurred because of a custom plugin written by the site author.

You clearly won't be using the same, but the cause is likely to be the same: some third party code (whether it is custom code written by yourselves or code from one of your installed plugins) intercepts and modifies all queries on the product and shop order pages which breaks a query made by Toolset to see whether the custom field group has been generated yet or not. No result is returned, and so Toolset generates a new field group.

The tricky part will be identifying the responsible code, so that it can be rewritten to affect only the intended queries and not leak out and modify other queries unintentionally.

You can start by examining, possibly disabling, any custom code on your site, and then moving to any plugin which may be in any way related to WooCommerce.

In the other ticket I shared a code snippet you can use to delete the excess custom field groups, let me share the same details here:

As a temporary workaround, you could add the following code at Toolset > Settings > Code Snippets. Don't activate it, but instead use the Run Now option to run the code once, and then keep doing that as many times as are needed to remove the duplicates.

On my local copy of your site I found it could only cope with deleting about 25 at a time, so it will take a while to purge the excess copies.

$wcfgs = get_posts( array(
    'post_type' => 'wp-types-group',
    'post_title' => 'Toolset WooCommerce',
    'numberposts' => 25
));
 
foreach ($wcfgs as $key => $wcfg) {
    wp_delete_post( $wcfg->ID, true );
}

Once you have deleted the excess groups and a single group has been created, keep an eye on if and when any extra groups are created which may help track down the cause.

#2271727

I am just awaiting the conclusion of the live event this week and then I will be able to test this solution

#2271887

Sure, please take your time and let us know how it goes.

#2275281

Hi, here was the same situation - a random growing list Toolset WooCommerce field groups, without having Toolsset WooCommerce Plugin in use. Only Types, Blocks and Maps.

Your page snippet doesn't help, because it not only delete the Toolset WooCommerce field group, but also our other Field Groups with other titles too.
We restore the database backup, but not we have still 29 Toolset WooCommerce field group

The topic ‘[Closed] Toolset WooCommerce keeps generating new field groups (1000+ so far)’ is closed to new replies.