WordPress Site Health "Critical Issues"

donworth

Member
Hi,
When I check Site Health in my WordPress dashboard I am getting the following critical issues. When I disable the dadaBIK plug-in they go away. When I reenable it, they come back. Are they something I should be concerned about? The plug-in seems to be working fine otherwise. This was happening on 10.4 and now on 10.5.
Thanks!
Don

-------------

Site Health Status

The site health check shows critical information about your WordPress configuration and items that require your attention.

3 critical issues


An active PHP session was detected
Performance
A PHP session was created by a session_start() function call. This interferes with REST API and loopback requests. The session should be closed by session_write_close() before making any HTTP requests.


The REST API encountered an error
Performance
The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.

The REST API request failed due to an error.
Error: cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received (http_request_failed)


Your site could not complete a loopback request
Performance
Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.

The loopback request to your site failed, this means features relying on them are not currently working as expected.
Error: cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (http_request_failed)


-----------------

Your current DaDaBIK version

You are using DaDaBIK version 10.5-Manarola enterprise, installed on 01/21/2021 (installation code: 163965fe831cbbb99e), the latest version of DaDaBIK is 10.5-Manarola released on 01/14/2021

You are runnning the latest release of DaDaBIK

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enteprise to Platinum) please contact us.

System info

PHP Version: 7.2.34

mysql version: 5.5.62-cll-lve

Web server: Apache

Client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15

URL installation: https://48ovvi.org/dadabik/
 

eugenio

Administrator
Staff member
Hello,
I will check this; question: was this happening even before V 10.4?

Best,
 

donworth

Member
Thanks, Eugenio!

I have not been on DaDaBIK before 10.4.

I started on 10.4 Pro on 12/24/2020 and upgraded to 10.4 Enterprise 1/8/2021. I noticed the errors yesterday (on 10.4) and upgraded to 10.5 to see if that would make them go away. It didn't.

I don't remember seeing them when I first installed 10.4 Pro (but I might have missed it). There might have been a WordPress update in there somewhere tho.

Don
 

eugenio

Administrator
Staff member
Hello,
can you also specify which WP version and which template are you using, so I can try to replicate the problem?

I am looking into the problem and it seems this could happen starting from WP 5.5 but I want to be sure we are referring to the same problem.

Best,
 

donworth

Member
I'm running WordPress 5.6 with the EduPress theme. I switched to the Twenty Twenty One theme (the generic theme that comes with WP) and get the same errors. So it's probably not theme related.

I am using TablePress, The Events Calendar, and Wordfence Security plug-ins but I disabled all of them except DaDaBIK and get the same errors.

If it would be helpful I can email you my WP admin password and FTP password and DaDaBIK Root password. This site is a test site in preparation for setting up a production site later.

Don
 

eugenio

Administrator
Staff member
I think the problem is clear to me now.

Please try to replace, in the dadabik wordpress plugin, dadabik_wrapper.php file, the part after

$dadabik_session_name = '......';

(until the end)

with the following one:

// site_path
// site_path can be empty in your DaDaBIK config_custom file but it cannot be empty here, it's the path where the DaDaBIK application you want to embed in Wordpress is installed, e.g if DaDaBIK is reachable at http://www.mysite.com/john/dadabik/ the site path must be '/john/dadabik/', remember to put slashes at the beginning and at the end; put just one slash '/' if DaDaBIK is installed in the root of a Website, (e.g. if DaDaBIK is installed at http://www.mysite.com/)
$site_path = '';

if ($secret_key === '' or is_null($secret_key) or $dadabik_session_name === '' or is_null($dadabik_session_name) or $site_path === '' or is_null($site_path)) die('secret key or session name or site path not set');

function set_user_session(){
global $secret_key, $dadabik_session_name, $site_path;
$temp = wp_get_current_user();


session_name($dadabik_session_name);
ini_set('session.cookie_path', $site_path);

if (PHP_VERSION_ID < 70300) {
session_set_cookie_params(0, $site_path.'; samesite=Lax');
} else {
session_set_cookie_params(array(
'lifetime' => 0,
'path' => $site_path,
'samesite' => 'Lax'
));
}

session_start();

if (isset($temp->user_login)){

$_SESSION['wordpress_user'] = $temp->user_login;
$_SESSION['wordpress_secret'] = md5($_SESSION['wordpress_user'].$secret_key);
}
else{
unset($_SESSION['wordpress_user']);
unset($_SESSION['wordpress_secret']);
}

session_write_close();

}
function dadabik_wrapper_func($atts){
return '<iframe frameborder="0" src="'.$atts['url'].'" width="100%" height="800" id="dadabik_iframe" style="border:0;overflow-y:auto;"></iframe>';
}
function dadabik_enqueue_script(){
wp_register_script('dadabik_wrapper_js', plugins_url('dadabik_wrapper_js.js', __FILE__));
wp_enqueue_script('jquery');
wp_enqueue_script('dadabik_wrapper_js');
}

?>

This should fix it (you have to set the new $site_path). Let me know if it works, an official fix and some more details will be published very soon.

Best,
 
Top