Thanks for your report. I’ve tried to reproduce this issue on a local install, and I’m not seeing the same thing happen.
WPForms contains a polyfill (a similar function for versions lacking the default WP one) for WordPress’s ‘wp_get_environment_type’ function, that it uses on very old WordPress versions. That polyfill may have issues, but I’m not able to easily test on WP 5.x. I assume you’re using the latest version of WP and the two plugins?
Hi Roy!
Thank you for your answer.
Yes, I am currently using the latest version of WordPress on Hostinger, v6.3.1
I’m using many more plugins, but to avoid the error, I deactivated them all and only activated yours, in version 1.3.1. As soon as I activate the second plugin, WPForms Lite in version 1.8.3.1, the error happens.
Can I help with any more information?
Thanks.
I’ll try to look into this in more detail later this week. Have you reported this issue to WPForms as well? While the error manifests in my plugin’s output, I think their plugin introduces it.
Can you please check what the value of the WP_ENVIRONMENT_TYPE constant in your site’s wp-config.php is?
There are only four possible values, and anything else will make it default to ‘production’, which could maybe explain what is happening.
https://developer.wordpress.org/reference/functions/wp_get_environment_type/
If things are set up correctly on the sever, there also shouldn’t be a WP_ENVIRONMENT_TYPES (plural) constant, since that is no longer supported.
Hello,
Since the other plugin could be the cause of the incompatibility, I have already opened a ticket with support for the other plugin as well.
Additionally, this is the constant in my wp-config.php:
/** Defines the Environment variables used by WordPress **/ /
//* The 4 possible environment types are: local; development; staging and production **//
define( ‘WP_ENVIRONMENT_TYPE’, ‘staging’ );
/* —————————————————————————- */
Thanks for posting the wp-config setting. That looks 100% okay to me. Since I’m unable to reproduce the error, I propose we see if the WPForms people have more luck. If not, I’ll look into this some more.
Hello,
I just came here to say that I posted a link to support for the other plugin, to see if they can help.
https://www.transfernow.net/dl/202310147cS4gw3x
After the video, I also changed the theme to default, but the problem remained.
Thanks.