Skip Navigation

[Resolved] when i active other plugin show error when i deactive toolset it all works

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 12 replies, has 2 voices.

Last updated by Nigel 1 year, 9 months ago.

Assisted by: Nigel.

Author
Posts
#2651721

when i active other plugin show error when i deactive toolset it all works

pls help me check why

the sftp port is 41269

here is the error log

2023/10/11 05:25:04 [error] 207#207: *22371 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "ID" on null in /www/wwwrichestlife_685/public/wp-content/plugins/toolset-blocks/vendor/toolset/toolset-theme-settings/compatibility-loader/toolset-theme-integration-settings-helper.php on line 426" while reading response header from upstream, client: 74.125.214.5, server: hidden link, request: "HEAD /pressrelease/feed/ HTTP/2.0", upstream: "hidden link:", host: "www.richestlife.com:64825"

#2651907

Nigel
Supporter

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

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

Hi there

I'm not sure exactly the problem arose, but I believe I have fixed it.

There were some problems with entries in wp_options relating to the Toolset installer code that triggered the error.

I have removed the problem options, and now it seems possible to activate plugins while Types is already active without provoking an error.

Please check and confirm, thanks.

#2651959

thanks it works

how can i fix in my production site

and in stag site still have other problem hidden link this Toolset WooCommerce will increase no limit

can you help me check why

#2652087

Nigel
Supporter

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

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

I fixed the activation errors by deleting the entries in the wp_options table with these option names:

otgs_installer_admin_notices
otgs_installer_recommendations_admin_notices

I used phpMyAdmin to do that.

If you are not sure how to do that then let me know and I will try to help.

Regarding the extra "Toolset WooCommerce" custom field groups, first let me talk about the solution.

You need to run some PHP code to delete the surplus field groups, i.e. this code:

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

On your staging site I added a code snippet at Toolset > Settings > Custom Code. The snippet does not need to be active (running continuously), it only needs running one time. I have done that, which has deleted the unnecessary field groups.

The field group is generated automatically, for Toolset to be able to work with WooCommerce fields. Toolset runs a query to check if the field group already exists, and if not, it creates a new one.

The problem—with other users—has arisen because some 3rd party code (e.g. from another plugin) modifies our query so that it fails, and therefore the group is recreated. The 3rd party code intends to modify some relevant query, but does not target that query correctly, and ends up changing other unrelated queries.

The challenge is to identify the 3rd party code, which essentially means running tests with other plugins disabled while performing basic actions with WooCommerce like visiting the list of products in the back end.

But on your site you no longer have the Toolset WooCommerce plugin activated, and if you don't use it, the problem should not occur.

#2652247

but why The field group is generated automatically.

it is very annoying. like this picture hidden link

it show many many filed in product

why it can not complete disapper

it is a big bug

pls help to fix it

#2652383

Nigel
Supporter

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

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

As I explained, it is caused by some other plugin interfering in Toolset, it is not a bug in Toolset itself.

I tried to log back in to your staging site but the password no longer works.

Can I get the credentials updated? Is it okay to do some testing on your staging site which will include disabling/enabling plugins to try to determine where the conflict comes from?

#2652429

hi

sorry about that

Is it okay to do some testing on your staging site which will include disabling/enabling plugins to try to determine where the conflict comes from? all ok pls do it

hope get answer soon

#2652631

Nigel
Supporter

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

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

I've done some preliminary testing, but I haven't found an action that triggers creating the extra field groups.

I need to keep testing to see if I can spot that. Please keep an eye out yourself to see if you can spot some action that you take in the back end which then generates an extra field group (currently there are 3 such groups).

#2652865

2023/10/14 15:33:59 [error] 72913#72913: *202596 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined array key "enable_real_time_exports" in /www/wwwrichestlife_685/public/wp-content/plugins/wp-all-export-pro/src/App/Service/Addons/AddonService.php on line 195" while reading response header from upstream, client: 122.117.13.229, server: hidden link, request: "POST /wp-admin/admin-ajax.php HTTP/2.0", upstream: "hidden link:", host: "www.richestlife.com:64825", referrer: "hidden link"

i find this errors maybe can give you advice

#2652897

2023/10/15 02:10:50 [error] 72913#72913: *221516 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "ID" on null in /www/wwwrichestlife_685/public/wp-content/plugins/toolset-blocks/vendor/toolset/toolset-theme-settings/compatibility-loader/toolset-theme-integration-settings-helper.php on line 426" while reading response header from upstream, client: 66.249.93.163, server: hidden link, request: "HEAD /pressrelease/feed/ HTTP/2.0", upstream: "hidden link:", host: "www.richestlife.com:64825"

#2653157

Nigel
Supporter

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

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

I have tried to trigger creating extra Toolset WooCommerce custom field groups on your site, but I cannot find any action that does that, so I can't propose anything to prevent the issue from happening.

What I could do is propose a code snippet that you add which checks if extra field groups have been created and deletes the unnecessary groups.

Let me know if that would be an okay solution. (Or, if you notice the action you take on your site that triggers creating the extra field groups, let me know.)

I looked into the errors you reported.

I activated the debug.log and I could see that the warning PHP Warning: Undefined array key "enable_real_time_exports" is being generated a lot while navigating the site admin pages. This error comes from the WP All Export Pro plugin, and you should check with their support about what is causing it. (Checking their plugin code where the warning occurs I can see it is related to handling Advanced Custom Fields.)

The other PHP warning that you shared (PHP Warning: Attempt to read property "ID" on null) does come from Toolset, but I wasn't able to trigger it again while I was working on your site, I seems to have been an isolated occurrence.

#2653195

What I could do is propose a code snippet that you add which checks if extra field groups have been created and deletes the unnecessary groups.

looks good will you help me provide it?

i will continue try where to trigger it

#2653969

Nigel
Supporter

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

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

You will see that I added a Code Snippet to remove the duplicate field groups on your site, so you should not see those anymore.

It contains the following code:

function ts_hook_cfg_check(){
    if ( is_admin() && ! wp_doing_ajax() && ! wp_is_json_request() ) {
        add_action( 'shutdown', function(){
        
            $cfgs = get_posts( [ 
                'post_type' => 'wp-types-group',
                'title' => 'Toolset WooCommerce',
                'numberposts' => -1
            ]);
            if ( count($cfgs) > 1 ) {
                
                array_shift( $cfgs );
                
                foreach ( $cfgs as $cfg ){
                    wp_delete_post( $cfg->ID, true ); 
                }
            }
        });
    }
}
add_action( 'wp_loaded', 'ts_hook_cfg_check' );