欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

Drupal 从8.1升级的错误

Semantical Error] The class Error
 
 
  • 创建时间

    2月15日
  • 最后回复

    2月18日
  • 15

    回复

  • 143

    浏览

  • 2

    用户

  • 2

    链接

搜搜那个错误,应该不大影响使用。网站可以正常打开吗?

 
 

Commerce 需要 8.2 以上的 Drupal。重新安装一下 Drupal 吧。

 
 
[root@iZu16aahwnjZ web]# drush en commerce -y
The following extensions will be enabled: commerce, inline_entity_form, entity, address
Do you really want to continue? (y/n): y
exception 'Doctrine\Common\Annotations\AnnotationException' with message '[Semantical Error] The class "Drupal\Core\Entity\Annotation\ConfigEntityType"  [error]
is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation to the _class_ doc comment
of "Drupal\Core\Entity\Annotation\ConfigEntityType". If it is indeed no annotation, then you need to add @IgnoreAnnotation("ConfigEntityType") to the
_class_ doc comment of class Drupal\address\Entity\Zone.' in
/home/wwwroot/LNMP/domain/web.yunmoban.me/web/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php:54
Stack trace:
#0 /home/wwwroot/LNMP/domain/web.yunmoban.me/web/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php(727):
Doctrine\Common\Annotations\AnnotationException::semanticalError('The class "Drup...')
#1 /home/wwwroot/LNMP/domain/web.yunmoban.me/web/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php(641):
Doctrine\Common\Annotations\DocParser->Annotation()
#2 /home/wwwroot/LNMP/domain/web.yunmoban.me/web/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php(334):
Doctrine\Common\Annotations\DocParser->Annotations()
#3 /home/wwwroot/LNMP/domain/web.yunmoban.me/web/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php(67):
Doctrine\Common\Annotations\DocParser->parse('/**\n * Defines ...', 'class Drupal\\ad...')
#4 /home/wwwroot/LNMP/domain/web.yunmoban.me/web/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php(91):
Doctrine\Common\Annotations\SimpleAnnotationReader->getClassAnnotations(Object(Doctrine\Common\Reflection\StaticReflectionClass))
#5 /home/wwwroot/LNMP/domain/web.yunmoban.me/web/core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php(144):
Doctrine\Common\Annotations\SimpleAnnotationReader->getClassAnnotation(Object(Doctrine\Common\Reflection\StaticReflectionClass), 'Drupal\\Core\\Ent...')
#6 /home/wwwroot/LNMP/domain/web.yunmoban.me/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(106):
Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
#7 /home/wwwroot/LNMP/domain/web.yunmoban.me/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(175):
Drupal\Core\Entity\EntityTypeManager->findDefinitions()
#8 /home/wwwroot/LNMP/domain/web.yunmoban.me/web/core/lib/Drupal/Core/Entity/EntityManager.php(485):
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#9 /home/wwwroot/LNMP/domain/web.yunmoban.me/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php(217):
Drupal\Core\Entity\EntityManager->getDefinitions()
#10 /home/wwwroot/LNMP/domain/web.yunmoban.me/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83):
Drupal\Core\Extension\ModuleInstaller->install(Array, true)
#11 /root/.composer/vendor/drush/drush/commands/core/drupal/environment.inc(131): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, true)
#12 /root/.composer/vendor/drush/drush/commands/core/drupal/environment.inc(198): drush_module_install(Array)
#13 /root/.composer/vendor/drush/drush/commands/pm/pm.drush.inc(1167): drush_module_enable(Array)
#14 [internal function]: drush_pm_enable('commerce')
#15 /root/.composer/vendor/drush/drush/includes/command.inc(366): call_user_func_array('drush_pm_enable', Array)
#16 /root/.composer/vendor/drush/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array)
#17 [internal function]: drush_command('commerce')
#18 /root/.composer/vendor/drush/drush/includes/command.inc(185): call_user_func_array('drush_command', Array)
#19 /root/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#20 /root/.composer/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#21 /root/.composer/vendor/drush/drush/drush.php(12): drush_main()
#22 {main}
 
报一下你的服务器的配置,PHP 版本,安装的扩展,MySQL 的版本。
 
 
来自 https://talk.ninghao.net/t/drupal-8-1/4804

普通分类: