User reset not working, when user account has disabled language as its site language

Created on 11 March 2022, almost 3 years ago

Problem/Motivation

The user reset password route may not work depending on user-account language settings.
This happens when the user-account has a disabled language as it's site-language.

When it goes wrong:
/en/user/reset/.... and en is a disabled language.

This could also be a configuration issue, but I drop it here because it caught me surprise.

Steps to reproduce

1. Create an account and set a disabled language as 'site language' ("This account's preferred language for emails. This is also assumed to be the primary language of this account's profile information." on the user-form)
2. Request a reset-password link
3. Notice the reset-password link is prefix with the disabled language
4. Notice the module redirects to the frontpage and is not skipping the route

Additional notes:
1. Happens with the default module's config where `Override routes` have

user.reset.login
entity.user.edit_form

as config.
2. Also happens if the modules `Exclude by path` has

user.reset.login
entity.user.edit_form

3. Our site's language configuration (/admin/config/regional/language) has the first language disabled and the second language enabled.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇳🇱Netherlands ndf Amsterdam

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇧🇪Belgium thierry.beeckmans

    If you inspect the url, you'll probably have a reset link without /login at the end.
    Adding the user.reset route to the override routes probably solves your issue.

    user.reset.login:
      path: '/user/reset/{uid}/{timestamp}/{hash}/login'
    
    user.reset:
      path: '/user/reset/{uid}/{timestamp}/{hash}'
Production build 0.71.5 2024