• Resolved codejp3

    (@codejp3)


    Not sure if your plugin is the cause, but wanted to reach out to you first since disabling this plugin allows me to login when in maintenance mode.

    I use the bbPress login features as the main site login. It’s a shortcode embedded in the page title “login”, permalink – https://mysite.com/login/

    I have your plugin setup to redirect logins to “login”. It’s working, except when in maintenance mode.

    I use the “minimal coming soon” plugin for maintenance mode. It has an option for “Custom login URL” to whitelist a specific login URL in case the default wp-login.php is disabled/altered like your plugin does. I’ve tried specifying “login”, “/login”, “login/”, “/login/”, “https://mysite.com/login” & “https://mysite.com/login/” in that field and the result is the same for all – I get locked out of my site anytime I’m in maintenance mode.

    When I try to access the login page, it takes about 20-30 seconds to respond, and redirects to this URL:

    https://mysite.com/login/?login=nothing_entered

    And displays the message:
    “The page isn’t redirecting properly”

    Again, I’m not 100% sure that it’s your plugin causing the lock-out issue, bu with your plugin disabled, both the default wp-login.php page work and the custom bbPress “login” page work when in maintenance mode, which indicates an issue with this plugin, not either one of them.

    With your plugin enabled, I get stuck in the redirection loop and the login page becomes inaccessible, locking me out of the site completely.

    Can you direct me in the best way to narrow down the culprit and resolve this issue?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support MaximeWPS

    (@seinomedia)

    Hello,

    Thanks for using WPS Hide Login.

    I don’t understand your question because WPS Hide Login doesn’t let ? in secret slugs. They’re removed when settings are saved.

    Thread Starter codejp3

    (@codejp3)

    I don’t understand your question because WPS Hide Login doesn’t let ? in secret slugs. They’re removed when settings are saved.

    That’s probably the conflict.

    The bbpress login function, (specifically the bbpress stylepack plugin) is what is kicking back the “?login=nothing_entered” error when your plugin is enabled.

    The bbpress code related to this login issue is:

    function bsp_login_failed( $username, $error ) {
    	$errors = reset($error);
    	$failed = '' ; //just in case nothing is passed !
    	if (!empty($errors['invalid_username'])) $failed = 'invalid_username' ; 
    	if (!empty($errors['incorrect_password'])) $failed = 'incorrect_password' ; 
    	if (!empty($errors['empty_username'])) $failed = 'empty_username' ; 
    	if (!empty($errors['empty_password'])) $failed = 'empty_password' ; 
    	if (!empty($errors['empty_password']) && !empty($errors['empty_username'] )) $failed = 'nothing_entered' ; 
    	$referrer = bsp_current_page_url();  // where did the post submission come from?
       // if there's a valid referrer, and it's not the default log-in screen
       if ( !empty($referrer) && !strstr($referrer,'wp-login') && !strstr($referrer,'wp-admin') ) {
    	   //then strip any old referrer requests
    	   if (strpos( $referrer, '?') !== false) {
    		  $referrer = substr ($referrer, 0 , strpos ($referrer , '?')) ;
    		}
    		add_query_arg( 'login', $failed );
    		wp_redirect( $referrer . '?login='.$failed );  // let's append some information (login=failed) to the URL for this plugin to use
    		//wp_redirect( $referrer) ;
           exit;
       }
    }

    Is there something you can adjust within this plugin to account for the hard-references to ($referrer,’wp-login’) & ($referrer,’wp-admin’), or do you have suggested revisions that should be applied to the bbpress login to allow it to work with your plugin?

    Plugin Support MaximeWPS

    (@seinomedia)

    Hello,

    The bbpress plugin is made to create a public login page.

    WPS Hide Login creates a secret slug instead of wp-login.php and redirects non-loggedin users to 404.

    There’s nothing to adjust because the WPS Hide Login slug doesn’t had to be public.

    Thread Starter codejp3

    (@codejp3)

    Appreciate the reply, but I think you’re giving up too easy.

    Why can’t I add a check in the bbPress login for “if wps-hide-login active”, and then get the secret slug option value and use that instead of the default wp-login.php?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Maintenance Mode Redirection Issue’ is closed to new replies.