WordPress.org

Support

Support » Multisite » [Resolved] Cookie_Domain error on WP MU Domain Mapping

[Resolved] Cookie_Domain error on WP MU Domain Mapping

  • I’m trying to get Domain Mapping up and running, and am stuck. I’ve installed the plugin manually, per instructions. When I go to wp-config and add:

    define( 'SUNRISE', 'on' );
    
    /* That's all, stop editing! Happy blogging. */

    (shown above the stop editing line, and refresh my mysite/wp-admin page, I get the following error:

    “The constant “COOKIE_DOMAIN” is defined (probably in wp-config.php). Please remove or comment out that define() line.”

    One of the first lines in my wp-config is the following:

    "define('COOKIE_DOMAIN', 'mysite.com'); // Added by W3 Total Cache

    If I comment out that line, I get a database error message on both my main page, and my login page. Is there any way to get this straightened out?

    Thanks.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Try refreshing the cache once you comment out the line. I use W3TC and I don’t have that line in my install. It may be a wonky setting, though.

    Once I comment out the line, I can’t access my dashboard to empty the cache…

    Have also tried setting the cookie_domain to ‘false’ both manually and through the W3TC control panel. This gives a database error. Deactivating all plugins, then uncommenting sunrise.php doesn’t fix it either.

    Have also tried setting the cookie_domain to ‘false’ both manually and through the W3TC control panel.

    Which setting is that in W3TC?

    CDN-Advanced-set cookie domain

    Ah. The one thing I can’t test 😉 No CDN.

    However… Yeah, I can totally see that being a problem. Cookies and mapped domains are very, very, special. Why you can’t turn it OFF though is weird.

    Put the sunrise line up top, before the other lines.

    Yep. If I turn it off I get a database error. My primary blog is on the root domain (not www), so I don’t know if that’s part of the problem. I’m about ready to find someone to pay to fix it. Any suggestions?

    What options did you check on the domain mapping plugin? I can’t remember if it defaults to some checked.

    (BTW, I use both W3TC and domain mapping without issues, but I don’t have any CDN set up)

    Right now when I uncomment the sunrise.php line, I get the cookie_domain error and can no longer access my dashboard. This means I can’t access the domain plugin options. I’ll try moving sunrise to the top of wp-config file tonight.

    Ah. You didn’t mention you couldn’t access the dashboard.

    Bugger.

    What other plugins do you have installed?

    I deactivated all my plugins and still had this problem. That was before I tried setting cookie_domain false though. Might set that first then turn them off…

    Finally got it. In W3TC settings, I turned the Cookie_domain setting off, which sets define( ‘COOKIE_DOMAIN’, false); in wp-config. After that had a chance to clear the cache, I uncommented the sunrise.php, and then got an error about cookie_domain. Final step was to comment out the line in wp-config as follows:

    // define(‘COOKIE_DOMAIN’, false );

    At least, now I can access the domain mapping plugin as superadmin.

    What a mess…

    That makes a certain amount of sense. Turn it off, flush cache, remove line… That sounds logical.

    I’ll disable that option in this case.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Resolved] Cookie_Domain error on WP MU Domain Mapping’ is closed to new replies.