#StackBounty: #cookies Why does it say: 'Cookies are blocked or not supported'?

Bounty: 50

There are many many many many pages about this issue (and I could keep going).

For those who just came here for a solution, then it is:

1) Just try and refresh the page.

2) Try putting this in your wp-config.php

define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', ''); 

3) Or try putting this in your wp-config.php

define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );

4) Or putting this in your functions.php:

setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN);
if ( SITECOOKIEPATH != COOKIEPATH ) setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);

BUT…

I can find no one explaining why it happens? I’m experiencing it on my local development environment, but I want to ensure that it doesn’t happen when I push to production.

Why is it, that that error occurs? … And why is it, that a simple refresh can bypass it?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.