Skip Navigation

[Resolved] Getting redirected to wp-admin logging in?

This support ticket is created 3 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Author
Posts
#1939765

Page: hidden link
Being logged out:
When I click login I want to get redirected to the account page in front-end, however I am redirected to wp-admin instead.
Also asking me to update my password.

#1940539

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I'm not sure how exactly you added the login form.

Login form offers the redirect_url where you can set the login redirect:

Please check the following doc:
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-login-form

#1940555

We use WordPress default login form which Toolset redirects to.
We didn't touch this form whatsoever.
The platform keeps redirecting us to the wp-admin page even though we input the correct login credentials.
- How can you have this solved? We are no coders ourselves.
- Also, where can we make translations to the default login form. For example: username or (should become wachtwoord of), new password (should become nieuw wachtwoord), repeat new password (should become nieuw wachtwoord herhalen), reset password (should become wachtwoord herstellen)

#1940561

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can I've admin access details so I can check whats going on.

As per our support policy, we entertain only one question per ticket. This will help other users searching on the forum as well as help us to write correct problem resolution summery.

So, lets fix the issue one by one.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admi) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1940595

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I found that you are using the Advanced Access Manager plugin:
=> hidden link

That plugins offers you the feature to set the login redirect URL per role:
=> hidden link

The user mvda is administrator user, so I suggest you should try to adjust the login redirect URL for administrator role and for other roles where applicable.

#1940625

To test AAM I changed the login redirect from default wordpress to the account page (hidden link) for the administrator role.

However when I am logged out, visit hidden link, click "inloggen", login with the credentials of my role as aministrator the platform still redirect me to the wp-admin page instead of hidden link.

#1940637

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

What if you try to deactivate the Advanced Access Manager plugin for a moment then logout and try to login using the following link: hidden link

Do you see it working as expected?

#1940693

Apparently you are only making assumptions. Did what you asked, de-activated advanced access manager plugin, issue persists though.

Please run an end-to-end user journey test and get back to me as soon as you've found a solution.

#1940735

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I'm not sure whats going on with your site as I already added the login form with redirect URL but redirection url somehow hijack.

As this is your production site and you asked me to not change anything to run a test I've added the following code to your current theme's functions.php file:

function func_my_login_redirect( $url, $request, $user ) {
    if ( $user && is_object( $user ) && is_a( $user, 'WP_User' ) ) {
        if ( $user->has_cap( 'administrator' ) ) {
            $url = home_url( '/account-pagina/' );
        } else {
            $url = home_url( '/account-pagina/' );
        }
    }
    return $url;
}
 
add_filter( 'login_redirect', 'func_my_login_redirect', 10, 3 );

You can see the different login redirection UR: for administrator and other users as you can see with the above code. For now, I've set the page /account-pagina/ as redirection page for both administrator users and other users.

I checked that and its working as expected and when I loggedin it redirect me to /account-pagina/ page.

#1940749

It is working as expected for an administrator. Did you set the page /account-pagina/ as redirection page for all other user roles as well?

#1940755

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - the page /account-pagina/ is set as redirection page for all users.

#1940785

My issue is resolved now. Thank you!

#1942331

The issue is not solved. We just created a new user (different role from administrator) and again we are not redirected to the account page!