Problem/Motivation

When upgrading to 5.0.0 from 4.1.0-rc1 OR 4.0.2 drush reports the following issue:

$ composer require 'drupal/sophron:^3.0' 'drupal/imagemagick:^5.0'
./composer.json has been updated
Running composer update drupal/sophron drupal/imagemagick
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 2 updates, 0 removals
  - Upgrading drupal/imagemagick (4.0.2 => 5.0.0)
  - Upgrading drupal/sophron (2.2.1 => 3.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 2 updates, 0 removals
  - Downloading drupal/sophron (3.0.0)
  - Downloading drupal/imagemagick (5.0.0)
  - Upgrading drupal/sophron (2.2.1 => 3.0.0): Extracting archive
  - Upgrading drupal/imagemagick (4.0.2 => 5.0.0): Extracting archive
Generating autoload files
Hardening vendor directory with .htaccess and web.config files.
97 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
phpstan/extension-installer: Extensions installed
Cleaning installed packages.
No security vulnerability advisories found

$ drush updatedb
 [warning] Drupal erfordert Datenbanken, die JSON-Speicherung unterstützen.
 (Currently using Datenbankunterstützung für JSON Verfügbar
)
 [warning] Die installierte Version des Moduls /ImageMagick/ ist zu alt, um sie zu  
aktualisieren. Aktualisieren Sie zuerst auf eine Zwischenversion (letzte  
entfernte Version: 8307, installierte Version: 8306).


 ┌ Requirements check reports errors. Do you wish to continue? ─┐
 │ Yes                                                          │
 └──────────────────────────────────────────────────────────────┘

english translation of the error message:

 [warning] The installed version of the /ImageMagick/ module is too old to update.  
First update to an intermediate version (last removed version: 8307, installed version: 8306).

Afterwards i downgraded to 4.1.0-RC and back to 5.0.0 and observed the same behaviour.

Is it my fault or an issue with the 5.0.0 release?

Steps to reproduce

See code above.

Proposed resolution

Make the db migration automatically work or document a way to get around the error.

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

eadi created an issue. See original summary.

eadi’s picture

Issue summary: View changes
mondrake’s picture

Sorry - it looks like with the version leap to 5.0.x I too aggressively removed update functions. Thanks for notifying.

mondrake’s picture

Status: Active » Needs review
mondrake’s picture

Can anybody test and see if this works. After RTBC, I'll commit and release 5.0.1.

eadi’s picture

Looks fine. I applied the patch and it seems to work now:

$ drush updatedb
Running after update script...
 [warning] Drupal erfordert Datenbanken, die JSON-Speicherung unterstützen.
 (Currently using Datenbankunterstützung für JSON Verfügbar
)
 [warning] Die installierte Version des Moduls /ImageMagick/ ist zu alt, um sie zu  
aktualisieren. Aktualisieren Sie zuerst auf eine Zwischenversion (letzte  
entfernte Version: 8307, installierte Version: 8306).


 ┌ Requirements check reports errors. Do you wish to continue? ─┐
 │ Yes                                                          │
 └──────────────────────────────────────────────────────────────┘

 ------------- ----------- --------------- -------------------------------- 
  Module        Update ID   Type            Description                     
 ------------- ----------- --------------- -------------------------------- 
  imagemagick   8307        hook_update_n   8307 - Force caches rebuild to  
                                            reflect changes to service      
                                            parameters.                     
 ------------- ----------- --------------- -------------------------------- 


 ┌ Do you wish to run the specified pending updates? ───────────┐
 │ Yes                                                          │
 └──────────────────────────────────────────────────────────────┘

>  [notice] Update started: imagemagick_update_8307
>  [notice] Update completed: imagemagick_update_8307
 [success] Finished performing updates.
ruslan piskarov’s picture

Resolved by

drush ev "\Drupal::keyValue('system.schema')->set('imagemagick', 8307);"

  • mondrake committed 4f34e962 on 5.0.x
    fix: #3569588 Upgrade path to 5.0.0 impossible
    
    By: eadi
    By: mondrake
    By...
mondrake’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

mondrake’s picture

Release 5.0.1 is out.

Status: Fixed » Closed (fixed)

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