Search Results for 'logout redirect'
-
AuthorSearch Results
-
February 7, 2009 at 4:47 pm #37420
In reply to: Required name and logout issues
MartinNr5
ParticipantI’m sorry but I have to disagree. I have MartinNr5 as a user name but I still want to use my full name in the rest of the site. It makes it a lot more personal in my opinion.
Have you solved the redirect problems?
February 7, 2009 at 3:39 pm #37418In reply to: Required name and logout issues
MartinNr5
ParticipantHi.
As for nr 1 I don’t follow. The WPMU user name field is for logging in to the site. The bp full name field is used everywhere else in bp whenever a user is referenced. So they shouldn’t ever “overwrite” eachother.
At least this is how it works for me.
2) Are you using the latest beta build (or trunk)? If you mix and match releases these redirect errors can and will occur. I had them myslef until I installed the latest version of the bp theme.
February 5, 2009 at 11:35 pm #37311Adam W. Warner
ParticipantI have installed and been testing this login plugin, and it’s working great so far…even allows me to configure login and logout redirects, among other things.
January 10, 2009 at 1:36 pm #36035In reply to: Log Out Redirect Error
Burt Adsit
ParticipantI have a signature running on other forums that reads: “You’re not doing anything wrong. Stop trying to do it right.”
In this case that’s appropriate. The stock behavior for mu and bp is to redirect back to the original url. But we don’t have to live with stock behavior. We got code.
The offending hunk we’re talking about is the various places that bp allows a user to logout. In all cases it has ‘redirect_to=’ site_url(). This takes the user back to where the logged out from. site_url() is what you want to change.
You need to say get_blog_option(1, ‘siteurl’) instead of that. That gets the url for the root/home blog in mu, blog id 1.
You’ll see two logout lines wherever bp allows a logout option. One is for mu 2.7 and it reads: wp_logout_url(site_url()). The other just reads ‘redirect_to=’ site_url()
The mu 2.7 version adds some security stuff to the mix and needs that wp_logout_url() call. In both cases and in all spots change ‘site_url()’ to get_blog_option(1, ‘siteurl’) and things will work as you want them to work.
I see the header in the home theme, two places in the member theme and the admin bar as spots to change.
header.php - www/wp-content/themes/buddypress-home line 48 <?php if ( function_exists('wp_logout_url') ) : ?>header.php - www/wp-content/member-themes/buddypress-member line 46 <?php if ( function_exists('wp_logout_url') ) : ?>bp-core-adminbar.php - www/wp-content/mu-plugins/bp-core line 81 if ( function_exists('wp_logout_url') ) {bp-core-templatetags.php - www/wp-content/mu-plugins/bp-core line 55 if ( function_exists( 'wp_logout_url' ) ) {Those line numbers may not be exact in all cases but it’ll be in the general vicinity.
The problem that you have to be aware of is that you are modifying stuff that will get overwritten when you update your bp installation. You’ll have to make sure that if you use SVN things get merged in properly and if you’re not using SVN then you’ll manually have to go around and put the mods back in each time.
January 10, 2009 at 7:09 am #36028In reply to: Log Out Redirect Error
elishahong
MemberHey I apologize for that, I thought something went wrong with my browser.
Well I installed BuddyPress using the Combo Zip and I got all that problem. When I reinstalled using the trunk version, everything became alright but the login issue remains a problem.
It seems that the redirect code is not redirecting to the main blog and as I mentioned earlier. I am referring to the “Header” section of the “Home Theme”
I identified the code from the header. Here’s the code:
<?php if ( function_exists(‘wp_logout_url’) ) : ?>
/ ” alt=”<?php _e( ‘Log Out’, ‘buddypress’ ) ?>”><?php _e( ‘Log Out’, ‘buddypress’ ) ?>
<?php else : ?>
/ “><?php _e( ‘Log Out’, ‘buddypress’ ) ?>
<?php endif; ?>
Is it possible for someone to help me adjust this script so as to make it log out to the login page instead of a redirect? Although I wish that it would redirect to my main blog but I’ll settle for less. Help me look at a bigger picture here, I’ve installed everything and followed every possible instruction that I can find but help me understand what’s going on with this code and I’ll learn from it.
Thank you for your patience and understanding.
January 10, 2009 at 2:10 am #36009In reply to: Log Out Redirect Error
elishahong
MemberEverything works perfectly but the Logout option. I can create blogs and all that.
I installed WordPressMU on a subdirectory.
Now I’m getting more errors for some reason maybe you might know what’s this:
Warning: ksort() expects parameter 1 to be array, null given in /blog/wp-content/mu-plugins/bp-core.php on line 1072
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /blog/wp-content/mu-plugins/bp-core.php on line 1075
# My Account
Warning: Invalid argument supplied for foreach() in /blog/wp-content/mu-plugins/bp-core/bp-core-adminbar.php on line 58
* Log Out
January 9, 2009 at 11:31 pm #36004In reply to: Log Out Redirect Error
Burt Adsit
ParticipantThe 404s when logging out indicate some kind of configuration problem. How do you have mu installed? Can you do all the normal things like create a new blog and access it? Post articles on your non-home blogs? View them again?
Is everything working ok except the logout?
January 9, 2009 at 11:05 pm #36001In reply to: Log Out Redirect Error
Burt Adsit
Participant@elishahong The logout redirects the user to the blog they are on when they logout, not the home blog. This is not a bug. It’s normal behavior.
January 9, 2009 at 8:55 pm #35992In reply to: Log Out Redirect Error
elishahong
MemberHome theme, where the root of my blog is located, in fact the admin bar(drop down list [log out]) is also affected.
I got this result for both the log out links for the home theme and the admin bar:
You don’t have permission to access /blog/wp-login.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I attempted to replace the code for the admin bar and got the same result as how mdsports had. It didn’t redirect to my home blog page.
I downloaded the latest WordPressMU and BuddyPress(I used the beta link that was given)
Here’s the admin bar code which I identified:
// **** “Log In” and “Sign Up” links (Visible when not logged in) ********
function bp_adminbar_login_menu() {
if ( !is_user_logged_in() ) {
echo ‘<li class=”bp-login no-arrow”>‘ . __( ‘Log In’, ‘buddypress’ ) . ‘‘;
// Show “Sign Up” link if registrations are allowed
if ( get_site_option( ‘registration’ ) != ‘none’ ) {
echo ‘<li class=”bp-signup no-arrow”>‘ . __( ‘Sign Up’, ‘buddypress’ ) . ‘‘;
The Home theme header logout link(the one to the right) is also similar but I have no idea how PHP really works and I spent a few hours figuring out what the problem was but I’m interested to learn how these stuff works and I hope you guys can enlighten me.
January 9, 2009 at 1:19 pm #35955In reply to: Log Out Redirect Error
Burt Adsit
Participant@elishahong Can you explain where this logout link is? Home theme, member theme, admin bar… Exactly where does it take you and what version of mu are you running?
January 9, 2009 at 9:39 am #35946In reply to: Log Out Redirect Error
yu
Participanthm.. i have and my logout header link is working good oO
January 9, 2009 at 9:21 am #35944In reply to: Log Out Redirect Error
elishahong
MemberThis header logout link bug isn’t fixed yet. I downloaded the latest trunk. Any solution to this problem?
December 17, 2008 at 8:03 pm #34541In reply to: Log Out Redirect Error
Burt Adsit
ParticipantBoth the member adminbar and the home theme logout options take you back to the originating url. Upgrade to the latest trunk or the beta download.
December 17, 2008 at 7:52 pm #34540In reply to: Log Out Redirect Error
mdsports
ParticipantHere’s the code which can be found in the BP home theme header:
<?php if ( function_exists(‘wp_logout_url’) ) : ?>
/ ” alt=”<?php _e( ‘Log Out’, ‘buddypress’ ) ?>”><?php _e( ‘Log Out’, ‘buddypress’ ) ?>
<?php else : ?>
/ “><?php _e( ‘Log Out’, ‘buddypress’ ) ?>
<?php endif; ?>
December 17, 2008 at 7:31 pm #34539In reply to: Log Out Redirect Error
mdsports
ParticipantThis solution lands me back at the standard wordpress branded logged out screen. How do I make it redirect the user to a logged out version of the bp homepage. Also, does this same solution apply for the username/logout area directly below the adming bar on the right side of the page?
-
AuthorSearch Results