Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Buddypress-Default Theme – cannot log in sidebar

  • Avatar of willandmae
    willandmae
    Participant

    @willandmae

    I finally got everything working fine together for the most part on my new site. Wow-it was an endeavor plugin by plugin hehehehe.

    The one situation I am having though is that buddypress-Default theme and the logging in from the theme. In the upper right hand corner it says username and password – if you type it in It Always says wrong and fails Login. Then it brings you to wordpress login and all is fine you can log in normally.

    Help Please…

    Thanks…

    buddypress ver 1.8.1, WordPress 3.7 tvbar.heavenboundministry.com

Viewing 20 replies - 26 through 45 (of 45 total)
  • Avatar of Bluecatz
    Bluecatz
    Participant

    @bluecatz

    @Willamdmae, sorry, I missed that part. I have two sites, a production and a test site, both of which this is happening on. On the test site, I only have BuddyPress, the Chat and memberships plugins running, so I doubt that it’s being caused by any other plugins.

    Avatar of willandmae
    willandmae
    Participant

    @willandmae

    @bluecatz Thank you so Much for that. Just trying to help them and us to a fix. It is happening to quite a few folks. I so happen to like the default theme.

    Thanks again!

    Avatar of willandmae
    willandmae
    Participant

    @willandmae

    Well I Believe I have left my site open long enough for anyone who needs to see the error in real time have the time to explore. I do know someone came online once and checked it out so I hope it was you @mercime … The test account is closed for now. As you can see there are ample other sites here as well that can share too. I hope someone can Help fix this problem… Thanks…

    Avatar of Bluecatz
    Bluecatz
    Participant

    @bluecatz

    Hi @mercime,

    Just following up to see if you’ve had any luck determining what’s causing this problem as several more people seem to be experiencing it as well. Please let us know.

    Thanks,
    Michael

    Avatar of willandmae
    willandmae
    Participant

    @willandmae

    I just tested a different theme, kind of like the buddy-default but less to offer. Nevertheless, I tested its side bar login, one just like this one and it worked just dandy. No login issues. So Please even though this is not being bundled in the next version to new installs, can someone help us please…

    Avatar of crazycoolcam
    Cam
    Participant

    @crazycoolcam

    While searching threads about a similar issue, I stumbled upon this thread that some guys and I solved over on the WP forums.

    Question:
    Can you log in after one or two failed attempts (with either the sidebar login, or wp-login.php) but then are able to 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 any page of 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 (was what I was looking around for), 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 all are in the first category. :)
    ~Cam

    Avatar of willandmae
    willandmae
    Participant

    @willandmae

    @crazycoolcam I was so excited to see this fix here this morning. I hurried to put this into effect because it matches what you say-if you try the sidebar firsttime it fails and then it works after this until cookies are deleted or cache. I have been always able to login without fail using the wp-login – just not the sidebar login the first time. Anyway, I could only find the functions.php file and I added it to the end before the ?> at the end of the file. For some reason I got a blank screen and this error.

    Parse error: syntax error, unexpected T_IF in /server_info/wp-content/plugins/buddypress/bp-themes/bp-default/functions.php on line 796

    I guess I just don’t know where to put the code or something. I look forward to hearing back from you for your direction to help my simple ignorance of not knowing what to do.

    Thanks William

    Avatar of crazycoolcam
    Cam
    Participant

    @crazycoolcam

    Hi @willandmae
    Try this. Remove the lines of code from the bp-default functions.php and create a brand new (blank) file called bp-custom.php in the plugins folder. (/wp-content/plugins/bp-custom.php)

    In the file place the following modified lines of code:

    <?php
    //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 );
    
    ?>

    Let me know if that works any differently.

    ~Cam

    Avatar of willandmae
    willandmae
    Participant

    @willandmae

    @crazycoolcam Thanks. I did exactly what you said and I still am receiving this error:

    Parse error: syntax error, unexpected T_IF in /server_info/wp-content/plugins/bp-custom.php on line 5

    This is what the file consists of:

    1 <?php
    2 //fix for cookie error while login.
    3 function set_wp_test_cookie() {
    4	setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN);
    5	if ( SITECOOKIEPATH != COOKIEPATH ) {
    6		setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);
    7	}
    8 }
    9 add_action( 'after_setup_theme', 'set_wp_test_cookie', 101 );
    10 
    11 ?>

    Thank you soooo much for assisting. I think I speak for everyone here — THANKYOU!

    Avatar of willandmae
    willandmae
    Participant

    @willandmae

    @crazycoolcam IT WORKS! Thank you Sir! It Works..hehehe, I guess the code wanted the real single quote instead of the ascii code. Changed to them and it works dandy! Thanks again! The original issue in my eyes is resolved thanks to @crazycoolcam but will leave open until everyone else confers–let me know please!

    Awesome Thanks again!

    William

    Avatar of crazycoolcam
    Cam
    Participant

    @crazycoolcam

    Parsing issues strike again. Glad to help you solve it. :)

    Avatar of geistschatten
    geistschatten
    Participant

    @geistschatten

    Seems to have helped here too! Just having a few of my members test it out. You leave the code in place permanently, correct?

    Avatar of crazycoolcam
    Cam
    Participant

    @crazycoolcam

    @geistschatten — I don’t plan to remove it unless something stops working. I don’t think it hurts anything to set identical cookies more than once. I think it might just overwrite them.

    ~Cam

    Avatar of danbp
    danbp
    Participant

    @danbp

    @crazycoolcam
    thank you for the fix. Works like a charm.
    I opened a ticket about this. http://buddypress.trac.wordpress.org/ticket/5236#ticket

    Avatar of crazycoolcam
    Cam
    Participant

    @crazycoolcam

    You’re welcome @danbp. It appears that another fix is on its way and it is set to be included in 1.9.

    These my fix and the official BP fix tackle the issue differently, but they shouldn’t conflict.

    See #5219 for details on the official fix.

    ~Cam

    Avatar of Bluecatz
    Bluecatz
    Participant

    @bluecatz

    @cam, thank you so very much, this seems to have resolved it for me as well!

    Avatar of icepin
    icepin
    Participant

    @icepin

    an alternative is to change few lines on the login form’s code as posted here: http://buddypress.trac.wordpress.org/changeset/7485

    Cheers

    Avatar of willandmae
    willandmae
    Participant

    @willandmae

    @crazycoolcam Thanks again for the fix, I do have a situation that maybe you can assist. I changed my Son’s site over to almost identical from my tvbari support group and his is a support group with CHD he was born with Congenital Heart defect and has had 2 open heart surgeries and now is just turning 2. Anyway, everything is almost identical in setup and plugins. The only difference really besides for content is that wordpress resides in a subdirectory of the subdomain. http://josephstory.org/jjblog anyway, things worked for awhile but now it seems the same identical problem now resides for logging in and I placed the working code in the bp-custom file which works for tbvari.org but it simply doesn’t. Help Please…

    Thank you so much!

    William

    Avatar of crazycoolcam
    Cam
    Participant

    @crazycoolcam

    Hi @willandmae,
    Unfortunately I don’t have much, if any experience with this problem, and I don’t have any current sub-directory installs.

    From a quick search, it appears as though some of your cookies are including the path for the blog (such as the test-cookie), but not others.

    Also I noticed that the test-cookie was not set when I visited the home portion of your site. Not sure if the code is still in place in bp-custom, or if something else is blocking it.

    You could try a plugin, such as Root Cookie and see if that helps.

    Sorry I don’t have more experience with this to be able to give better info.

    ~Cam

    Avatar of mbarrio
    mbarrio
    Participant

    @mbarrio

    @Cam – thank you! Although the fix has been applied in the newest BP update our theme’s login.php file did not have the fix applied. Although I didn’t go with your cookie fix it led me to the right place.

    Cheers

Viewing 20 replies - 26 through 45 (of 45 total)

You must be logged in to reply to this topic.