Skip to:
Content
Pages
Categories
Search
Top
Bottom

Cookie error after upgrading to WP 3.7.1 from 3.6.1

Viewing 3 replies - 1 through 3 (of 3 total)

  • Cam
    Participant

    @crazycoolcam

    Question:
    Can you log in after one or two failed attempts using the default form: wp-login.php?

    If so, I presented a workaround on the WP forums, which I will share here:

    Add the following php code to your functions.php file, your bp-custom.php file, OR a mu-plugin file that you create:

    //fix for cookie error while login.
    function set_wp_test_cookie() {
    	setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN);
    	if ( SITECOOKIEPATH != COOKIEPATH )
    		setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);
    }
    add_action( 'after_setup_theme', 'set_wp_test_cookie', 101 );

    This will try to set the test cookie anytime someone visits your site, and it will allow the sidebar form to start working again if wp-login.php and cookies are enabled.

    If you cannot sign in at all (after two or three attempts with wp-login.php), I have not seen a solution yet, but I have seen several threads about people with this issue after the upgrade to 3.7.1.

    Hope this helps, and I hope you are in the first category.
    ~Cam


    Pin
    Participant

    @icepin

    Hello Cam,
    Thanks for your reply, but unfortunately, didn’t worked.
    From wp-login.php I can log in from the first try.
    The scenario is like this: http://s11.postimg.org/t8t4umamb/cookie.png
    I have the login form with the exact code from bp-default’s theme sidebar on my index page, I type the user and PW there, press Login, redirects me to wp-login.php, press again it will log me in. Same scenario on a fresh WP + BP install with BP-Default Theme.

    If I try to log in using directly wp-login.php, I can log in with no problem. But when I try using a login form like the bp-default’s theme:

    <form name="login-form" id="" class="standard-form" action="<?php echo site_url( 'wp-login.php', 'login_post' ) ?>" method="post">
    		<input type="text" name="log" id="" class="input" placeholder="Email sau nume utilizator" value="<?php if ( isset( $user_login) ) echo esc_attr(stripslashes($user_login)); ?>" tabindex="97" />
    	<br />
    		<input type="password" name="pwd" id="" placeholder="Parola" class="input" value="" tabindex="98" />
    	<br />
    
    		<label class="parola"><?php do_action( 'bp_sidebar_login_form' ) ?>
    		<input type="submit" name="wp-submit" id="" value="<?php _e( 'Simply, be awesome!', 'buddypress' ); ?>" tabindex="100" />
    		</label>
    		<label class="parola">Ai uitat parola?</label>
    		<input type="hidden" name="testcookie" value="1" />
    	</form>

    I get cookie error.


    Pin
    Participant

    @icepin

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cookie error after upgrading to WP 3.7.1 from 3.6.1’ is closed to new replies.
Skip to toolbar