Domain mapping and bbPress – locked out of mapped domain admin area

I’m using the WPMUDev Premium Domain mapping plugin, and today I installed bbPress and went through the integration steps that were provided.

The last step had me make some changes to the wp-config.php file. Basically, I had to add these lines:

define( 'COOKIEHASH', 'numerical-cookie-hash-here );

define( 'COOKIE_DOMAIN', '.mysite.com' );

define( 'SITECOOKIEPATH', '/' );

define( 'COOKIEPATH', '/' );

However, I already had 3 of the lines in my wp-config file:

define('COOKIE_DOMAIN', '');

define('COOKIEPATH', '');

define('SITECOOKIEPATH', '');

The changes looked minimal, and everything seemed to work UNTIL I tried to login to one of my mapped domains.

Example:

blog3.mysite.com >> mapped to blog3.com

Previously, I would get to admin area by going to blog3.com/wp-admin

Now, my login appears to be broken (cannot get to dashboard) unless I go back to blog3.mysite.com/wp-admin

Any ideas why these 3 lines would screw up my ability to login to mapped domains?

  • Barry
    • DEV MAN’s Mascot

    As hpcareernet says.

    You need to remove the cookie_domain define. You shouldn’t need to use it to get bbpress cross logins working correctly, but it will mess up the domain mapping as it tries to enforce the cookies throughout the site to be made on a certain domain, and due to browser security restrictions, you can’t create a cookie on a domain you are not on.

  • nickd32
    • The Incredible Code Injector

    Thanks guys. Another weird thing is perplexing me now.

    At the top of my main site, I get these two errors:

    Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 1 in /var/www/html/wp-includes/classes.php on line 210

    Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 1 in /var/www/html/wp-includes/classes.php on line 211

    Then, if I try to access a page without the slash after it ( mysite.com/about instead of mysite.com/about/ ), I get this error:

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-includes/classes.php:210) in /var/www/html/wp-includes/pluggable.php on line 865

    Any clues? Does this have to do with the wp-config file again?