Drupal 8配置错误

时间:2016-12-22 15:38:41

标签: drupal-8

我卸载了几个模块。

    ~/apps/drupal/htdocs/modules$ drush pm-uninstall relaxed
    The following extensions will be uninstalled: relaxed
    Do you really want to continue? (y/n): y
    relaxed was successfully uninstalled.                                                                                                      [ok]
    bitnami@ip-172-26-15-109:~/apps/drupal/htdocs/modules$ drush pm-uninstall replication
    The following extensions will be uninstalled: replication
    Do you really want to continue? (y/n): y
    replication was successfully uninstalled.                                                                                                  [ok]
    bitnami@ip-172-26-15-109:~/apps/drupal/htdocs/modules$ drush pm-uninstall multiversion
    The following extensions will be uninstalled: multiversion
    Do you really want to continue? (y/n): y
    multiversion was successfully uninstalled.
    bitnami@ip-172-26-15-109:~/apps/drupal/htdocs/modules$ drush pm-uninstall views_rest_feed
    The following extensions will be uninstalled: views_rest_feed
    Do you really want to continue? (y/n): y
    views_rest_feed was successfully uninstalled.

现在我看到了错误。 我看到以下错误,我该如何处理? 实体/字段定义不匹配的实体和/或字段定义 在实体类型和字段定义中检测到以下更改。 评论

The Comment entity type needs to be updated.

文件

The File entity type needs to be updated.

内容

The Revision ID field needs to be installed.
The UUID field needs to be updated.

快捷方式链接

The UUID field needs to be updated.

分类术语

The Taxonomy term entity type needs to be updated.

用户

The UUID field needs to be updated.

自定义菜单链接

The Custom menu link entity type needs to be updated.

    Running drush entity-updates gives
    The following updates are pending:

    comment entity type : 
      The Comment entity type needs to be updated.
    file entity type : 
      The File entity type needs to be updated.
    node entity type : 
      The Revision ID field needs to be installed.
      The UUID field needs to be updated.
    shortcut entity type : 
      The UUID field needs to be updated.
    taxonomy_term entity type : 
      The Taxonomy term entity type needs to be updated.
    user entity type : 
      The UUID field needs to be updated.
    menu_link_content entity type : 
      The Custom menu link entity type needs to be updated.



    Do you wish to run all pending updates? (y/n): y
    Drupal\Core\Entity\EntityStorageException: The SQL storage cannot change the schema for an existing entity type (comment) with data. in    [error]
    Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->onEntityTypeUpdate() (line 303 of
    /opt/bitnami/apps/drupal/htdocs/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php).
    Failed: Drupal\Core\Entity\EntityStorageException: !message in                                                                             [error]
    Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->onEntityTypeUpdate() (line 303 of
    /opt/bitnami/apps/drupal/htdocs/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php).
    Cache rebuild complete.                                                                                                                    [ok]
    Finished performing updates.    


    drush watchdog-show
     ID   Date          Type      Severity  Message                                                                                               
     147  22/Dec 15:57  php       error     Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 
                                            'base_table.vid' in 'field list': SELECT base_table.vid AS vid, base_table.nid AS nid                 

     146  22/Dec 15:57  php       error     Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 
                                            'base_table.vid' in 'field list': SELECT base_table.vid AS vid, base_table.nid AS nid                 

     145  22/Dec 15:57  cron      notice    Cron run completed.                                                                                   
     144  22/Dec 15:57  cron      notice    Execution of update_cron() took 9.97ms.                                                               
     143  22/Dec 15:57  cron      notice    Starting execution of update_cron(), execution of system_cron() took 15.01ms.                         
     142  22/Dec 15:57  cron      notice    Starting execution of system_cron(), execution of search_cron() took 4.15ms.                          
     141  22/Dec 15:57  cron      notice    Starting execution of search_cron(), execution of node_cron() took 30.37ms.                           
     140  22/Dec 15:57  cron      notice    Starting execution of node_cron(), execution of history_cron() took 1.82ms.                           
     139  22/Dec 15:57  cron      notice    Starting execution of history_cron(), execution of file_cron() took 11.11ms.                          
     138  22/Dec 15:57  cron      notice    Starting execution of file_cron(), execution of field_cron() took 3.38ms.

同时访问http://ipaddress/admin/modules/uninstall会给出

    The website encountered an unexpected error. Please try again later.

Apache错误日志显示

    [Thu Dec 22 15:06:52.683333 2016] [core:notice] [pid 13291:tid 139826185398080] AH00094: Command line: '/opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf'
    [Thu Dec 22 15:06:58.953491 2016] [proxy_fcgi:error] [pid 13300:tid 139825856366336] [client 123.201.127.176:49572] AH01071: Got error 'PHP message: PHP Fatal error:  Call to a member function id() on null in /opt/bitnami/apps/drupal/htdocs/modules/multiversion/src/WorkspaceCacheContext.php on line 44\n'
    [Thu Dec 22 15:12:39.540744 2016] [proxy_fcgi:error] [pid 13299:tid 139825386374912] [client 123.201.127.176:49808] AH01071: Got error 'PHP message: Uncaught PHP Exception Drupal\\Core\\Database\\DatabaseExceptionWrapper: "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision.revision_id' in 'field list': SELECT revision.revision_id AS revision_id, revision.langcode AS langcode, revision.revision_log AS revision_log, base.id AS id, base.type AS type, base.uuid AS uuid, CASE base.revision_id WHEN revision.revision_id THEN 1 ELSE 0 END AS isDefaultRevision\nFROM \n{block_content} base\nINNER JOIN {block_content_revision} revision ON revision.revision_id = base.revision_id; Array\n(\n)\n" at /opt/bitnami/apps/drupal/htdocs/core/lib/Drupal/Core/Database/Connection.php line 671\n'
    [Thu Dec 22 15:14:41.556451 2016] [proxy_fcgi:error] [pid 13299:tid 139825428338432] [client 123.201.127.176:49828] AH01071: Got error 'PHP message: Uncaught PHP Exception Drupal\\Core\\Database\\DatabaseExceptionWrapper: "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision.revision_id' in 'field list': SELECT revision.revision_id AS revision_id, revision.langcode AS langcode, revision.revision_log AS revision_log, base.id AS id, base.type AS type, base.uuid AS uuid, CASE base.revision_id WHEN revision.revision_id THEN 1 ELSE 0 END AS isDefaultRevision\nFROM \n{block_content} base\nINNER JOIN {block_content_revision} revision ON revision.revision_id = base.revision_id; Array\n(\n)\n" at /opt/bitnami/apps/drupal/htdocs/core/lib/Drupal/Core/Database/Connection.php line 671\n'

我正在使用AWS lightsail bitnami drupal实例。

1 个答案:

答案 0 :(得分:0)

尝试访问数据库并截断所有以cache_开头的表。这是我面对这样一个问题后会做的事情。卸载过程可能会在清除缓存之前崩溃,缓存仍然引用已删除的字段(在模块卸载期间已删除)。