This plugin is meant to assist a Controller, Data Processor, and Data Protection Officer (DPO) with efforts to meet the obligations and rights enacted under the GDPR.
Every time wordpress does a cron job, the gdpr plugin tries to set a cookie and fails because headers have already been sent. I didn't dig deeper and use wireshark so don't know exactly what's going on, but obviously, the server calling itself should not have to deal with any GDPR cookies.
I fixed it by adding a line to class-gdpr-public.php:
public function set_plugin_cookies() {
+ if (isset($_SERVER['SCRIPT_NAME']) && preg_match('|/wp-cron\.php$|',$_SERVER['SCRIPT_NAME'])) return;
There may be a better way to do it, but this works for me. No cookies get sent whether wp-cron.php is accessed locally or from the web, which is just as well because it returns 0 bytes anyway!
It's quite possible nobody ever noticed this if they don't have access to their error logs, or don't check them!
Adding this to wp-config.php and setting up a system cron task also cures the problem, but not every wp instance has crontab capability.
define('DISABLE_WP_CRON', true);
I haven't pulled code before, but hopefully someone can look at this and add it.
Just noticed my error log filling up with these - here's the result of 1 request:
Every time wordpress does a cron job, the gdpr plugin tries to set a cookie and fails because headers have already been sent. I didn't dig deeper and use wireshark so don't know exactly what's going on, but obviously, the server calling itself should not have to deal with any GDPR cookies. I fixed it by adding a line to class-gdpr-public.php:
There may be a better way to do it, but this works for me. No cookies get sent whether wp-cron.php is accessed locally or from the web, which is just as well because it returns 0 bytes anyway! It's quite possible nobody ever noticed this if they don't have access to their error logs, or don't check them!
Adding this to wp-config.php and setting up a system cron task also cures the problem, but not every wp instance has crontab capability. define('DISABLE_WP_CRON', true);
I haven't pulled code before, but hopefully someone can look at this and add it.