This article addresses the warnings that appeared while fixing the Automatic Updates module issue from the previous article.
The plan was to remove and reinstall package_manager and automatic_updates, but the dependency on drupal_cms_starter prevented removal — so drupal_cms_starter had to go first, allowing package_manager and automatic_updates to be removed and then reinstalled.
Removing drupal_cms_starter took out the modules and themes bundled with Drupal CMS by default, breaking dependencies and making the recovery process unexpectedly involved.
Notice.
This occurred in a specific environment — a Mac local setup using DDEV, updating from a pre-release — so it may not be reproducible elsewhere. The steps taken here break Drupal's default dependency structure, and attempting the same in a different environment may result in an unrecoverable state. If you use this article as a reference, make sure you fully understand your own situation and proceed entirely at your own risk.
The goal for this article.
Checking the admin console log from the automatic_updates module installation reveals a warning about package_manager.
It's not an error, so there's no direct impact on using Drupal CMS — but it's worth investigating.
Warnings displayed
Terminal warning during automatic_updates module installation
[warning] foreach() argument must be of type array|object, null given Mapping.php:31
[warning] foreach() argument must be of type array|object, null given Mapping.php:230package_manager warning in the admin console log
The following paths in /var/www/html aren't recognized as part of your Drupal site, so to be safe, Package Manager is excluding them from all stage operations. If these files are not needed for Composer to work properly in your site, no action is needed. Otherwise, you can disable this behavior by setting the package_manager.settings:include_unknown_files_in_project_root config setting to TRUE. .ddev README.md launch-drupal-cms.sh recipes
The following warning is permanently displayed in the admin console.
//
One or more updates are available for modules or themes you are using. To keep your site functioning properly, you should update as soon as possible. This message is permanently displayed in the admin console even when the Core program, modules, and themes are all up to date with no updates available.
//
The goal is to clear these warnings and fix the persistent update notice.
Summary of steps taken
- To fix the automatic_updates module bug, attempt to remove package_manager and automatic_updates — but removal fails because automatic_updates is tied to drupal_cms_starter by a dependency.
- Remove drupal_cms_starter to unblock the removal of automatic_updates, then remove automatic_updates.
- Themes (gin, easy_email_theme, drupal_cms_olivero) and modules tied to drupal_cms_starter are removed along with it.
- The admin theme gin is among the deleted items, causing the admin console to error out and become inaccessible.
- Fix the error reporting easy_breadcrumb as missing by reinstalling it.
- Removing themes and modules causes inconsistencies with core.extension, making the situation increasingly difficult to manage.
- Fix a PHP (PathLocator class) issue.
- Reinstall required themes and modules (gin, package_manager, etc.).
- Module reinstallation completes, but theme installation hits issues.
- Work on restoring Gin to fix the admin console error.
- Fix the Gin toolbar conflict, reinstall Gin, and restore admin console access — but errors persist and Package Manager and the remaining themes still need work.
- Reinstall Package Manager and the themes. Dependency errors remain at this stage.
- Fix a YML (services.yml) issue.
- Repair dependencies with composer install and update the database with drush updb.
- Clear cache with drush cr — errors finally resolved.
- An error related to KeyValueStore\DatabaseStorage appears. Caused by stale data in the database — resolved by deleting the old data.
The above steps address the persistent warning message [ One or more updates are available for modules or themes you are using. To keep your site functioning properly, you should update as soon as possible. ].
This may well be an issue specific to my environment, and the steps taken here can't be described as correct procedure — this article exists as a personal log. If it turns out to be a bug in Drupal Core or a module that reproduces across environments, a proper bug fix would be the appropriate solution. Since the warning itself has no direct impact on running Drupal CMS, waiting for a bug fix is the wiser course, and following the same steps I took here is not recommended.
In this article, I worked through the problem with limited knowledge, made things worse before getting there, and ultimately completed the recovery — but it's hard to call this proper error handling. There is almost certainly a better approach, so if you encounter a similar issue, consulting someone with the relevant expertise is strongly recommended.
1. Removing package_manager and automatic_updates
Removing package_manager and automatic_updates to fix the automatic_updates module bug.
1-1-1. Removing package_manager and automatic_updates.
Changing the configuration to clear the error log warning and get package_manager working correctly.
Clearing the error log warning
// Change configuration to clear the error log warning and get package_manager working correctly.
$ drush config:set package_manager.settings include_unknown_files_in_project_root TRUE -y
$ drush cr
// Update automatic_updates
$ composer require drupal/automatic_updates
./composer.json has been updated
Running composer update drupal/automatic_updates
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating optimized autoload files
59 packages you are using are looking for funding.
Use the composer fund command to find out more!
Found 2 security vulnerability advisories affecting 1 package.
Run "composer audit" for a full list of advisories.
Using version ^3.1 for drupal/automatic_updatesResult
- Running composer require drupal/automatic_updates returned Nothing to install, update or remove, indicating it is already installed.
- Prompted to run composer audit (potential security vulnerabilities).
- automatic_updates version ^3.1 is in use.
Running composer audit
// Running composer audit
$ composer audit
Found 2 security vulnerability advisories affecting 1 package:
+-------------------+----------------------------------------------------------------------------------+
| Package | drupal/ai |
| Severity | |
| CVE | NO CVE |
| Title | AI (Artificial Intelligence) - Critical - Remote Code Execution - |
| | SA-CONTRIB-2025-021 |
| URL | https://www.drupal.org/sa-contrib-2025-021 |
| Affected versions | <1.0.5 |
| Reported at | 2025-03-05T17:18:25+00:00 |
| Advisory ID | SA-CONTRIB-2025-021 |
+-------------------+----------------------------------------------------------------------------------+
+-------------------+----------------------------------------------------------------------------------+
| Package | drupal/ai |
| Severity | |
| CVE | NO CVE |
| Title | AI (Artificial Intelligence) - Moderately critical - Gadget Chain - |
| | SA-CONTRIB-2025-022 |
| URL | https://www.drupal.org/sa-contrib-2025-022 |
| Affected versions | <1.0.5 |
| Reported at | 2025-03-05T17:27:19+00:00 |
| Advisory ID | SA-CONTRIB-2025-022 |
+-------------------+----------------------------------------------------------------------------------+Result
composer audit identified 2 security vulnerabilities in the drupal/ai module (SA-CONTRIB-2025-021 and SA-CONTRIB-2025-022).
- Affected versions are those below 1.0.5.
- The affected module (drupal/ai) is likely unrelated to the automatic_updates error, but should be fixed for safety.
Addressing the security vulnerabilities
// Update the drupal/ai module to the latest version
$ composer update drupal/ai --with-dependencies
$ drush crThe drupal/ai module has been updated.
Next, uninstalling and removing automatic_updates.
1-1-2. Uninstalling and removing automatic_updates
$ drush pmu automatic_updates -y
$ composer remove drupal/automatic_updates
Removal failed, drupal/automatic_updates is still present, it may be required by another package. See composer why drupal/automatic_updates.Result
- Running composer remove drupal/automatic_updates failed due to a dependency.
- The automatic_updates module is likely required by another module or package.
Checking the dependency relationship with composer why.
$ composer why drupal/automatic_updates
drupal/drupal_cms_starter 1.0.2 requires drupal/automatic_updates (^3.1.7)
drupal/project_browser 2.0.0-alpha9 conflicts drupal/automatic_updates (<3.0)Result
- drupal/drupal_cms_starter 1.0.2 requires drupal/automatic_updates (^3.1.7).
- drupal/project_browser 2.0.0-alpha9 conflicts with drupal/automatic_updates versions below 3.0 (though the current automatic_updates is ^3.1, so this shouldn't be an issue).
In other words, drupal/drupal_cms_starter's dependency on automatic_updates makes a straightforward removal impossible.
1-2. Impact of drupal/drupal_cms_starter
The drupal/drupal_cms_starter module is a starter package for setting up a Drupal site. It is likely not essential for the site's actual operation, so trying to remove it.
drupal_cms_starter appears unnecessary, so removing it along with automatic_updates.
1-2-1. Removing drupal_cms_starter and automatic_updates
$ composer remove drupal/drupal_cms_starter drupal/automatic_updates
After removal, the following error appears — and logging into the admin console becomes impossible.
The website encountered an unexpected error. Try again later.
AssertionError: The file specified by the given app root, relative path and file name (/var/www/html/web/modules/contrib/easy_breadcrumb/easy_breadcrumb.info.yml) do not exist. in assert() (line 73 of core/lib/Drupal/Core/Extension/Extension.php).Result
The website encountered an unexpected error. Try again later. error occurs.
AssertionError: The file specified by the given app root, relative path and file name (/var/www/html/web/modules/contrib/easy_breadcrumb/easy_breadcrumb.info.yml) do not exist. error occurs at core/lib/Drupal/Core/Extension/Extension.php:73.
At this point, both the admin console and the site pages are showing errors.
Addressing the errors
The error indicates easy_breadcrumb is missing or removed but still referenced in the configuration, so reinstalling it.
1-2-2. Installing easy_breadcrumb
$ composer require drupal/easy_breadcrumb
$ drush en easy_breadcrumb -y
$ drush updb -y
$ drush cr
[warning] Drush command terminated abnormally.Result
The [warning] Drush command terminated abnormally. error confirms the drush command exited abnormally.
Database update error
drush updb -y
[error] Package Manager is available for early testing. To install the module set the
value of 'testing_package_manager' to TRUE in your settings.php file.
[error] (Currently using Missing or invalid modules The following modules are marked as installed in the core.extension
configuration, but they are missing:
* login_emailusername
* mailsystem
* project_browser
* redirect
* redirect_404
* sam
* symfony_mailer_lite
Review the suggestions for resolving this incompatibility [1] to repair your
installation, and then re-run update.php.
[1] https://www.drupal.org/docs/updating-drupal/troubleshooting-database-updates
)
[error] (Currently using Missing or invalid themes The following themes are marked as installed in the core.extension
configuration, but they are missing:
* gin
* easy_email_theme
* drupal_cms_olivero
Review the suggestions for resolving this incompatibility [1] to repair your
installation, and then re-run update.php.
[1] https://www.drupal.org/docs/updating-drupal/troubleshooting-database-updates
)Result
The error log reveals consistency issues with Drupal's modules and themes.
Main errors
1. Package Manager test mode is not enabled
• 'testing_package_manager' is not set to TRUE in settings.php.
2. Some modules are registered in core.extension but cannot be found
• login_emailusername
• mailsystem
• project_browser
• redirect
• redirect_404
• sam
• symfony_mailer_lite
3. Some themes are registered in core.extension but cannot be found
• gin
• easy_email_theme
• drupal_cms_olivero
2. Addressing the errors.
- Enable testing_package_manager in settings.php
- Add missing modules
- Add missing themes
These are the steps to take.
2-1. Enabling testing_package_manager
Adding the testing_package_manager setting to settings.php.
2-1-1. Adding testing_package_manager to settings.php
Adding the following code to web/sites/default/settings.php:
$ settings['testing_package_manager'] = TRUE;Open settings.php with vi, write the code in insert mode [i], exit insert mode with [esc], then save and quit with [wq].
2-2. Reinstalling missing modules
Adding missing modules with composer require.
2-2-1. Installing modules
Reinstalling missing modules
$ composer require drupal/login_emailusername drupal/mailsystem drupal/project_browser drupal/redirect drupal/redirect_404 drupal/sam drupal/symfony_mailer_lite
./composer.json has been updated
Running composer update drupal/login_emailusername drupal/mailsystem drupal/project_browser drupal/redirect drupal/redirect_404 drupal/sam drupal/symfony_mailer_lite
Loading composer repositories with package information
Updating dependencies
Lock file operations: 10 installs, 0 updates, 0 removals
- Locking drupal/login_emailusername (3.0.1)
- Locking drupal/mailsystem (4.5.0)
- Locking drupal/project_browser (2.0.0-alpha10)
- Locking drupal/redirect (1.11.0)
- Locking drupal/redirect_404 (1.11.0)
- Locking drupal/sam (1.3.2)
- Locking drupal/symfony_mailer_lite (2.0.2)
- Locking html2text/html2text (4.3.2)
- Locking symfony/css-selector (v7.2.0)
- Locking tijsverkoyen/css-to-inline-styles (v2.3.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 10 installs, 0 updates, 0 removals
- Downloading drupal/project_browser (2.0.0-alpha10)
- Installing drupal/login_emailusername (3.0.1): Extracting archive
- Installing drupal/project_browser (2.0.0-alpha10): Extracting archive
- Installing drupal/redirect (1.11.0): Extracting archive
- Installing drupal/redirect_404 (1.11.0)
- Installing drupal/sam (1.3.2): Extracting archive
- Installing symfony/css-selector (v7.2.0): Extracting archive
- Installing tijsverkoyen/css-to-inline-styles (v2.3.0): Extracting archive
- Installing html2text/html2text (4.3.2): Extracting archive
- Installing drupal/mailsystem (4.5.0): Extracting archive
- Installing drupal/symfony_mailer_lite (2.0.2): Extracting archive
Generating optimized autoload files
58 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
Using version ^3.0 for drupal/login_emailusername
Using version ^4.5 for drupal/mailsystem
Using version ^2.0@alpha for drupal/project_browser
Using version ^1.11 for drupal/redirect
Using version ^1.11 for drupal/redirect_404
Using version ^1.3 for drupal/sam
Using version ^2.0 for drupal/symfony_mailer_lite
$ drush cr
[success] Cache rebuild complete.Result
Module installation completes successfully.
2-3. Reinstalling missing themes
Installing themes with composer require, same as the modules.
2-3-1. Installing themes
$ composer require drupal/gin drupal/easy_email_theme drupal/drupal_cms_olivero
./composer.json has been updated
Running composer update drupal/gin drupal/easy_email_theme drupal/drupal_cms_olivero
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires drupal/gin * -> satisfiable by drupal/gin[1.0.0-alpha1, ..., 1.0.0-alpha14, 2.0.0-alpha1, ..., 2.0.0-alpha13, 3.0.0-alpha1, ..., 3.0.0, 4.0.0, ..., 4.0.6].
- drupal/project_browser is locked to version 2.0.0-alpha10 and an update of this package was not requested.
- drupal/gin[1.0.0-alpha4, ..., 1.0.0-alpha14] require drupal/core <8.8 -> found drupal/core[8.0.0-beta6, ..., 8.7.14] but the package is fixed to 11.1.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/gin[1.0.0-alpha1, ..., 1.0.0-alpha2] require drupal/core ~8.0 -> found drupal/core[8.0.0-beta6, ..., 8.9.20] but the package is fixed to 11.1.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/gin 1.0.0-alpha3 requires drupal/core ^8 || ^9 -> found drupal/core[8.0.0-beta6, ..., 8.9.20, 9.0.0-alpha1, ..., 9.5.11] but the package is fixed to 11.1.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/gin[2.0.0-alpha1, ..., 2.0.0-alpha3] require drupal/core ^8.8 -> found drupal/core[8.8.0-alpha1, ..., 8.9.20] but the package is fixed to 11.1.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/gin[2.0.0-alpha4, ..., 2.0.0-alpha13, 3.0.0-alpha1, ..., 3.0.0-alpha36] require drupal/core ^8.8 || ^9 -> found drupal/core[8.8.0-alpha1, ..., 8.9.20, 9.0.0-alpha1, ..., 9.5.11] but the package is fixed to 11.1.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/gin[3.0.0-beta1, ..., 3.0.0-rc1] require drupal/core ^8.9 || ^9 || ^10 -> found drupal/core[8.9.0-beta1, ..., 8.9.20, 9.0.0-alpha1, ..., 9.5.11, 10.0.0-alpha1, ..., 10.4.4] but the package is fixed to 11.1.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/gin[3.0.0-rc2, ..., 3.0.0-rc10] require drupal/core ^9 || ^10 -> found drupal/core[9.0.0-alpha1, ..., 9.5.11, 10.0.0-alpha1, ..., 10.4.4] but the package is fixed to 11.1.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/gin 3.0.0-alpha37 requires drupal/core ^8.8 || ^9 || ^10 -> found drupal/core[8.8.0-alpha1, ..., 8.9.20, 9.0.0-alpha1, ..., 9.5.11, 10.0.0-alpha1, ..., 10.4.4] but the package is fixed to 11.1.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/gin[4.0.1, ..., 4.0.6] require drupal/gin_toolbar ^2.0 -> found drupal/gin_toolbar[2.0.0] but it conflicts with your root composer.json require (1.0.0).
- drupal/project_browser 2.0.0-alpha10 conflicts with drupal/gin 4.0.0.
- drupal/project_browser 2.0.0-alpha10 conflicts with drupal/gin 3.0.0.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require drupal/gin:*" to figure out if any version is installable, or "composer require drupal/gin:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
$ drush cr
[success] Cache rebuild complete.Result
An error prevents installation. Trying a database update.
$ drush updb -y
[error] (Currently using Missing or invalid themes The following themes are marked as installed in the core.extension
configuration, but they are missing:
* gin
* easy_email_theme
* drupal_cms_olivero
Review the suggestions for resolving this incompatibility [1] to repair your
installation, and then re-run update.php.
[1] https://www.drupal.org/docs/updating-drupal/troubleshooting-database-updates
)
// Requirements check reports errors. Do you wish to continue?: yes.
[success] No pending updates.Result
Themes gin, easy_email_theme, and drupal_cms_olivero are registered in core.extension but cannot be found.
Checking installed themes.
2-3-2. Checking installed themes
$ ls -l /var/www/html/web/themes/contrib/
total 0
drwxr-xr-x 1 shinichirotakeda dialout 698 Aug 8 2024 bootstrap5Result
gin, easy_email_theme, and drupal_cms_olivero are not installed.
The trailing message Installation failed, reverting ./composer.json and ./composer.lock to their original content. confirms that the composer require drupal/gin drupal/easy_email_theme drupal/drupal_cms_olivero command failed and both files were reverted.
Checking composer.json for errors using composer validate.
2-3-3. Checking with composer validate
$ composer validate
./composer.json is valid, but with a few warnings
See https://getcomposer.org/doc/04-schema.md for details on the schema
# General warnings
- require.drupal/autosave_form : exact version constraints (1.10.0) should be avoided if the package follows semantic versioning
- require.drupal/better_exposed_filters : exact version constraints (7.0.5) should be avoided if the package follows semantic versioning
- require.drupal/bpmn_io : exact version constraints (2.0.7) should be avoided if the package follows semantic versioning
- require.drupal/coffee : exact version constraints (2.0.1) should be avoided if the package follows semantic versioning
- require.drupal/core-composer-scaffold : exact version constraints (11.1.4) should be avoided if the package follows semantic versioning
- require.drupal/core-project-message : exact version constraints (11.1.4) should be avoided if the package follows semantic versioning
- require.drupal/core-recommended : exact version constraints (11.1.4) should be avoided if the package follows semantic versioning
- require.drupal/dashboard : exact version constraints (2.0.0) should be avoided if the package follows semantic versioning
- require.drupal/easy_email : exact version constraints (3.0.4) should be avoided if the package follows semantic versioning
- require.drupal/gin_toolbar : exact version constraints (1.0.0) should be avoided if the package follows semantic versioning
- require.drupal/honeypot : exact version constraints (2.2.2) should be avoided if the package follows semantic versioning
- require.drupal/klaro : exact version constraints (3.0.0) should be avoided if the package follows semantic versioningResult
composer validate reports composer.json as valid but with several warnings. These warnings are not direct errors and are separate from the gin theme installation failure.
Reviewing the errors again.
- Attempting to install drupal/gin, but its dependencies are incompatible with the Drupal Core version (11.1.4).
- A conflict exists between drupal/project_browser 2.0.0-alpha10 and drupal/gin.
- drupal/gin 4.0.x requires drupal/gin_toolbar ^2.0, but composer.json specifies gin_toolbar 1.0.0 — a version conflict.
2-3-4. Checking Gin
$ composer show drupal/gin --all | grep versions
versions : 4.0.x-dev, 4.0.6, 4.0.5, 4.0.4, 4.0.3, 4.0.2, 4.0.1, 4.0.0, 3.x-dev, 3.0.0, 3.0.0-rc16, 3.0.0-rc15, 3.0.0-rc14, 3.0.0-rc13, 3.0.0-rc12, 3.0.0-rc11, 3.0.0-rc10, 3.0.0-rc9, 3.0.0-rc8, 3.0.0-rc7, 3.0.0-rc6, 3.0.0-rc5, 3.0.0-rc4, 3.0.0-rc3, 3.0.0-rc2, 3.0.0-rc1, 3.0.0-beta5, 3.0.0-beta4, 3.0.0-beta3, 3.0.0-beta2, 3.0.0-beta1, 3.0.0-alpha37, 3.0.0-alpha36, 3.0.0-alpha35, 3.0.0-alpha34, 3.0.0-alpha33, 3.0.0-alpha32, 3.0.0-alpha31, 3.0.0-alpha30, 3.0.0-alpha29, 3.0.0-alpha28, 3.0.0-alpha27, 3.0.0-alpha26, 3.0.0-alpha25, 3.0.0-alpha24, 3.0.0-alpha23, 3.0.0-alpha22, 3.0.0-alpha21, 3.0.0-alpha20, 3.0.0-alpha19, 3.0.0-alpha18, 3.0.0-alpha17, 3.0.0-alpha16, 3.0.0-alpha15, 3.0.0-alpha14, 3.0.0-alpha13, 3.0.0-alpha12, 3.0.0-alpha11, 3.0.0-alpha10, 3.0.0-alpha9, 3.0.0-alpha8, 3.0.0-alpha7, 3.0.0-alpha6, 3.0.0-alpha5, 3.0.0-alpha4, 3.0.0-alpha3, 3.0.0-alpha2, 3.0.0-alpha1, 2.x-dev, 2.0.0-alpha13, 2.0.0-alpha12, 2.0.0-alpha11, 2.0.0-alpha10, 2.0.0-alpha9, 2.0.0-alpha8, 2.0.0-alpha7, 2.0.0-alpha6, 2.0.0-alpha5, 2.0.0-alpha4, 2.0.0-alpha3, 2.0.0-alpha2, 2.0.0-alpha1, 1.x-dev, 1.0.0-alpha14, 1.0.0-alpha13, 1.0.0-alpha12, 1.0.0-alpha11, 1.0.0-alpha10, 1.0.0-alpha9, 1.0.0-alpha8, 1.0.0-alpha7, 1.0.0-alpha6, 1.0.0-alpha5, 1.0.0-alpha4, 1.0.0-alpha3, 1.0.0-alpha2, 1.0.0-alpha1, dev-3.x, dev-4.0.x, dev-2.x, dev-1.xInstalling gin 4.0.x requires gin_toolbar ^2.0, so upgrading gin_toolbar.
2-3-5. Updating Gin Toolbar
$ composer require drupal/gin_toolbar:^2.0 --with-dependencies
./composer.json has been updated
Running composer update drupal/gin_toolbar --with-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
- Upgrading drupal/gin_toolbar (1.0.0 => 2.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Downloading drupal/gin_toolbar (2.0.0)
- Upgrading drupal/gin_toolbar (1.0.0 => 2.0.0): Extracting archive
Generating optimized autoload files
58 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
$ drush cr
[success] Cache rebuild complete.Installing Gin.
2-3-6. Installing Gin
$ composer require drupal/gin
./composer.json has been updated
Running composer update drupal/gin
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
- Locking drupal/gin (4.0.6)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Downloading drupal/gin (4.0.6)
- Installing drupal/gin (4.0.6): Extracting archive
Generating optimized autoload files
59 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
Using version ^4.0 for drupal/gin
$ drush cr
[success] Cache rebuild complete.Gin installed successfully. This installation restores admin console access.
3. Package Manager errors
With Gin restored, logging into the admin console. Admin → Reports → Status shows errors. The error log contains the following:
3-1-1. Errors displayed
The website encountered an unexpected error. Try again later.
Error: Class "Drupal\package_manager\PathLocator" not found in Drupal\Component\DependencyInjection\Container->createService() (line 259 of core/lib/Drupal/Component/DependencyInjection/Container.php).
Drupal\Component\DependencyInjection\Container->get() (Line: 430)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() (Line: 237)
Drupal\Component\DependencyInjection\Container->createService() (Line: 177)
Drupal\Component\DependencyInjection\Container->get() (Line: 197)
Drupal::service() (Line: 38)
package_manager_requirements()
call_user_func_array() (Line: 355)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 307)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 354)
Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 109)
Drupal\system\SystemManager->listRequirements() (Line: 53)
Drupal\system\Controller\SystemInfoController->status()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 36)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 51)
Drupal\Core\DrupalKernel->handle() (Line: 709)- The site is down with The website encountered an unexpected error. Try again later.
- Error: Class "Drupal\package_manager\PathLocator" not found.
- Error location: the createService() method in core/lib/Drupal/Component/DependencyInjection/Container.php.
- package_manager module is broken — left in an incomplete state by the composer update or removal.
- Drupal cache is stale — retaining information about deleted modules or old versions.
- Dependencies are broken — an error mid-composer-update may have removed package_manager-related packages.
- Reinstall package_manager
- If composer update ended incomplete, repair all dependencies.
Installing Package Manager.
3-1-2. Installing Package Manager
$ composer require drupal/package_manager --with-all-dependencies
./composer.json has been updated
Running composer update drupal/package_manager --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 2 installs, 0 updates, 0 removals
- Locking drupal/automatic_updates (3.1.7)
- Locking drupal/package_manager (3.1.7)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
- Downloading drupal/automatic_updates (3.1.7)
- Installing drupal/automatic_updates (3.1.7): Extracting archive
- Installing drupal/package_manager (3.1.7)
Generating optimized autoload files
59 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
Using version ^3.1 for drupal/package_manager
However, you may be able to use a command like:
$ drush cr
In DefinitionErrorExceptionPass.php line 48:
Cannot autowire service "Drupal\package_manager\Validator\LockFileValidator
": argument "$keyValueFactory" of method "__construct()" references interfa
ce "Drupal\Core\KeyValueStore\KeyValueFactoryInterface" but no such service
exists. You should maybe alias this interface to one of these existing ser
vices: "keyvalue", "keyvalue.database", "keyvalue.expirable".Repairing dependencies
$ composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating optimized autoload files
59 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
* Homepage: https://www.drupal.org/project/drupal
* Support:
* docs: https://drupal.org/docs/user_guide/en/index.html
* chat: https://drupal.org/node/314178
$ composer update --lock
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating optimized autoload files
59 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
$ drush cr
In DefinitionErrorExceptionPass.php line 48:
Cannot autowire service "Drupal\package_manager\Validator\LockFileValidator
": argument "$keyValueFactory" of method "__construct()" references interfa
ce "Drupal\Core\KeyValueStore\KeyValueFactoryInterface" but no such service
exists. You should maybe alias this interface to one of these existing ser
vices: "keyvalue", "keyvalue.database", "keyvalue.expirable".Result
- The service dependencies related to Drupal's package_manager are broken.
- The LockFileValidator constructor requires KeyValueFactoryInterface, but this service cannot be found.
- The keyvalue service (keyvalue.database, keyvalue.expirable) exists, but may be missing the proper alias.
- Removing and reinstalling Package Manager — no change. (Terminal output omitted.)
- Check the keyvalue service alias — verify that KeyValueFactoryInterface is properly mapped in services.yml.
- Checking errors with Watchdog.
Checking Watchdog errors
3-1-3. WatchDog
$ drush watchdog:show --severity=error --count=10
In WatchdogCommands.php line 330:
Unknown severity level: error
Valid severity levels are: Emergency(0), Alert(1), Critical(2), Error(3), Warning(4),
Notice(5), Info(6), Debug(7).
Either use the default language levels, or use a number.Enter the number corresponding to the severity level. For errors, specify "3".
$ drush watchdog:show --severity=3 --count=10
----- -------------- ------ ---------- --------------------------------------
ID Date Type Severity Message
----- -------------- ------ ---------- --------------------------------------
625 09/Mar 18:31 php Error Error: Class
"Drupal\package_manager\PathLocator"
not found in
Drupal\Component\DependencyInjection
\Container->createService() (line
259 of
/var/www/html/web/core/lib/Drupal/Co
mponent/Depe
622 09/Mar 18:29 php Error Drupal\Core\Extension\Exception\Unkn
ownExtensionException: The theme gin
does not exist. in
Drupal\Core\Extension\ExtensionList-
>getPathname() (line 519 of
/var/www/html/web/core/lib/Drupa
621 09/Mar 18:24 php Error InvalidArgumentException: Class
"Drupal\gin\GinSettings" does not
exist. in
Drupal\Core\DependencyInjection\Clas
sResolver->getInstanceFromDefinition
() (line 32 of
/var/www/html/web/core/li
616 09/Mar 18:16 php Error Error: Class
"Drupal\package_manager\PathLocator"
not found in
Drupal\Component\DependencyInjection
\Container->createService() (line
259 of
/var/www/html/web/core/lib/Drupal/Co
mponent/Depe
613 09/Mar 18:16 php Error Drupal\Core\Extension\Exception\Unkn
ownExtensionException: The theme gin
does not exist. in
Drupal\Core\Extension\ExtensionList-
>getPathname() (line 519 of
/var/www/html/web/core/lib/Drupa
612 09/Mar 18:14 php Error InvalidArgumentException: Class
"Drupal\gin\GinSettings" does not
exist. in
Drupal\Core\DependencyInjection\Clas
sResolver->getInstanceFromDefinition
() (line 32 of
/var/www/html/web/core/li
424 02/Mar 03:26 php Error LogicException: Stored hash key
deleted. in
Drupal\package_manager\Validator\Loc
kFileValidator->validate() (line 122
of
/var/www/html/web/modules/contrib/au
tomatic_updates/package_manager/
421 02/Mar 02:36 php Error LogicException: Stored hash key
deleted. in
Drupal\package_manager\Validator\Loc
kFileValidator->validate() (line 122
of
/var/www/html/web/modules/contrib/au
tomatic_updates/package_manager/
420 02/Mar 02:24 php Error LogicException: Stored hash key
deleted. in
Drupal\package_manager\Validator\Loc
kFileValidator->validate() (line 122
of
/var/www/html/web/modules/contrib/au
tomatic_updates/package_manager/
419 02/Mar 02:19 php Error LogicException: Stored hash key
deleted. in
Drupal\package_manager\Validator\Loc
kFileValidator->validate() (line 122
of
/var/www/html/web/modules/contrib/au
tomatic_updates/package_manager/
[1] https://www.drupal.org/docs/updating-drupal/troubleshooting-database-updates
)Result
- Error: Class "Drupal\package_manager\PathLocator" not found
- The theme gin does not exist.
- InvalidArgumentException: Class "Drupal\gin\GinSettings" does not exist.
- LogicException: Stored hash key deleted.
- package_manager module is broken or not installed correctly.
- gin theme has been deleted or is not installed correctly.
- The gin theme configuration files may be corrupted.
- package_manager data may be corrupted.
Checking theme installation status.
3-1-4. Checking themes
$ ls -l /var/www/html/web/themes/contrib/
total 0
drwxr-xr-x 1 shinichirotakeda dialout 698 Aug 8 2024 bootstrap5
drwxr-xr-x 1 shinichirotakeda dialout 776 Feb 28 19:36 ginGin is installed. Despite the errors, attempting a reinstall.
Installing themes
3-1-5. Installing themes
Installing easy_email_theme and drupal_cms_olivero
$ composer require drupal/easy_email_theme drupal/drupal_cms_olivero --with-all-dependencies
./composer.json has been updated
Running composer update drupal/easy_email_theme drupal/drupal_cms_olivero --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 2 installs, 0 updates, 0 removals
- Locking drupal/drupal_cms_olivero (1.0.1)
- Locking drupal/easy_email_theme (1.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
- Downloading drupal/drupal_cms_olivero (1.0.1)
- Downloading drupal/easy_email_theme (1.0.0)
- Installing drupal/drupal_cms_olivero (1.0.1): Extracting archive
- Installing drupal/easy_email_theme (1.0.0): Extracting archive
Generating optimized autoload files
59 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
Using version ^1.0 for drupal/easy_email_theme
Using version ^1.0 for drupal/drupal_cms_olivero
$ drush cr
In DefinitionErrorExceptionPass.php line 48:
Cannot autowire service "Drupal\package_manager\Validator\LockFileValidator
": argument "$keyValueFactory" of method "__construct()" references interfa
ce "Drupal\Core\KeyValueStore\KeyValueFactoryInterface" but no such service
exists. You should maybe alias this interface to one of these existing ser
vices: "keyvalue", "keyvalue.database", "keyvalue.expirable".Installing Gin
$ composer require drupal/gin --with-all-dependencies
./composer.json has been updated
Running composer update drupal/gin --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating optimized autoload files
59 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
Using version ^4.0 for drupal/gin
$ drush cr
In DefinitionErrorExceptionPass.php line 48:
Cannot autowire service "Drupal\package_manager\Validator\LockFileValidator
": argument "$keyValueFactory" of method "__construct()" references interfa
ce "Drupal\Core\KeyValueStore\KeyValueFactoryInterface" but no such service
exists. You should maybe alias this interface to one of these existing ser
vices: "keyvalue", "keyvalue.database", "keyvalue.expirable".Errors appear, but theme installation is complete.
Removing and reinstalling Package Manager.
3-1-6. Reinstalling Package Manager
Removing Package Manager
$ composer remove drupal/package_manager
./composer.json has been updated
Running composer update drupal/package_manager
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 0 updates, 2 removals
- Removing drupal/automatic_updates (3.1.7)
- Removing drupal/package_manager (3.1.7)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 0 updates, 2 removals
- Removing drupal/package_manager (3.1.7)
- Removing drupal/automatic_updates (3.1.7)
0/1 [>---------------------------] 0%Deleting /var/www/html/web/modules/contrib/automatic_updates - deleted
Generating optimized autoload files
59 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Scaffolding files for drupal/core:
- Copy [web-root]/sites/default/default.services.yml from assets/scaffold/files/default.services.yml
No security vulnerability advisories found.Installing Package Manager
$ composer require drupal/package_manager --with-all-dependencies
./composer.json has been updated
Running composer update drupal/package_manager --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 2 installs, 0 updates, 0 removals
- Locking drupal/automatic_updates (3.1.7)
- Locking drupal/package_manager (3.1.7)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
- Installing drupal/automatic_updates (3.1.7): Extracting archive
- Installing drupal/package_manager (3.1.7)
Generating optimized autoload files
59 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
Using version ^3.1 for drupal/package_manager
$ drush cr
In DefinitionErrorExceptionPass.php line 48:
Cannot autowire service "Drupal\package_manager\Validator\LockFileValidator
": argument "$keyValueFactory" of method "__construct()" references interfa
ce "Drupal\Core\KeyValueStore\KeyValueFactoryInterface" but no such service
exists. You should maybe alias this interface to one of these existing ser
vices: "keyvalue", "keyvalue.database", "keyvalue.expirable".Errors are still appearing.
Checking whether KeyValueFactoryInterface is properly mapped in services.yml.
4. services.yml
Checking the keyvalue service alias — verifying that KeyValueFactoryInterface is properly mapped in services.yml.
4-1-1. Adding KeyValueFactoryInterface
Adding the following to web/sites/default/services.yml:
services:
Drupal\Core\KeyValueStore\KeyValueFactoryInterface:
alias: keyvalueWriting the above to services.yml and clearing cache.
$ drush cr
Cannot autowire service "Drupal\package_manager\Validator\LockFileValidator
": argument "$keyValueFactory" of method "__construct()" references interfa
ce "Drupal\Core\KeyValueStore\KeyValueFactoryInterface" but no such service
exists. You should maybe alias this interface to one of these existing ser
vices: "keyvalue", "keyvalue.database", "keyvalue.expirable".Repairing dependencies.
4-1-2. Repairing dependencies
$ composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating optimized autoload files
59 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
* Homepage: https://www.drupal.org/project/drupal
* Support:
* docs: https://drupal.org/docs/user_guide/en/index.html
* chat: https://drupal.org/node/314178
$ composer update --lock
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating optimized autoload files
59 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
$ drush cr
In DefinitionErrorExceptionPass.php line 48:
Cannot autowire service "Drupal\package_manager\Validator\LockFileValidator
": argument "$keyValueFactory" of method "__construct()" references interfa
ce "Drupal\Core\KeyValueStore\KeyValueFactoryInterface" but no such service
exists. You should maybe alias this interface to one of these existing ser
vices: "keyvalue", "keyvalue.database", "keyvalue.expirable".Errors remain, but running a database update and clearing cache.
4-1-3. Updating the database and clearing cache.
$ drush updb -y
[success] No pending updates.
$ drush cr
[success] Cache rebuild complete.The errors that had been appearing with drush cr are gone. Error recovery is complete.
5. Recovery complete
After working through everything above, a database update is all it took to complete the error recovery.
- To fix the automatic_updates module bug, attempted to remove package_manager and automatic_updates — removal fails because automatic_updates is tied to drupal_cms_starter by a dependency.
- Removed drupal_cms_starter to unblock the removal of automatic_updates, then removed automatic_updates.
- Themes (gin, easy_email_theme, drupal_cms_olivero) and modules tied to drupal_cms_starter removed along with it.
- The admin theme gin was among the deleted items, causing the admin console to error out and become inaccessible.
- Fixed the error reporting easy_breadcrumb as missing by reinstalling it.
- Removing themes and modules caused inconsistencies with core.extension, making the situation increasingly difficult to manage.
- Fixed a PHP (PathLocator class) issue.
- Reinstalled required themes and modules (gin, package_manager, etc.).
- Module reinstallation completed, but theme installation hit issues.
- Worked on restoring Gin to fix the admin console error.
- Fixed the Gin toolbar conflict, reinstalled Gin, and restored admin console access — but errors persisted and Package Manager and the remaining themes still needed work.
- Reinstalled Package Manager and the themes. Dependency errors remained at this stage.
- Fixed a YML (services.yml) issue.
- Repaired dependencies with composer install and updated the database with drush updb.
- Cleared cache with drush cr — errors finally resolved.
This turned into a very long article, but all the errors from this recovery process have been fully resolved.
5-1. Deleting stale data
I thought error recovery was complete, but checking the admin console reveals more errors.
5-1-1. Error log in the admin console
Deprecated function: Creation of dynamic property Drupal\project_browser\ProjectBrowser\Project::$commands is deprecated in Drupal\Component\Serialization\PhpSerialize::decode() (line 21 of core/lib/Drupal/Component/Serialization/PhpSerialize.php).
Drupal\Component\Serialization\PhpSerialize::decode() (Line: 86)
Drupal\Core\KeyValueStore\DatabaseStorage->getMultiple() (Line: 121)
Drupal\project_browser\EnabledSourceHandler->getProjects() (Line: 62)
Drupal\project_browser\Controller\ProjectBrowserEndpointController->getAllProjects()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)- A dynamic property $commands is being created in the Drupal\project_browser\ProjectBrowser\Project class, but creating dynamic properties is deprecated in newer versions of Drupal.
- A problem occurs when deserializing data retrieved from KeyValueStore via PhpSerialize::decode().
This error may be caused by stale data remaining in KeyValueStore\DatabaseStorage. Deleting the data is a potential fix. Proceeding with the deletion below.
5-1-2. Deleting stale data from KeyValueStore\DatabaseStorage
$ drush updb -y
$ drush cr
$ drush sqlq "DELETE FROM key_value WHERE collection='project_browser'"
$ drush crWith that, dependency recovery is complete and all errors have been resolved.
Conclude.
Warnings displayed
Terminal warning during automatic_updates module installation
[warning] foreach() argument must be of type array|object, null given Mapping.php:31
[warning] foreach() argument must be of type array|object, null given Mapping.php:230package_manager warning in the admin console log
The following paths in /var/www/html aren't recognized as part of your Drupal site, so to be safe, Package Manager is excluding them from all stage operations. If these files are not needed for Composer to work properly in your site, no action is needed. Otherwise, you can disable this behavior by setting the package_manager.settings:include_unknown_files_in_project_root config setting to TRUE. .ddev README.md launch-drupal-cms.sh recipes
The following warning is permanently displayed in the admin console.
//
One or more updates are available for modules or themes you are using. To keep your site functioning properly, you should update as soon as possible. This message is permanently displayed in the admin console even when the Core program, modules, and themes are all up to date with no updates available.
//
Working to address these warnings by removing and reinstalling automatic_updates and package_manager, the dependency on drupal_cms_starter made a direct removal impossible — removing drupal_cms_starter first broke Drupal's default dependency structure and configuration files, making the recovery process unexpectedly involved.
The number of recovery steps involved is what made this article so long. As noted at the start, these warnings and errors may be specific to my environment, and the recovery process followed here may not be the correct one. Following the same steps could make things worse in a different environment, so if you encounter similar errors or warnings, make sure you understand your own situation and consult someone with the relevant expertise.