User module is too old after update 11 > 12

Created on 10 November 2023, about 1 year ago
Updated 28 August 2024, 3 months ago

Problem/Motivation

After updating from 11.9 to version 12, updating the database returns the error
[error] The installed version of the /User/ module is too old to be updated day. Update to a version earlier than 10.0.0 first time (missing updates: user_post_update_update_roles).
if we still update the database, the site crashes with the following error:
Plugin (group_invitation) instance class "Drupal\ginvite\Plugin\GroupContentEnabler\GroupInvitation" does not exist.
and
The service "group.relation_handler.operation_provider.group_invitation" has a dependency on a non-existent service "group.relation_handler.operation_provider".

I redid the update after deactivating group_invit but the first error remains.

So I'm not updating it but would like your clarification.

Thanks

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Fixed

Version

12.0

Component

Code (back-end)

Created by

🇫🇷France ohmdesbois

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

Comments & Activities

  • Issue created by @ohmdesbois
  • 🇩🇪Germany onfire84

    I just tryed an upgrade vom 11.9.x to 12.0.0-rc6 and got the same error message.

  • Status changed to Closed: works as designed 12 months ago
  • 🇫🇷France ohmdesbois

    The update to version 12.0.0-rc6 went without any problems on my side. Several composer updates were necessary

  • 🇳🇱Netherlands rlelie

    Upgrading from 11.9.16 (Drupal 9.5.11) to 12.0.0-rc6 gave this error (in Dutch):

    "De geïnstalleerde versie van de module User is te oud om bij te werken. Werk deze eerst bij naar een versie voor 10.0.0 (ontbrekende updates: user_post_update_update_roles)."

    Running updates via update.php, no way to continue past this - there is no button on the web page to continue.

    Trying to access home page gives: "Er is onverwacht een fout opgetreden. Probeer het later nog eens." (Unexpected error, please try again.)

    How can I find more info on what update in the past is missing and should be run first?
    Not sure, but I don't think there is a way to uninstall the User module as it is part of the core?

  • 🇫🇷France ohmdesbois

    I tried a new installation and, after updating the modules, the database update went well.
    On an existing site updating version from 11 to 12 returned the same error indicating missing updates: user_post_update_update_roles.
    Drush ws reports: Error: Class "Drupal\variationcache\Cache\VariationCacheFactory" not found in Drupal\Component\DependencyInjection\Container->createService()

    Since this is certainly linked to one of the installed modules, i do the following :

    1. went back to version 11,
    2. updated the modules to the appropriate versions (not necessarily the most recent),
    3. deactivated modules which seemed to pose a problem during updated composer.json (in my case fontawesome_menu_icons),
    4. did an update of the database,
    5. Adjust composer.json so that it executes
    6. went back to version 12
    7. make adjustments to composer.json
    8. in my case : "composer require drupal/symfony_mailer",
    9. composer update
    10. drush updb

    the update was carried out normally.

    hope this is helpful, have a good day and don't give up.
    Thank you Opensocial!

  • Status changed to Active 12 months ago
  • 🇳🇱Netherlands rlelie

    Tried the upgrade using 12.0.0, same issue.

    Using composer version 2.6.5 and php 8.1.26.

    First try

    1. composer update --no-dev
    Some logging:
    Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update
    `.
    And:
    10/86 [===>------------------------] 11% Skipped installation of bin Resources/bin/patch-type-declarations for package symfony/error-handler: name conflicts with an existing file
    18/86 [=====>----------------------] 20% Skipped installation of bin Resources/bin/yaml-lint for package symfony/yaml: name conflicts with an existing file

    2. updatedb.php
    --> User module too old error

    Second try

    1. composer update

    Some logging:
    10/86 [===>------------------------] 11% Skipped installation of bin Resources/bin/patch-type-declarations for package symfony/error-handler: name conflicts with an existing file
    18/86 [=====>----------------------] 20% Skipped installation of bin Resources/bin/yaml-lint for package symfony/yaml: name conflicts with an existing file

    2. composer update
    some more actions executed

    3. updatedb.php
    --> User module too old error

    Third try

    1. composer update using 11 version files
    Some updates came in although website was already on 11.9.16?

    2. composer update using 11 version files
    No actions

    3. updatedb.php
    No actions.

    4. composer update using 12 version files
    Some logging:
    10/86 [===>------------------------] 11% Skipped installation of bin Resources/bin/patch-type-declarations for package symfony/error-handler: name conflicts with an existing file
    18/86 [=====>----------------------] 20% Skipped installation of bin Resources/bin/yaml-lint for package symfony/yaml: name conflicts with an existing file

    5. composer update using 12 version files
    Some more actions

    6. composer update using 12 version files
    No actions

    7. updatedb.php
    --> User module too old error

    Fourth try

    1. rm -R vendor
    2. composer update using 11 version files
    Some updates came in although website was already on 11.9.16?

    3. composer update using 11 version files
    No actions

    4. updatedb.php
    No actions

    5. rm -R vendor

    6. composer update using 12 version files
    No skips / errors / warnings

    7. composer update using 12 version files
    Some more actions

    8. composer update using 12 version files
    No actions

    9. updatedb.php
    --> User module too old error

    I can try installing drush on the 11 version to look for any errors, don't know yet how drush works though :-)

  • 🇳🇱Netherlands ronaldtebrake

    It’s because we used to patch this post update hook in core, that post update (and patch) have been removed, but core checks if that ran

    /**
     * Implements hook_removed_post_updates().
     */
    function user_removed_post_updates() {
      return [
        'user_post_update_enforce_order_of_permissions' => '9.0.0',
        'user_post_update_update_roles' => '10.0.0',
      ];
    }
    

    which it never did (we probably also never wanted it to run according to the patch that was added).

    But core is now complaining the user module is too old just because that post update hook never ran, as it keeps track of everything that ran (or not). Nothing to worry about if that's all you're getting, we'll ensure this warning is removed in a next release as it's indeed confusing.

  • Assigned to viniciusrp
  • Status changed to Needs review 11 months ago
  • Status changed to RTBC 11 months ago
  • 🇳🇱Netherlands ronaldtebrake

    will be in 12.0.1

  • Status changed to Fixed 11 months ago
  • 🇳🇱Netherlands rlelie

    Hi,

    Just tried to update from 11.9.16 to 12.0.1.
    First removed the vendor directory, then ran composer update three times. Two times updates were pulled in. Third time, no updates anymore.
    Then opened update.php and the error is still shown:

    Fouten gevonden
    Ontbrekende updates voor: User
    De geïnstalleerde versie van de module User is te oud om bij te werken. Werk deze eerst bij naar een versie voor 10.0.0 (ontbrekende updates: user_post_update_update_roles).

    The web page doesn't allow to continue, so the upgrade is stuck.

    Is there a way I can check whether the patch made it in?
    In the output there was no - Applying patches for drupal/open_social or the number 3400861, not sure whether it was supposed to pop up though.

    Any idea how/where to dig further?

    Thanks!

  • 🇳🇱Netherlands ronaldtebrake

    Could you verify social_core_update_111206 ran? - it's part of 12.0.1 https://git.drupalcode.org/project/social/-/blob/12.0.1/modules/social_f...

    That should do the trick

  • 🇳🇱Netherlands rlelie

    @ronaldtebrake: how can I check whether that ran? It isn't in the output. Thanks!

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • 🇺🇦Ukraine rollins

    I have the same problem as @rlelie
    social_core_update_111206 was not run after drush_updb on 12.4.2 version of open_social
    so the error message still exists

Production build 0.71.5 2024