Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author wordplus

    (@wordplus)

    Hi there!

    I will improve this in the future versions, but now it havent fix.

    Thanks

    Hi,

    Someone posted about this problem on the BuddyPress forums:
    https://buddypress.org/support/topic/404-error-when-user-clicks-on-email-message-link-not-logged-in/

    I’ve added a fix there but it relies on registering a subnav menu item. If you don’t want to register a subnav, you could also probably create your own redirector routine as well.

    Thread Starter MS

    (@corgdesign)

    I got round the issue by filtering the url that was used in the notification emails sent from BP Better Messages, changing it to use ‘me’ in place of the username:

    function bp_thread_url( $args, $ud, $sender, $thread_id ){
    
    	$new_thread_link =  site_url() . '/members/me/bp-messages/?thread_id=' . $thread_id;
    
    	$args['thread.url'] = $new_thread_link;
    
    	return $args;
    
    }
    add_filter('bp_better_messages_notification_tokens', 'bp_thread_url', 10, 4);

    The /members/me/… url is a standard BuddyPress one, and it doesn’t return a 404 if the user isn’t logged in, but redirects to the login page.

    Plugin Author wordplus

    (@wordplus)

    Hi there, @corgdesign, @r-a-y!

    I see, thats a cool ways to fix this.
    I will include the solution in the next version.

    Thanks for sharing!

    @corgdesign, that’s also a neat way to fix this.

    Better than my solution! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘404 if user isn’t logged in’ is closed to new replies.