Skip Navigation

[Resolved] Your Site is Experiencing a Technical Issue – Toolset Types – 502 Gateway Errors

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user was encountering Fatal errors after updating Toolset plugins.

Solution:
It appears that Toolset types is not compatible with Siteground's Ultrafast PHP option.
When I turned this off and used Standard PHP, the site has performed normally.

This support ticket is created 2 years, 9 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+00:00)

This topic contains 7 replies, has 2 voices.

Last updated by WayneM2821 2 years, 8 months ago.

Assisted by: Jamal.

Author
Posts
#2099885

Link to a page where the issue can be seen:
hidden link

I expected to see:
the page

Instead, I got:
502 Gateway Error

I got an email from WordPress - Your Site is Experiencing a Technical Issue. The text of the email follows at the end.

I was running the latest version of the types plug.
I removed this and re-installed the plugin from My Account > downloads
I get frequent intermittent 502 Gateway errors with the plugin activated.
I get frequent intermittent 502 Gateway error when I try to edit a post or any custom post type
The only way I can use the site consistently is to deactivate the plugin. Obviously, this removes a lot of the content from the site and is not acceptable.

"Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

In this case, WordPress caught an error with one of your plugins, Toolset Types.

First, visit your website (hidden link) and check for any visible issues. Next, visit the page where the error was caught (hidden link) and check for any visible issues........

When seeking help with this issue, you may be asked for some of the following information:
WordPress version 5.7.2
Current theme: OceanWP Child (version 1.5.13.1526469068)
Current plugin: Toolset Types (version 3.4.10)
PHP version 7.4.20

Error Details
=============
An error of type E_ERROR was caused in line 18 of the file /home/customer/www/canadabayheritage.asn.au/public_html/wp-content/plugins/types/vendor/otgs/installer/includes/functions-core.php. Error message: Allowed memory size of 805306368 bytes exhausted (tried to allocate 6248241408 bytes)"

UPDATED ERROR MESSAGE:

Error Details
=============
An error of type E_ERROR was caused in line 11 of the file /home/customer/www/canadabayheritage.asn.au/public_html/wp-content/plugins/types.old/vendor/otgs/installer/includes/products/OTGS_Products_Manager_Factory.php. Error message: Uncaught TypeError: Argument 2 passed to OTGS_Products_Manager_Factory::create() must be an instance of OTGS_Installer_Logger_Storage, instance of OTGS_Installer_Logger_Storage given, called in /home/customer/www/canadabayheritage.asn.au/public_html/wp-content/plugins/types.old/vendor/otgs/installer/includes/class-wp-installer.php on line 270 and defined in /home/customer/www/canadabayheritage.asn.au/public_html/wp-content/plugins/types.old/vendor/otgs/installer/includes/products/OTGS_Products_Manager_Factory.php:11
Stack trace:
#0 /home/customer/www/canadabayheritage.asn.au/public_html/wp-content/plugins/types.old/vendor/otgs/installer/includes/class-wp-installer.php(270): OTGS_Products_Manager_Factory::create(Object(OTGS_Products_Config_Xml), Object(OTGS_Installer_Logger_Storage))
#1 /home/customer/www/canadabayheritage.asn.au/public_html/wp-content/plugins/types.old/vendor/otgs/installer/includes/class-wp-installer.php(94): WP_Installer->prepare_products_manager()
#2 /home/customer/www/canadabayheritage.as

#2100001

Jamal
Supporter

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

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

Hello and thank you for contacting Toolset support.

It seems that you are using two versions of the types plugin, in two different folders. For example the following error:

An error of type E_ERROR was caused in line 18 of the file /home/customer/www/canadabayheritage.asn.au/public_html/wp-content/plugins/types/vendor/otgs/installer/includes/functions-core.php. Error message: Allowed memory size of 805306368 bytes exhausted (tried to allocate 6248241408 bytes)"

Comes from the plugin at the folder wp-content/plugins/types. And this error:

An error of type E_ERROR was caused in line 11 of the file /home/customer/www/canadabayheritage.asn.au/public_html/wp-content/plugins/types.old/vendor/otgs/installer/includes/products/OTGS_Products_Manager_Factory.php.

Comes from the plugin at the folder wp-content/plugins/types.old/

Please remove both folders, then install the plugin again from your download page https://toolset.com/account/downloads/

If this does not help resolve the issue, I'll need to have access(WordPress + FTP) to your website to analyze it further. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#2101253

Jamal
Supporter

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

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

Thank you for the credentials and for explaining further.

I suspected an issue with the PHP version, so I added a little file to check the phpinfo data, and you are on a recent PHP7 version, which Toolset supports. I found some memory-related errors on the debug file, which lets me think that, maybe, Toolset Types has a conflict with another component of the website(theme/plugin) and I would like to perform a compatibility test(try to activate Types with a default theme and no other plugins). I can't perform the test on the live site, so I updated "All In One Migration" and prepared a copy of the website to analyze it locally. A copy is prepared and ready to be used, but I can't download it without having your approval. Do you allow me to download it and debug it locally?

#2101911

Yes. Please download and debug. Thanks for the assistance

#2102205

Jamal
Supporter

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

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

I downloaded the copy and installed it in my local environment. I was able to activate Toolset Types without any issues. So, I tried editing and creating posts and custom posts to see if the error will be triggered and it did not happen.

So, I went back to your website, activated PHP debugging, and activated Types again. Then, I tried to edit and create a new post, the issue was not reproduced.

Please let me know where can I reproduce the issue. Or any steps I could follow to trigger these errors.

I'll also suggest increasing the memory limit in wp-config.php from 96M to 128M to meet Toolset requirements. https://toolset.com/toolset-requirements/

#2102581

I just discovered the site has been down for about 8 hours with the usual 502 Bad Gateway. I have tested this with various proxy servers around the world.

I have increased the memory limit to 128M

I have again had to deactivate the Types plugin to get the site working and remove the 502 error

UPDATE: After about an hour, I re-activated the Types plugin. and the site worked fine until about 1 1/2 hours elapsed when I again got the 502 Bad Gateway error and the wordpress email " Your Site is Experiencing a Technical Issue", etc.

I have again deactivated the Types plugin to get the site working and remove the 502 error

#2104639

Jamal
Supporter

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

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

My apologies for the late reply, but I do not work on Wednesdays and Thursdays.

Well, because the updated Toolset plugin has worked for a period of time on your site, then it crashed the site again, I'll suspect that the issue happens only with your server.

So, I tried a few minutes ago to activate Types again, and I was getting those 502 errors. After activating PHP debugging this is the error that I was getting:

[02-Jul-2021 08:40:24 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function wp() in /home/customer/www/canadabayheritage.asn.au/public_html/wp-blog-header.php:16
Stack trace:
#0 /home/customer/www/canadabayheritage.asn.au/public_html/index.php(17): require()
#1 {main}
  thrown in /home/customer/www/canadabayheritage.asn.au/public_html/wp-blog-header.php on line 16

The wp() function is a core WordPress function, and "wp-blog-header.php" is a core WordPress file. I found some online threads that think this error comes from an incomplete update, either for WordPress or other plugins. Other online threads think that this is caused by a corrupt installation that may be caused, by an incomplete WordPress update(due to disk space) or a malware. Check these links:
- https://wordpress.org/support/topic/fatal-error-uncaught-error-call-to-undefined-function-wp-in-home-azamfvrk-r/
- https://stackoverflow.com/questions/65971408/fatal-error-uncaught-error-call-to-undefined-function-wp-in-home-customer-w
- https://stackoverflow.com/questions/31031133/fatal-error-on-wordpress-call-to-undefined-function-wp-in-wp-blog-header-php
- https://wordpress.stackexchange.com/questions/382407/fatal-error-uncaught-error-call-to-undefined-function-wp
- https://wordpress.stackexchange.com/questions/25758/fatal-error-call-to-undefined-function-wp-in-wp-blog-header-php

This being said, I wonder if your hosting provider could help with creating a staging site on the same server? If that's possible, I'll suggest performing the following on the staging site:
1. Perform a manual WordPress update https://wordpress.org/support/article/updating-wordpress/#manual-update
2a. Remove the current Toolset Types plugin, and install it again manually.
2b. Activate Toolset Types and only the required plugins to make the theme works.
3. Check if 502 errors arise.
4a. If yes, let me check this further.
4b. If no, activate the other plugins one at a time, and check every time if 502 errors arise. This will let us know if another plugin is contributing to this issue or not.
If this fixes the issue on the staging site, we can assume that it comes from a corrupt WordPress install, or a corrupt Toolset install. Then, you can perform the same on the live site, or just copy the staging site to the live site except for the wp-config.php file, and wp-content folder(make sure to copy the new Types install from the wp-content/plugins folder).

Let me know what you will get.

#2109647

My issue is resolved now. Thank you!

It appears that Toolset types is not compatible with Siteground's Ultrafast PHP option.
When I turned this off and used Standard PHP, the site has performed normally.

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