Problem/Motivation

When upgrading from 2.x to 3.x (my case was 2.4.0 to 3.0.2) the excluded routes config from 2.x are lost.

Steps to reproduce

excluded_routes has default values, so installing a 2.x version of the module fresh and upgrading to 3.x shows that the routes are not set anywhere in the new configuration.

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

    david.muffley created an issue. See original summary.

    sébastien-fr’s picture

    I also had the same problem (along with the other 2 bugs). I restored a backup to find the links. I believe when I exported the config, the module recreated a new config, the 2.x module config was gone.

    bobooon’s picture

    Status: Active » Closed (works as designed)

    See https://www.drupal.org/project/require_login/issues/3313243#comment-1472... for more information.

    Route name based exclusions are not part of the automated upgrade path. You'll have to manually transfer those configs.

    tijsdeboeck’s picture

    Status: Closed (works as designed) » Active

    I also just upgraded from 2.4.0 to 3.0.2, and none of the settings were migrated. After upgrading I ran drush updb, and it replied that there were no pending updates. I manually migrated my settings.

    I think that the update hook is not named correctly. Instead of require_login_update_8300, it should named require_login_update_9301
    According to the [api documentation](https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extension...) a number ending on 00 will not be recognized.

    bobooon’s picture

    Status: Active » Closed (works as designed)

    See https://www.drupal.org/project/require_login/issues/3313243#comment-1479....

    Added a notice to the project homepage as well.

    tijsdeboeck’s picture

    Hi @Robphillips, issue #3313243 might indeed solve the routes, but what I was hinting at was that all other config fails to migrate from 2 to 3. This is because the update hook simply doesn't work due to an invalid update number (an update cannot end in 00).

    I'll quickly create an MR for this.

    bobooon’s picture