Login broken after updating to Drupal 10.1

Created on 27 June 2023, about 1 year ago
Updated 16 November 2023, 10 months ago

Problem/Motivation

After updating a website from Drupal 10.0 to Drupal 10.1, I can no longer log in as an admin or user.

Steps to reproduce

1. composer create drupal/recommended-project:10.0
2. composer require drush/drush
3. drush site:install --account-name=admin --account-pass=admin -y
4. Confirm login using above password
5. Create user account
6. Log out and confirm login as user.

7. composer update
8. Attempt to login as admin: "Unrecognized username or password."
9. Attempt to login as user: "Unrecognized username or password."

Is there an update step I missed?

If I reset the composer.lock file to before step 7, and run composer install, I am able to log in as admin and user.

πŸ’¬ Support request
Status

Closed: works as designed

Version

10.1 ✨

Component
User systemΒ  β†’

Last updated about 16 hours ago

Created by

πŸ‡―πŸ‡΅Japan tyler36 Osaka

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

Comments & Activities

  • Issue created by @tyler36
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    You need to run updates via update.php or drush updb

    The release notes list this https://www.drupal.org/node/3322420 β†’ which is likely your issue, the update hook would enable the module for you

  • Status changed to Closed: works as designed about 1 year ago
  • πŸ‡―πŸ‡΅Japan tyler36 Osaka

    Thank you. That resolves the issue.

    7. composer update
    8. drush updb

    Incorrectly, I have not been running the update script when updating via composer. Until now, I have not hit upon an issue.

    Thank you for the response, solution and link for further information.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Ok, I'm very surprised you've not hit an issue before.

    If you're using git to track your config, you should also run a config export after running updates.

  • Status changed to Active about 1 year ago
  • πŸ‡ΊπŸ‡¦Ukraine goodboy Kharkiv, Ukraine

    I have the same problem.
    Drupal was updated from 10.0.9 (existing site)
    I tried:

    composer update "drupal/core-*" --with-all-dependencies
    composer update
    drush deploy

    Update script completed successfully

    I deleted composer.lock and vendor directory and then ran again.
    I tried log in by browser and my React app.
    I reverted to 10.0.9 and now all ok.
    How to update Drupal to 10.1 to be able to login?

  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    Did you not run drush updatedb?

  • Status changed to Closed: works as designed about 1 year ago
  • πŸ‡ΊπŸ‡¦Ukraine goodboy Kharkiv, Ukraine

    @cilefen, my problem was I run
    drush deploy
    drush deploy = drush updb, cim, cr, deploy.
    And I re-writing my configuration by drush cim command.

    I need to do drush updb and then drush cex for fixing the configuration changes
    So, the full update way should be:
    1. drush cim
    2. drush updb
    3. drush cr
    4. drush cex

    I believe that someday there will be a core update with a single drush core-update command (not to mention a single button press) instead of update programming

  • πŸ‡§πŸ‡¬Bulgaria pfrenssen Sofia

    @goodboy the `drush deploy` command is intended to be run to deploy a website to an environment. It is not intended for performing a site update. You missed the step to export the configuration, as you found out. `drush deploy` _imports_ configuration instead of exporting it.

    There is good documentation about the upgrade procedure at Updating Drupal β†’ .

    If you want a single command to execute the update reliably without having to check the documentation or remember the necessary steps, a good solution is to write a shell script.

  • πŸ‡©πŸ‡ͺGermany DiDebru

    Please also be aware of this:
    https://www.drupal.org/node/3322420 β†’

  • πŸ‡ΊπŸ‡¦Ukraine goodboy Kharkiv, Ukraine

    @pfrenssen, I found the solution, thanks. I just wanted to say that updating Drupal is getting more and more difficult every time. This is not just a formal procedure; you need to carefully read the instructions and program the update. Maybe someone likes it, it’s hard to say.

    The update instructions are too long and filled with unnecessary details. Why not create an update script instead. But these are empty words, of course,

  • πŸ‡§πŸ‡¬Bulgaria pfrenssen Sofia

    I'm sorry to hear that it is complicated, but there are very good reasons for every step in the deployment procedure. It gives developers the tools needed to deploy any necessary change to production in an automated fashion, as well as allowing non-technical users to perform updates through the UI, or manually using the command line.

  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    Thanks for explaining the details @pfrenssen, I very much appreciate it.

    I just updated How to upgrade from Drupal 9 to Drupal 10 β†’ , which outlines a Drupal 9 to Drupal 10 upgrade, with a last item about configuration, linking to Updating Drupal core via Composer β†’ for more info about exporting configuration and updating the production environment.

    Does it look all right to you, or are some parts not clear enough, and need more work?

  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    I created an issue, since I think we need a dedicated documentation page for this final and crucial deployment step, with the actual commands for a basic workflow.

Production build 0.71.5 2024