【问题标题】:Drupal Module is missing after Drupal upgradeDrupal 升级后 Drupal 模块丢失
【发布时间】:2021-03-09 01:26:34
【问题描述】:

我对 Drupal 很陌生。我在 Red Hat Linux 上有一个正在运行的网站。我按照以下步骤升级到 8.9.9 https://www.drupal.org/docs/updating-drupal/updating-drupal-core-manually。总之我做到了,

Select all the files in the top-level directory (also hidden files starting with a dot) as well as
 the 'core' and 'vendor' directories, and delete them. Be sure not to delete the 'modules', 
'profiles', 'sites', and 'themes' directories.

现在当我按照所有步骤运行 update.php 时,我得到了,

Symfony\Component\DependencyInjection\Exception\LogicException: Service
 'dzango.twig.truncate_extension' for consumer 'twig' does not implement 
Twig\Extension\ExtensionInterface. in Drupal\Core\DependencyInjection\Compiler\TaggedHandlersPass->processServiceCollectorPass()
 (line 164 of /var/www/html/add-main/core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php).
    
    Drupal\Core\DependencyInjection\Compiler\TaggedHandlersPass->processServiceCollectorPass(Array, 'twig', Object) (Line: 97)
    Drupal\Core\DependencyInjection\Compiler\TaggedHandlersPass->process(Object) (Line: 140)
    Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object) (Line: 789)
    Symfony\Component\DependencyInjection\ContainerBuilder->compile() (Line: 1335)
    Drupal\Core\DrupalKernel->compileContainer() (Line: 916)
    Drupal\Core\DrupalKernel->initializeContainer() (Line: 477)
    Drupal\Core\DrupalKernel->boot() (Line: 707)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

我发现升级后这些东西不见了,

升级后是否需要运行一些 composer 命令?

【问题讨论】:

    标签: drupal drupal-8


    【解决方案1】:

    试试这个代码来更新所有的包

    composer update -vvv
    

    【讨论】:

      【解决方案2】:

      我认为升级文档https://www.drupal.org/docs/updating-drupal/updating-drupal-core-manually 遗漏了非常重要的部分。从 composer.json 带来更改后,永远不要忘记运行 composer install/update/require。我没有手动将我的所有更改从我的 composer.json 带到新的,而是使用我需要的包运行 composer require mypackage 并且它起作用了。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2017-04-02
        • 1970-01-01
        • 1970-01-01
        • 2011-06-22
        • 1970-01-01
        • 1970-01-01
        • 2018-08-22
        相关资源
        最近更新 更多