我有一个测试模块位于网站/所有/模块/自定义下。首先,我卸载了模块,清除了缓存。然后,我将测试模块移到模块/自定义文件夹中,这是放置Drupal 8模块的新位置。
之后,我启用了测试模块,然后清除所有缓存。现在,Drupal 8说无法找到旧位置下的测试模块(站点/all/modules/定制)。
我认为Drupal 8可能将路径存储在DB表中,但我无法找到该表。谁能说出如何解决上述问题的解决方案?
发布于 2016-10-06 16:41:11
我在将一个模块从custom升级到contrib时也遇到了同样的问题。对我来说,关键是清除(APC)自动加载器缓存和Drupal缓存。
我想我最终卸载了模块drush cr,然后强制自动加载器缓存失效(通过将该文件粘贴到webroot并将浏览器指向它):
<?php apc_clear_cache();
接下来是另一个drush cr,以获得良好的度量,然后最终重新启用该模块。
以下是万神殿关于APC的一些背景介绍:https://pantheon.io/docs/alternative-php-cache/
发布于 2016-01-07 08:06:31
不需要重新安装,移动模块后的缓存就足够了.如果没有,那么你可能真的没有清除这些缓存?
发布于 2019-12-14 15:22:34
您可以添加到您的settings.local.php
$settings['deployment_identifier'] = 'ANY CUSTOM STRING';acquia/blt使用它来清除容器缓存。根据编码中的blt文档:
/**
* Deployment identifier.
*
* Drupal's dependency injection container will be automatically invalidated and
* rebuilt when the Drupal core version changes. When updating contributed or
* custom code that changes the container, changing this identifier will also
* allow the container to be invalidated as soon as code is deployed.
*/https://drupal.stackexchange.com/questions/185958
复制相似问题