Problem/Motivation

Enabling orejime_media can fail with:
You have requested a non-existent service "Drupal\orejime_media\Hook\OrejimeMediaHooks".
The root cause is that orejime_media_requirements() in orejime_media.install directly requests the module service Drupal\orejime_media\Hook\OrejimeMediaHooks. During install/enable, that service is not always available yet.

Steps to reproduce

  • Install/enable orejime_media on a Drupal site.
  • Ensure the requirements hook is executed during the enable flow.
  • Enable the module (UI or Drush).
  • The enable process fails with the non-existent service error for Drupal\orejime_media\Hook\OrejimeMediaHooks

Proposed resolution

Remove module-service resolution from orejime_media.install:

  1. Do not call a module-defined service from orejime_media_requirements().
  2. Move requirements logic to install-safe code, directly inside orejime_media_requirements()

Comments

p-neyens created an issue. See original summary.

  • 1e23880e committed on 1.x
    fix: #3623300 Fix requirements service dependency during install
    
p-neyens’s picture

Status: Active » 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.

Status: Fixed » Closed (fixed)

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