WordPress.org

Forums

[resolved] Cookie_Domain error on WP MU Domain Mapping (16 posts)

  1. hayesgb
    Member
    Posted 3 years ago #

    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.

  2. 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.

  3. hayesgb
    Member
    Posted 3 years ago #

    Once I comment out the line, I can't access my dashboard to empty the cache...

  4. hayesgb
    Member
    Posted 3 years ago #

    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.

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

    Which setting is that in W3TC?

  6. hayesgb
    Member
    Posted 3 years ago #

    CDN-Advanced-set cookie domain

  7. 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.

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

  9. hayesgb
    Member
    Posted 3 years ago #

    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?

  10. 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)

  11. hayesgb
    Member
    Posted 3 years ago #

    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.

  12. Ah. You didn't mention you couldn't access the dashboard.

    Bugger.

    What other plugins do you have installed?

  13. hayesgb
    Member
    Posted 3 years ago #

    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...

  14. hayesgb
    Member
    Posted 3 years ago #

    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...

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

  16. Frederick Townes
    Member
    Posted 2 years ago #

    I'll disable that option in this case.

Topic Closed

This topic has been closed to new replies.

About this Topic