Problem/Motivation

Moving from 2.4.x to 3.0, I can't run the database update.

> [notice] Update started: require_login_update_8300
> [error] You have requested a non-existent service "language.config_factory_override".
> [error] Update failed: require_login_update_8300

Steps to reproduce

Update the module to 3.0 with composer -> run drush updb (or fin drush updb in my case)

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#8 image.png109.36 KBdimaro
#5 2022-09-02_14-07-57.png9.7 KBcebronix
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Comments

    cebronix created an issue. See original summary.

    bobooon’s picture

    Status: Active » Postponed (maintainer needs more info)

    What version of Drupal core?

    cebronix’s picture

    Sorry, Just updated to Drupal core 9.4.5. - PHP on 7.4 until I get everything else updated, then attempting to move that to 8.1 (hence the updates)

    bobooon’s picture

    Are you sure? Drupal 9.4.x does have the language.config_factory_override service. Version 3.x only supports 9.x and onwards.

    https://api.drupal.org/api/drupal/core%21modules%21language%21language.s...

    cebronix’s picture

    StatusFileSize
    new9.7 KB

    screenshot

    Positive. Updated it a couple hours ago. Cleared cache. Restarted container. Etc. The usual stuff.

    Ok, I've gotten around it by uninstalling the module and reinstalling. Not ideal but it did get me past the database update.

    dimaro’s picture

    The same issue here, the database update does not apply correctly. @robphillips I don't know why, but the following line is the one does not load the service well, even though it is an existing service: https://git.drupalcode.org/project/require_login/-/blob/3.x/require_logi...
    I am using DDEV with Drupal 9.4.5 + PHP 8.0.21

    bobooon’s picture

    Assigned: Unassigned » bobooon
    Status: Postponed (maintainer needs more info) » Active

    Interesting, I'll take a look. Could you please let me know what Drupal core version ya'll are upgrading from?

    dimaro’s picture

    StatusFileSize
    new109.36 KB

    Hey @robphillips!
    The Drupal core version is still the same, I already had Drupal 9.4.5, my intention was not to update the Drupal core because I knew it was up to date. My goal was to update those contributed modules that were flagged as "Needs update". See the following screenshot:

    Update

    I debugged the "require_login_update_8300" method and I could see how in the process of updating the database, the "language.config_factory_override" service is not loaded correctly and arrives as empty. I could not spend much more time on it because the project in which we use this great module had other priorities.

    cebronix’s picture

    I was updating from 9.4.1

    • 6ddd278 committed on 3.x
      Issue #3307653 by cebronix, robphillips: Fix update hook when language...
    bobooon’s picture

    Status: Active » Fixed

    Thanks for reporting this issue and following up. Turns out the language.config_factory_override service is provided by the language module. Not directly in Drupal core. Update error occurs when the language module is not installed. Fixed by wrapping the translation config migration portion with a module exists check. Please upgrade to the latest release.

    dimaro’s picture

    @robphillips Thanks for your quick responses and work. The update now works correctly :)

     // Do you wish to run the specified pending updates?: yes.                                                             
    >  [notice] Update started: require_login_update_8300
    >  [notice] Update completed: require_login_update_8300
     [success] Finished performing updates.

    Upgrading to 3.0.1!

    Status: Fixed » Closed (fixed)

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