- π¬π§United Kingdom joachim
I just tried moving some contrib submodules π Move submodules to a /modules folder Fixed , and I didn't hit this bug at all -- I tried `drush cr`, the Extend page, the Uninstall page, update.php - all fine.
Are there any particular conditions for this bug? The modules I moved had services and routes, but didn't have any update hooks, for instance.
None of these above work for me sadly, yet didn't try anything with manually adding code to db to flush all caches. Tried moving for example ctools from
/modules
to/modules/contrib
and doing cache reload with drush. Still getting error:Error: Class "Drupal\ctools\ParamConverter\TempstoreConverter" not found in .../core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 #0 .../core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService() #1 .../core/lib/Drupal/Component/DependencyInjection/Container.php(440): Drupal\Component\DependencyInjection\Container->get() #2 .../core/lib/Drupal/Component/DependencyInjection/Container.php(273): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() #3 .../core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService() #4 .../core/lib/Drupal/Component/DependencyInjection/Container.php(440): Drupal\Component\DependencyInjection\Container->get() #5 .../core/lib/Drupal/Component/DependencyInjection/Container.php(237): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() #6 .../core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService() #7 .../core/lib/Drupal/Component/DependencyInjection/Container.php(440): Drupal\Component\DependencyInjection\Container->get() #8 .../core/lib/Drupal/Component/DependencyInjection/Container.php(237): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() #9 .../core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService() #10.../core/lib/Drupal/Component/DependencyInjection/Container.php(440): Drupal\Component\DependencyInjection\Container->get() #11 .../core/lib/Drupal/Component/DependencyInjection/Container.php(273): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() #12.../core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService() #13 .../vendor/drush/drush/src/Commands/core/CacheCommands.php(63): Drupal\Component\DependencyInjection\Container->get() #14 .../vendor/drush/drush/src/Runtime/ServiceManager.php(321): Drush\Commands\core\CacheCommands::create() #15 .../vendor/drush/drush/src/Boot/DrupalBoot8.php(310): Drush\Runtime\ServiceManager->instantiateServices() #16 .../vendor/drush/drush/src/Boot/DrupalBoot8.php(238): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands() #17 .../vendor/drush/drush/src/Boot/BootstrapManager.php(236): Drush\Boot\DrupalBoot8->bootstrapDrupalFull() #18 .../vendor/drush/drush/src/Boot/BootstrapManager.php(422): Drush\Boot\BootstrapManager->doBootstrap() #19 .../vendor/drush/drush/src/Boot/BootstrapManager.php(357): Drush\Boot\BootstrapManager->bootstrapMax() #20 .../vendor/drush/drush/src/Boot/BootstrapManager.php(329): Drush\Boot\BootstrapManager->bootstrapToPhaseIndex() #21 .../vendor/drush/drush/src/Boot/BootstrapHook.php(36): Drush\Boot\BootstrapManager->bootstrapToPhase() #22 .../vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(44): Drush\Boot\BootstrapHook->initialize() #23 .../vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(36): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->doInitializeHook() #24 .../vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(29): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook() #25 .../vendor/consolidation/annotated-command/src/CommandProcessor.php(145): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize() #26 .../vendor/consolidation/annotated-command/src/AnnotatedCommand.php(376): Consolidation\AnnotatedCommand\CommandProcessor->initializeHook() #27 .../vendor/symfony/console/Command/Command.php(292): Consolidation\AnnotatedCommand\AnnotatedCommand->initialize() #28 .../vendor/symfony/console/Application.php(1081): Symfony\Component\Console\Command\Command->run() #29 .../vendor/symfony/console/Application.php(320): Symfony\Component\Console\Application->doRunCommand() #30 .../public/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun() #31 .../public/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run() #32 .../public/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun() #33 .../vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run() #34 .../vendor/drush/drush/drush(4): require('...') #35 .../vendor/bin/drush(120): include('...') #36 {main}
- π³πΏNew Zealand quietone
I tried this on Drupal 11.x, on a test site that I have been using for a few hours. I tested with project_browser which was installed and in /modules and got the following error. I repeated the test on a fresh install with the same results.
$ ddev drush cr [success] Cache rebuild complete. $ mv modules/project_browser/ modules/contrib/ $ ddev drush cr [error] AssertionError: The file specified by the given app root, relative path and file name (/var/www/html/modules/project_browser/project_browser.info.yml) do not exist. in assert() (line 73 of /var/www/html/core/lib/Drupal/Core/Extension/Extension.php) #0 /var/www/html/core/lib/Drupal/Core/Extension/Extension.php(73): assert(false, 'The file specif...') #1 /var/www/html/core/lib/Drupal/Core/Extension/ModuleHandler.php(114): Drupal\Core\Extension\Extension->__construct('/var/www/html', 'module', 'modules/project...', 'project_browser...') #2 /var/www/html/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\Core\Extension\ModuleHandler->__construct('/var/www/html', Array, Object(Drupal\Core\Cache\ChainedFastBackend)) #3 /var/www/html/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'module_handler') #4 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(588): Drupal\Component\DependencyInjection\Container->get('module_handler') #5 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(234): Drupal\Core\DrupalKernel->preHandle(Object(Symfony\Component\HttpFoundation\Request)) #6 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(236): Drush\Boot\DrupalBoot8->bootstrapDrupalFull(Object(Drush\Boot\BootstrapManager), NULL) #7 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(422): Drush\Boot\BootstrapManager->doBootstrap(5, 6, NULL) #8 /var/www/html/vendor/drush/drush/src/Application.php(228): Drush\Boot\BootstrapManager->bootstrapMax() #9 /var/www/html/vendor/drush/drush/src/Application.php(194): Drush\Application->bootstrapAndFind('cr') #10 /var/www/html/vendor/symfony/console/Application.php(262): Drush\Application->find('cr') #11 /var/www/html/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run(Array) #15 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...') #16 /var/www/html/vendor/bin/drush(119): include('/var/www/html/v...') #17 {main}. AssertionError: The file specified by the given app root, relative path and file name (/var/www/html/modules/project_browser/project_browser.info.yml) do not exist. in assert() (line 73 of /var/www/html/core/lib/Drupal/Core/Extension/Extension.php). [warning] Drush command terminated abnormally. Failed to run drush cr: exit status 1
I don't think this meets the criteria for Major status β . This isn't caused by normal use of the site and the workaround is to leave the module in the existing directly.
- Status changed to Active
over 1 year ago 12:25am 3 August 2023 - π¬π§United Kingdom joachim
> the workaround is to leave the module in the existing directly
Not doing the thing you want to do does not count as a workaround!
And it's not uncommon for a module to start life in /custom, and then get released as a contrib project and end up in /contrib.
- π³πΏNew Zealand quietone
@joachim, yes. I seem to have not typed what I was thinking. The workaround is as stated in the Issue Summary, to manually truncate the cache tables.
- π¨π¦Canada joseph.olstad
#36 drush updb -y; drush cr; didn't work for me.
I tried manually truncating all of thecache_[name]
tables and that didn't help either. - π¨π¦Canada joseph.olstad
I also tried uninstalling updb , cr, cr, updb, and re-installing the module , cr, updb , no difference, still same issue.
- π¨π¦Canada joseph.olstad
ok there are solutions above.
rebuilding cache (drush cr)
then restart:
apache2I also restarted:
php8.1-fpmafter restarting these service, the error went away.
- π¨πΏCzech Republic Bohus Ulrych Pilsen (Czechia)
In my case this was enough just reload PHP
service php8.2-fpm reload
- π·πΊRussia urix
I finally found a way to safely move working modules to 'contrib' folder.
It's not possible to restart apache in my working environment, and 'drush cr' is not enough to tell Drupal that module is another place.
I can't control APC cache.
So there's a workaround:1. Uncomment
$settings['class_loader_auto_detect'] = FALSE;
string in settings.php, which disables APC cache detection.
2. Delete module's folder from 'modules'
3. Install module via Composer
4. 'drush cr'
5. You're done, module works without data loss!I've transferred Paragraphs and Entity Reference Revisions this way.
- π©π°Denmark ressa Copenhagen
Fantastic, thanks for sharing @urix!
It would be awesome if you could add it under "You moved the module inside your Drupal installation" on How to fix "The following module is missing from the file system..." warning messages β .
- π·πΊRussia urix
@ressa, I've posted solution there.
Thanks for your suggestion. - π©π°Denmark ressa Copenhagen
Thanks! But I meant that you should edit the page. I have now added a resumΓ© under "You moved the module inside your Drupal installation" on How to fix "The following module is missing from the file system..." warning messages β .
- πΊπΈUnited States lrjanda
Thanks for this fix. Very helpful! Uncommented class_loader_auto_detect in the settings.php, removed the module's folder, added it back, and ran drush to rebuild the site's cache.