Support » Fixing WordPress » Cookie Error when Logging In

Viewing 15 replies - 46 through 60 (of 115 total)
  • @alfjmrodrigues try commenting out wp-login.php like you did in the video but remove the mu-plugins folder and the file inside. delete all the functions.php hacks if you made any as well, and try just the wp-login.php comments by itself. does it still throw the white screen?

    If that doesn’t work, install 3.7 and set all the settings, including your wordpress address and site address set to in your dashboard, then upgrade to 3.7.1 and see if it let’s you login

    Cam

    (@crazycoolcam)

    @alfjmrodrigues

    Watched your video and have some further info.
    1. The mu-plugins folder goes into the wp-content folder (so it is right alongside the regular plugins folder). Otherwise, it looks as though you followed the other instructions of mind perfectly.

    However, I don’t think this is your problem.

    What I would suggest for you to do is one of two things:
    1. Double check that cookies are indeed enabled in chrome: https://support.google.com/accounts/answer/61416?hl=en

    2. If that doesn’t work (cookies were/are enabled), then I would suggest following the instructions on http://codex.wordpress.org/Changing_The_Site_URL to change your url from http://www.maiscashback.com to just http://maiscashback.com as both the home and the site url.

    Let us know how it goes.
    ~Cam

    @cam I played around with both of my WordPress installations, and found that it does not matter if you have http://domain.com or http://www.domain.com set as the site URL and WordPress URL in the settings. You can use whichever you prefer.

    What DOES matter, is that if you have the settings set to http://domain.com then you MUST login from http://domain.com/wp-login.php and if you have the settings set to http://www.domain.com then you MUST login from http://www.domain.com/wp-login.php. Let me know if you found something different.

    The reason I posted the .htaccess redirect above is because my WordPress installations are not redirecting me from http://domain.com/wp-login.php to http://www.domain.com/wp-login.php (I have my site url and WordPress url set to http://www.domain.com) so I set it up so .htaccess does it for me.

    Cam

    (@crazycoolcam)

    @alfjmrodrigues

    One other thing to try (a 1b option since it is easier than #2) would be to switch browsers. It appears you are using Chrome. If you have Safari, IE, or Firefox installed, try logging in with one of those other browsers and see if it works. This will tell you it is the browser or the site.

    (FYI, I browsed over to your site, and was able to get the test cookie set without a problem [using Firefox]. I’m pretty sure you are facing a browser issue more than a WP issue.)

    ~Cam

    Mirajas and Cam,
    Many thanks for sharing your work. I’ve wrestled with this for days and would never have solved it on my own. You guys are great.

    I’m getting confused which of the patches to apply. Is just the one converting www to non-www and vise-versa enough or is the testcooky coding required as well?

    @alfjmrodrigues if this is a fresh install and you haven’t even been able to login to set your wordpress and site URLs, try logging in from http://maiscashback.com/wp-login.php (without the www). If that works you can set the URLs in the dashboard and go from there. It may be looking for a cookie from http://maiscashback.com/ and not http://www.maiscashback.com/

    Cam

    (@crazycoolcam)

    @amsgator Agreed that it doesn’t / shouldn’t matter whether you use the www or not. And definitely agree that you must use the same .htaccess rewrite that you have setup in your WP dashboard settings. (I messed this up and was caught in an infinite loop error. Not fun, but funny once I had it fixed. 🙂

    I am simply giving options for @alfjmrodrigues to try for troubleshooting, because something doesn’t work as expected. I’m pretty sure it is his browser settings after the last post. I visited the site and the test cookie set fine for me.

    ~Cam

    @willem.deboer I got mine to work with just the wp-login.php commenting OR just the .htaccess redirect. I prefer the htaccess redirect since it’s not changing any core files that will be overwritten and flagged by wordfence

    I have not tried more than one at a time. If you have more than one going at a time it might be causing a conflict

    @cam it sound like this is a fresh install and alfjmrodrigues hasn’t even been able to set his URLs in the settings because he can’t login. I’m wondering if WordPress isn’t looking for a cookie from http://maiscashback.com/ instead of http://www.maiscashback.com/

    Does it let you set them during install? If so pass on this option.

    Since he is accessing it from http://www.maiscashback.com/ it’s possible that is the issue.

    Cam

    (@crazycoolcam)

    @willem.deboer

    If you cannot login at all, first check your browser cookie settings and/or try using a different browser. (i.e if you use IE, try using chrome, or if you use chrome, try with Firefox or Safari.)

    If you cannot log in with a different browser, then you could try one of the patches above.

    The “//fix for cookie error while login” code I shared above works IF you get the error message after the first time you try to log in, but are able to log in on try #2 or #3. It won’t help you if don’t allow cookies to be set in your browser.

    Cam

    (@crazycoolcam)

    @amsgator, the cookie I received when visiting the site lists www in the host domain: http://www.maiscashback.com

    If it is setting the cookie fine for me (and not giving me the error), I am pretty confident it’s his browser.

    @cam @amsgator Thank you, I’ll give it a try!

    I just visited http://www.maiscashback.com/ and I’m not getting a cookie from http://www.maiscashback.com/ or http://maiscashback.com/ in firefox. Strange

    Cam

    (@crazycoolcam)

    @amsgator, did you visit the wp-login.php on his site. I don’t think he ever got my //fix code activated because the mu-plugin folder wasn’t in wp-content.

    The test-cookie gets set when you try to visit the login page by default.

Viewing 15 replies - 46 through 60 (of 115 total)
  • The topic ‘Cookie Error when Logging In’ is closed to new replies.