Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'logout redirect'

Viewing 25 results - 1 through 25 (of 113 total)
  • Author
    Search Results
  • #332526
    Mathieu Viet
    Moderator

    So 😅. Thanks for sharing the error log. To me, deprecation notices cannot be the source of your troubles. For bbPress you need BP Classic as it’s not ready for BP 12.0.0. I submitted a patch to their Trac env. but it has not been committed yet.

    Even if BP Classic is active, your links are logging you out?

    There’s only 2 way to get this behavior, the links are containing the logout URL, or some code is redirecting the page after logging you out.

    Next step would be to rollback to 11.4 to see if the bug has disappeared. But if it’s the case I’d be surprised.

    vera1993
    Participant

    Hello everyone!
    I have a problem with my BuddyPress SetUp and hope someone here can help me.

    I set up a members area on a website months ago using BuddyPress. Everything worked fine.

    However, since a few days it is no longer possible to log in and access the content. The login status is basically not recognized, even if I am logged in I see all content as if I were a logged out user.

    Examples:
    Previously, after logging in, you were redirected to your own BuddyPress profile. Now I get redirected to the WP user interface.

    Even if I call groups directly, the group page is displayed to me as if I were not logged in and asks me to join the group to see the content (while I am actually logged in to WP as admin).

    Also the login / logout button does not work anymore.
    I can log in on a login page. Previously the menu then showed Logout as an option instead of Login. Now when I log in the status in the menu always stays on “Login”. Basically it is not possible to view the site as a logged in user.

    So far there have been no problems with this. All plugins are up to date.
    Nothing was changed in the website settings between the normal state and the occurrence of the problem.

    Has anyone had similar experiences before?
    I’m at a loss…

    I would be very grateful for support, ideas and help!
    Maybe you have somd ideas regarding the user login status?

    Kind regards Vera

    Translated with http://www.DeepL.com/Translator (free version)

    ochiajoe
    Participant

    Hello,

    Have integrated BuddyPress with WordPress and I want my subscribers to be able to access the Settings sections and be able to change their passwords and email addresses.
    When they try changing their passwords..They get logout the error message “You must log in to access the page you requested”
    I also tried and deactivated all the plugins and changed the theme but am still getting the same issue.

    See my link below

    https://hplportal.com/wp-login.php?redirect_to=https%3A%2F%2Fhplportal.com%2Fmembers%2Fjules%2Fsettings%2Fgeneral%2F&bp-auth=1&action=bpnoaccess

    #319798
    awto
    Participant

    Hi can you let me know how to get rid of the RSS feed icon, and the search on the site.
    Also I have a problem with login, it redirect to wp-admin I want to it to go to buddyPress login.
    Also there is no logout

    #315592

    In reply to: Issue Redirection

    iamthewebb
    Participant

    Register will redirect you to the homepage if you are already logged in, try another browser or private window to see the page if you don’t wish to logout.

    When I try to visit /miembros/ the page loads correctly, when are you expecting it to redirect to the members page?

    #311099
    Varun Dubey
    Participant

    @pledgerar try BuddyPress Redirect, it’s a free addon which offers role base login/logout redirect to specific BuddyPress Component or any other page.

    #310817

    In reply to: /Members’ slug

    globsticks
    Participant

    ` <li id=”menu-item-1788″ class=”bp-menu bp-logout-nav menu-item menu-item-type-custom menu-item-object-custom menu-item-1788″><a
    href=”https://www.example.com/secretslug/?action=logout&redirect_to=https%3A%2F%2Fwww.example.com%2F&_wpnonce=c3b1dbd03b&#8221; > Log Out</a ></li >

    wpissue
    Participant

    Hi, I have noticed when an user log out on certain buddypress pages such: messages, profile edit page, setting, it shows an ERR_TOO_MANY_REDIRECTS page and the url shows /&/ (in html code) at the end.

    It seems it can not redirect back to a public buddypress page or homepage.
    Is this a current issue or only specific to my site/installed plugins?

    #305975
    Venutius
    Moderator

    You could add the following to your functions.php:

    add_action( 'bp_setup_nav', 'bpex_logout_tab', 50 );
    
    function bpex_logout_tab() {
    	
    	if ( ! bp_is_user_profile() && ! bp_is_user_activity() && ! bp_is_user() ) {
    		return;
    	}
    	
    	bp_core_new_nav_item( array(
    				'name'                => __( 'Log Out', 'buddypress' ),
    				'slug'                => 'logout',
    				'position'            => 99,
    				'screen_function'     => 'bpex_wp_logout',
    				'default_subnav_slug' => 'public',
    				'item_css_id'         => 'logout-tab'
    	) );
    	
    }
    
    function bpex_wp_logout() {
    	wp_logout();
    	wp_redirect( home_url() );
    }
    #274410
    Paul
    Participant

    @throuk6 I don’t have the registered user problem you describe and the plugin works well for me. I’m not that familiar with it and have only used it on one site.
    I use the login with Ajax widget with a redirect both on login and logout.
    Perhaps try editing and then re saving your users. I’m not sure.

    #269352
    peter-hamilton
    Participant

    lol, did not mean to break your head.

    Do you have a child-theme?

    If you add the following code to your functions.php your members should return to the page they logged-in from.

    if ( (isset($_GET['action']) && $_GET['action'] != 'logout') || (isset($_POST['login_location']) && !empty($_POST['login_location'])) ) {
            add_filter('login_redirect', 'my_login_redirect', 10, 3);
            function my_login_redirect() {
                    $location = $_SERVER['HTTP_REFERER'];
                    wp_safe_redirect($location);
                    exit();
            }
    }
    xavi3r12
    Participant

    I have tried that it still returned the same error, however i have just noticed that if i delete my bp-custom.php everything works fine but my pages does not redirect users to there profile “if logged in” which was the purpose of the bp-custom.php file. This in the code in my bp-custom.php file

    <?php
    // hacks and mods will go here
    /* Redirects to profile upon login */
    add_action('login_form', 'redirect_after_login'); 
    function redirect_after_login() 
    {     
    global $redirect_to; 
    if   (!isset($_GET['redirect_to'])) 
    { 
    $redirect_to =   get_option('activity');
    //  sample-page = your page name after site_url
    } }
    
    function bp_help_redirect_to_profile(){
    global $bp;
    
    if( is_user_logged_in() && bp_is_front_page() )
    bp_core_redirect( get_option('home') . '/members/' . bp_core_get_username( bp_loggedin_user_id() ) . '/activity' );
    
    }
    
    add_action( 'get_header', 'bp_help_redirect_to_profile',1);
    
    add_action('wp_logout','go_home');
    function go_home(){
      wp_redirect( home_url() );
      exit();
    }
    
    add_action( 'bp_complete_signup', 'buddydev_redirect_after_signup' );
     
    function buddydev_redirect_after_signup() {
        
        $page = wp_redirect( get_option('siteurl') . '/profile' );
        
        
        bp_core_redirect( site_url( $page ) );
    }
    
    ?>

    So how do i fix this?? I need help Please

    #264231
    griffmix
    Participant

    Hi thanks.

    I have turned on WP Debuging and received the following error messages including 1 fatal error. Any idea what this means?

    Strict Standards: Redefining already defined constructor for class LogoutRedirect in /wp-content/plugins/login-and-logout-redirect/login-and-logout-redirect.php on line 65

    Strict Standards: Redefining already defined constructor for class Login_Redirect in /wp-content/plugins/login-and-logout-redirect/login-and-logout-redirect.php on line 287

    Notice: get_cart was called incorrectly. Get cart should not be called before the wp_loaded action. Please see Debugging in WordPress for more information. (This message was added in version 2.3.) in /wp-includes/functions.php on line 4136

    Fatal error: Call to a member function get_option() on null in /wp-content/plugins/fancy-product-designer/inc/fpd-functions.php on line 33

    #262129
    alexanderdean
    Participant

    Greetings,

    The BuddyPress “Log Out” link is not working for me. I’m running BuddyPress 2.7.2 I didn’t upgrade to .3 yet because I didn’t see that this issue was addressed in the release notes. Anyway, I’ve tried TwentyFifteen and disabling all plugins. I’ve tried a different hosting account and the situation is the same: If I add the BuddyPress “Log Out” option to any of my menus, it supplies an encoded url… not the base part of the url, just the query string part as seen here:

    http://example.com/phase2/wp-login.php?action=logout&redirect_to=http%3A%2F%2Fexample.com%2Fwordpress%2Flibrary%2F&_wpnonce=0ab7353131

    All other instances of the logout link (like the one in wp admin or if I use <?php wp_logout(); ?> to generate one) all work fine.

    Could you point me to the BuddyPress code that generating the menu point? Or otherwise point me in the right direction?

    Thanks,
    Alec

    #259138
    Brajesh Singh
    Participant

    Hi,
    Looking at the screenshot, it seems you are logged in. Please logout and try viewing register page again. It will take you to register instead of redirecting to the home page.

    Hope that helps.

    #258810
    danbp
    Participant

    Hi,

    the warnings cames probably because the logout function is called twice.
    Check your theme’s functions.php or see for a specific setting.

    Can you test the standard behave with a Twenty theme and BP, and all other plugins deactivated.
    Remove also the custom code while testing.

    If still an issue, consider this plugin. All is in the title, but it redirects to homepage on logout.

    #258802
    Venutius
    Moderator

    This one should be the answer:

    https://buddypress.org/support/topic/error-404-page-not-found-3/

    However it did not work for me, I’ve raised a thread about it here:

    https://buddypress.org/support/topic/redirect-on-logout/

    It may work for you, since it worked for the other chap

    #258799
    Venutius
    Moderator
    #258798
    Venutius
    Moderator

    Yep I’d like to know what to do about that too, it should redirect to the home page on logout as standard really.

    #258630
    danbp
    Participant

    Hi,

    the logout link is redirected to the same page. If you’re on your profile notifications screen, which is only intended for you, it is normal that when you logout from there, you’re redirected to a page not found message. Notifications is even private and not public.

    The solution is to redirect to an always public part of the site on logout.

    Add this snippet to child-theme’s functions.php

    //* Redirect WordPress Logout to Home Page
    add_action( 'wp_logout', create_function( '', 'wp_redirect( home_url() ); exit();' ) );

    Advice 1: use preferably the login widget, so the user stays on the same page where he attempt to login instead to be redirected to that boring wp-login page.

    Advice 2: on the Home (which is the member directory), you have all BP pages listed at the bottom. Remove them ! You certainly don’t need to give access to account activation or register page to your visitors…

    #254899
    sharmavishal
    Participant

    @navyspitfire just tested right now and am able to redirect logins to groups section and logout to main site

    #244675
    adrift_
    Participant

    Okay thanks, the plugin redirects after login or logout. My problem still is, that the logo and root URL link to the members page. Is there a solution for that (PHP would be okay)?

    #242729
    Jld142
    Participant

    This is my current code:

    <?php
    
    /* Link parent CSS file */
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
    function enqueue_parent_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }
    
    /* Count number of user notifications */
    function cg_current_user_notification_count() {
        $notifications = bp_core_get_notifications_for_user(bp_loggedin_user_id(), 'object');
        $count = !empty($notifications) ? count($notifications) : 0;
     
        echo $count;
    }
    
    /* Remove register BuddyPress Widget creator */
    function remove_bp_core_register_widgets() {
        remove_action(bp_core_register_widgets());
    }
    add_action('init','remove_bp_core_register_widgets()');
    
    function new_bp_core_register_widgets() {
    	add_action('widgets_init', create_function('', 'return register_widget("new_BP_Core_Login_Widget");') );
    }
    add_action( 'bp_register_widgets', 'bp_core_register_widgets' );
    
    /* New BuddyPress Login Widget */
    class new_BP_Core_Login_Widget extends WP_Widget {
    
    	/**
    	 * Constructor method.
    	 */
    	public function __construct() {
    		parent::__construct(
    			false,
    			_x( '(BuddyPress) Log In', 'Title of the login widget', 'buddypress' ),
    			array(
    				'description' => __( 'Show a Log In form to logged-out visitors, and a Log Out link to those who are logged in.', 'buddypress' ),
    				'classname' => 'widget_bp_core_login_widget buddypress widget',
    			)
    		);
    	}
    
    	/**
    	 * Display the login widget.
    	 *
    	 * @see WP_Widget::widget() for description of parameters.
    	 *
    	 * @param array $args Widget arguments.
    	 * @param array $instance Widget settings, as saved by the user.
    	 */
    	public function widget( $args, $instance ) {
    		$title = isset( $instance['title'] ) ? $instance['title'] : '';
    
    		/**
    		 * Filters the title of the Login widget.
    		 *
    		 * @since BuddyPress (1.9.0)
    		 * @since BuddyPress (2.3.0) Added 'instance' and 'id_base' to arguments passed to filter.
    		 *
    		 * @param string $title    The widget title.
    		 * @param array  $instance The settings for the particular instance of the widget.
    		 * @param string $id_base  Root ID for all widgets of this type.
    		 */
    		$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    
    		echo $args['before_widget'];
    
    		echo $args['before_title'] . esc_html( $title ) . $args['after_title']; ?>
    
    		<?php if ( is_user_logged_in() ) : ?>
    
    			<?php
    
     		 	/**
    		 	 * Fires before the display of widget content if logged in.
    		 	 *
    		 	 * @since BuddyPress (1.9.0)
    		 	 */
    			do_action( 'bp_before_login_widget_loggedin' ); ?>
    
    			<div class="bp-login-widget-user-avatar">
    				<a href="<?php echo bp_loggedin_user_domain(); ?>">
    					<?php bp_loggedin_user_avatar( 'type=thumb&width=50&height=50' ); ?>
    				</a>
    			</div>
    
    			<div class="bp-login-widget-user-links">
    				<div class="bp-login-widget-user-link"><?php echo bp_core_get_userlink( bp_loggedin_user_id() ); ?></div>
    				<p>TEST</p>
    				<div class="bp-login-widget-user-logout"><a class="logout" href="<?php echo wp_logout_url( bp_get_requested_url() ); ?>"><?php _e( 'Log Out', 'buddypress' ); ?></a></div>
    			</div>
    
    			<?php
    
    			/**
    		 	 * Fires after the display of widget content if logged in.
    		 	 *
    		 	 * @since BuddyPress (1.9.0)
    		 	 */
    			do_action( 'bp_after_login_widget_loggedin' ); ?>
    
    		<?php else : ?>
    
    			<?php
    
    			/**
    		 	 * Fires before the display of widget content if logged out.
    		 	 *
    		 	 * @since BuddyPress (1.9.0)
    		 	 */
    			do_action( 'bp_before_login_widget_loggedout' ); ?>
    
    			<form name="bp-login-form" id="bp-login-widget-form" class="standard-form" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
    				<label for="bp-login-widget-user-login"><?php _e( 'Username', 'buddypress' ); ?></label>
    				<input type="text" name="log" id="bp-login-widget-user-login" class="input" value="" />
    
    				<label for="bp-login-widget-user-pass"><?php _e( 'Password', 'buddypress' ); ?></label>
    				<input type="password" name="pwd" id="bp-login-widget-user-pass" class="input" value="" <?php bp_form_field_attributes( 'password' ) ?> />
    
    				<div class="forgetmenot"><label><input name="rememberme" type="checkbox" id="bp-login-widget-rememberme" value="forever" /> <?php _e( 'Remember Me', 'buddypress' ); ?></label></div>
    
    				<input type="submit" name="wp-submit" id="bp-login-widget-submit" value="<?php esc_attr_e( 'Log In', 'buddypress' ); ?>" />
    
    				<?php if ( bp_get_signup_allowed() ) : ?>
    
    					<span class="bp-login-widget-register-link"><?php printf( __( '<a href="%s" title="Register for a new account">Register</a>', 'buddypress' ), bp_get_signup_page() ); ?></span>
    
    				<?php endif; ?>
    
    			</form>
    
    			<?php
    
    			/**
    		 	 * Fires after the display of widget content if logged out.
    		 	 *
    		 	 * @since BuddyPress (1.9.0)
    		 	 */
    			do_action( 'bp_after_login_widget_loggedout' ); ?>
    
    		<?php endif;
    
    		echo $args['after_widget'];
    	}
    
    	/**
    	 * Update the login widget options.
    	 *
    	 * @param array $new_instance The new instance options.
    	 * @param array $old_instance The old instance options.
    	 * @return array $instance The parsed options to be saved.
    	 */
    	public function update( $new_instance, $old_instance ) {
    		$instance             = $old_instance;
    		$instance['title']    = isset( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
    
    		return $instance;
    	}
    
    	/**
    	 * Output the login widget options form.
    	 *
    	 * @param $instance Settings for this widget.
    	 */
    	public function form( $instance = array() ) {
    
    		$settings = wp_parse_args( $instance, array(
    			'title' => '',
    		) ); ?>
    
    		<p>
    			<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'buddypress' ); ?>
    			<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" /></label>
    		</p>
    
    		<?php
    	}
    }
    
    ?>

    I was trying to following the below guide to remove the function that initializes the login widget and then redirect it to my own new one:

    http://venutip.com/content/right-way-override-theme-functions

    Obviously hasn’t worked. Any ideas ?

    #242050
    valuser
    Participant

    Perhaps have a look at http://buddydev.com/plugins/bpdev-logout-redirect/

    it MAY be of some help !

Viewing 25 results - 1 through 25 (of 113 total)
Skip to toolbar