• Kevin

    (@kcmquickreport)


    Since updating WP yesterday, When users attempt to login to my WP site, they receive an error message:

    “Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”

    Cookies are enabled, and if you re-enter your login information on the same page with the error, you can access the site without difficulty. You will then never see the message if you logout and login , unless you clear your cookies, then it returns.

    Never had the message before, and with cookies enabled in all browsers, you still see the message the first time logging in.

    Any one else experiencing this or have a suggested solution? All help is appreciated!

Viewing 15 replies - 46 through 60 (of 115 total)
  • amsgator

    (@amsgator)

    @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 https://codex.www.ads-software.com/Changing_The_Site_URL to change your url from https://www.maiscashback.com to just https://maiscashback.com as both the home and the site url.

    Let us know how it goes.
    ~Cam

    amsgator

    (@amsgator)

    @cam I played around with both of my WordPress installations, and found that it does not matter if you have https://domain.com or https://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 https://domain.com then you MUST login from https://domain.com/wp-login.php and if you have the settings set to https://www.domain.com then you MUST login from https://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 https://domain.com/wp-login.php to https://www.domain.com/wp-login.php (I have my site url and WordPress url set to https://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

    dlandri

    (@dlandri)

    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.

    willem.deboer

    (@willemdeboer)

    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?

    amsgator

    (@amsgator)

    @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 https://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 https://maiscashback.com/ and not https://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

    amsgator

    (@amsgator)

    @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

    amsgator

    (@amsgator)

    @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 https://maiscashback.com/ instead of https://www.maiscashback.com/

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

    Since he is accessing it from https://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: https://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.

    willem.deboer

    (@willemdeboer)

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

    amsgator

    (@amsgator)

    I just visited https://www.maiscashback.com/ and I’m not getting a cookie from https://www.maiscashback.com/ or https://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.