[ad_1]
Hello @luistar15,
Could you please provide us with more detailed information about the exact log where the error is recorded? I have installed the latest plugin version on a fresh WordPress installation and no such error was recorded.
Also, please provide us with the URL of your site.
Steps to reproduce:
1. Fresh WordPress (6.0.2) install
2. Install and activate SG Security (1.3.0) plugin
3. Update wp-config.php
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', __DIR__ . '/debug.log' );4. Generate an error somewhere: twentytwentytwo/functions.php
add_filter( 'admin_menu', function () {
throw new Exception("Error Processing Request", 1);
}) ;5. Navigate to /wp-admin/
6. Check debug.log
It has two entries:
– one for the generated error itself
– the other one is sg-security related
[03-Sep-2022 01:57:55 UTC] PHP Fatal error: Uncaught Exception: Error Processing Request in wp-content/themes/twentytwentytwo/functions.php:70
Stack trace:
#0 wp-includes/class-wp-hook.php(307): {closure}()
#1 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#2 wp-includes/plugin.php(476): WP_Hook->do_action()
#3 wp-admin/includes/menu.php(155): do_action()
#4 wp-admin/menu.php(394): require_once('...')
#5 wp-admin/admin.php(158): require('...')
#6 wp-admin/edit.php(10): require_once('...')
#7 {main}
thrown in wp-content/themes/twentytwentytwo/functions.php on line 70
[03-Sep-2022 01:57:55 UTC] PHP Fatal error: Uncaught Error: Object of class WP_Error could not be converted to string in wp-content/plugins/sg-security/templates/error.php:111
Stack trace:
#0 wp-content/plugins/sg-security/core/Helper/Helper.php(111): include()
#1 wp-includes/functions.php(3713): SG_Security\Helper\Helper->custom_wp_die_callback()
#2 wp-includes/class-wp-fatal-error-handler.php(234): wp_die()
#3 wp-includes/class-wp-fatal-error-handler.php(153): WP_Fatal_Error_Handler->display_default_error_template()
#4 wp-includes/class-wp-fatal-error-handler.php(57): WP_Fatal_Error_Handler->display_error_template()
#5 [internal function]: WP_Fatal_Error_Handler->handle()
#6 {main}
thrown in wp-content/plugins/sg-security/templates/error.php on line 111I modified the file sg-security/core/Helper/Helper.php(107) adding the exit; statement and that fixed the problem for me.
I have followed your steps and still have not managed to recreate the error. Could you please specify the PHP version you are using?
I’m using:
– PHP 8.1.9
– WSL2 Debian 11
– Nginx
I am still not able to recreate the error when using PHP version 8.1.10 and PHP error_reporting set to E_ALL.
Most probably the error is due to modified WordPress core files.
Thanks for the quick responses.
I have setup a wordpress installation you can look into:
Log file:
WordPress:
user: admin pass: admin
SSH/SFTP:
34.201.244.99:22
user: wptest pass: wptest
It’s a fresh install, no core files where modified.
Note: It’s is a testing VPS, you can play with it if you like.
Thank you for the update. Please note that it is not recommended to post login credentials in this public forum.
I replicated the issue and once I deactivated the SiteGround Security plugin, a Fatal Error was encountered, thrown by the theme. You can check the debug log for the exact error. I noticed that the issue was on line 71 in the theme’s(twentytwentytwo) functions.php file. However, it seems that the file is modified and this is causing the issue with the entire application’s dashboard on my end.
I changed the theme on your test site and confirmed that no such issue was encountered. I would recommend checking theme’s modifications further in order to debug the issue.
Best Regards,
Dimitar Petrov
