Fatal error after upgrade to 8.6x [due to regression in extension system]

Created on 18 September 2018, over 5 years ago
Updated 12 September 2023, 9 months ago

Problem/Motivation

This is a regression caused by #2208429: Extension System, Part III: ExtensionList, ModuleExtensionList and ProfileExtensionList β†’ .

system_get_info() used to return the module name passed in even when it was handed something invalid. ModuleHandler::getName() used to call it, when it was changed to call ExtensionList::getName() directly, that behaviour wasn't preserved.

The issue is that the module list always includes the profile (for example on an 8.5 site I have locally, 'standard' is in core.extension.yml as a module). However the newly added extension list only has the profile as a profile.

I found #2939904: Fix system_get_info() for non-installed modules. ModuleHandler::getName() used to call system_get_info(), but now it calls ExtensionList() directly, so it needs to catch the exception too.

Proposed resolution

If an invalid module name is passed, catch the exception and return the raw module name passed in.

The root cause here is that profiles are sometimes treated as modules and sometimes not, #3023133: [PP-1] Extension System, Part V: Decouple profiles from modules β†’ is one issue trying to deal with that, but this is critical bug and clear regression.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Original report

I recently upgraded from Drupal 8.5.6 to 8.6.1 and everything appeared to go well. But I noticed today that when attempting to edit a view or review the user list on the site, I received this message:

Drupal\Core\Extension\Exception\UnknownExtensionException: The module minimal does not exist. in Drupal\Core\Extension\ExtensionList->get() (line 257 of /core/lib/Drupal/Core/Extension/ExtensionList.php).

I happened to be on the Status page for the install and noted the installation profile looked liked this:

This is what appears in the error log:

Uncaught PHP Exception Drupal\Core\Extension\Exception\UnknownExtensionException: "The module minimal does not exist." at /core/lib/Drupal/Core/Extension/ExtensionList.php line 257

So it looks like the install profile was removed when the upgrade was conducted.

πŸ› Bug report
Status

Fixed

Version

8.6 ⚰️

Component
ExtensionΒ  β†’

Last updated 3 days ago

No maintainer
Created by

πŸ‡¨πŸ‡¦Canada Shane Birley

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024