Problem/Motivation

  1. I had imagemagick module (1.0-alpha6) and Drupal core 8.3.4
  2. Using Composer, I updated to imagemagick module (2.0) and Drupal core 8.3.5
  3. I ran the updates and did a cache rebuild
  4. For image fields I cannot upload images due to this error: Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "file_metadata_manager". in Drupal\Component\DependencyInjection\Container->get() (line 157 of /.../core/lib/Drupal/Component/DependencyInjection/Container.php).
  5. I had to enable file_mdm module to make it work

Comments

mfernea created an issue. See original summary.

mondrake’s picture

Thank you for your report. I assume you were using Composer to update the code base, correct?

In the scenario you describe, it looks like we are missing an update function to enable the file_mdm module if it's not enabled already.

The workaround - enabling the file_mdm module manually - should be ok, in the meantime.

mfernea’s picture

Issue summary: View changes

Indeed, I used Composer. The file_mdm module was downloaded, but it was not enabled. If an update hook is the right solution I will write a patch.

mfernea’s picture

Status: Active » Needs review
StatusFileSize
new386 bytes

This is the patch.

mondrake’s picture

Status: Needs review » Reviewed & tested by the community

Thanks a lot @mfernea.

Tested the patch following the scenario in the IS - run composer require drupal/imagemagick:2.x-dev on top of a codebase with 1.0-alpha6 installed, applied the patch and run Drupal updates -> file_mdm module is enabled.

Also tested the patch running Drupal update on a separate scenario where imagemagick 2.0 and file_mdm are already installed -> update runs fine even if the file_mdm module is already enabled.

I'll commit this and create a new release in the next few days if no more reviews.

  • mondrake committed 07026e6 on 8.x-2.x authored by mfernea
    Issue #2895864 by mfernea: You have requested a non-existent service "...
mondrake’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x-2.x, thanks

Status: Fixed » Closed (fixed)

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