Removed .module file persists in caches and triggers warnings if APC is enabled

Created on 18 December 2024, 3 days ago

Problem/Motivation

I found that when I removed the obsolete .module file from a contrib module, no matter how many times I cleared caches in the site UI, I saw warnings:

Warning: include_once([...].module): Failed to open stream: No such file or directory in include_once() (line 153 of core/lib/Drupal/Core/Extension/Extension.php)
Warning: include_once(): Failed opening '[...].module' for inclusion

Looking at the database, references to the removed .module file persisted in both the cached container and the core.extension.list.module cache (in cache_default).

However, if I disabled APC extension and cleared caches, or cleared caches in Drush (which also doesn't have APC), the caches were successfully rebuilt with no mention of the missing .module file, and the warnings disappeared.

Steps to reproduce

Ensure APC extension is enabled. Remove the unneeded .module file from an installed module and clear caches via the site UI. You will see include_once-related warnings both in the site and when running Drush commands, until you clear cache via Drush.

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

cache system

Created by

πŸ‡ΊπŸ‡ΈUnited States mfb San Francisco

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024