• Resolved wgregori

    (@wgregori)


    Hi – I’m running the latest version of Multisite and I’m having problems with the Cookies are Block error upon logging in as admin. The odd thing is that two of the sites allow for the admin login and 2 do not.

    Allows admin login:
    https://theblockofgenesis.com/login

    Does not allow admin login
    https://gregorigroup.com/login

    You can use any username and password to trigger the error.

    I’ve tried many different solutions that I’ve found in the forum… but it seems that most of these problems are of a binary nature, either it throws the error for all sites or it does not. I just can’t seem to add any new sites without encountering the error.

    Thanks for any help you might provide.
    Wayne

    • This topic was modified 4 years, 6 months ago by James Huff. Reason: moved to Networking WordPress since this is a multisite issue

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Go to the Network Admin page. Select Sites and select “Edit” on the site that has the problem.

    On the Settings tab, look for the “Siteurl” and the “Home” setting. What are those URLs?

    Basically, when I load your problem site, I see that it’s setting a cookie on an “sfnet.org” domain, which is incorrect. So, find and fix the domain, and the test cookie should work properly.

    Thread Starter wgregori

    (@wgregori)

    I decided to create a fresh install of multisite on Bitnami and I’m having the same problem. I have added two urls to multisite, base-url sfnet.org and my additional gregorigroup.com. I can login into admin on the base url but not on gregorigroup.com.

    My settings are as follows for gregorigroup.com

    Info->Site URL = https://gregorigroup.com
    Settings-> Site URL = https://gregorigroup.com
    Settings-> Home = https://gregorigroup.com

    Thanks for any help you might provide.
    Best,
    Wayne

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    @wgregori Make a PHP file in the /wp-content/mu-plugins directory. Put this code in it:

    <?php
    add_action( 'muplugins_loaded', function(){
    	global $current_blog, $current_site;
    	if ( false === stripos( $current_blog->domain, $current_site->cookie_domain ) ) {
    		$current_site->cookie_domain = $current_blog->domain;
    	}
    });

    See if that helps.

    Reference: https://danielbachhuber.com/2016/07/07/fixing-cookie_domain-for-mapped-domains-on-multisite/

    Thread Starter wgregori

    (@wgregori)

    Thanks for the effort but it didn’t work… I put the file in
    /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins

    Restarted all services and then tried https://gregorigroup.com/login and got the same Error regarding cookies being blocked.

    I may have to just run separate servers for all my sites… hard to believe that this will not work… Fresh multisite image install, no additional plugins two URLs… base url works and any subsequent URL fails to allow admin login…

    THanks for any additional ideas.
    Wayne

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    I put the file in
    …/wp-content/plugins

    I said “/wp-content/mu-plugins” for a reason. MU plugins are must-use plugins. They load automatically. The plugins in /plugins do not.

    Thread Starter wgregori

    (@wgregori)

    Samuel! I can’t “friggin” believe it… that worked. Thank you so much. I can’t believe this isn’t a more widely talked about problem.

    Thanks again.
    Wayne

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error: Cookes are blocked – Multisite – 2 sites work – others do not’ is closed to new replies.