问题描述
我有一个Drupal 8.9.6站点,其中有Gutenberg 8.x-1.11和Webform 8.x-5.20。 当我们去编辑一个现有的Webform元素或添加一个新元素时,会出现以下错误:
Error: Call to undefined method Drupal\webform\Entity\Webform::getFields() in gutenberg_entity_presave() (line 621 of /code/web/modules/contrib/gutenberg/gutenberg.module)
#0 [internal function]: gutenberg_entity_presave(Object(Drupal\webform\Entity\Webform),'webform')
#1 /code/web/core/lib/Drupal/Core/Extension/ModuleHandler.PHP(403): call_user_func_array('gutenberg_entit...',Array)
#2 /code/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.PHP(349): Drupal\Core\Extension\ModuleHandler->invokeAll('entity_presave',Array)
#3 /code/web/core/lib/Drupal/Core/Entity/EntityStorageBase.PHP(500): Drupal\Core\Config\Entity\ConfigEntityStorage->invokeHook('presave',Object(Drupal\webform\Entity\Webform))
#4 /code/web/core/lib/Drupal/Core/Entity/EntityStorageBase.PHP(454): Drupal\Core\Entity\EntityStorageBase->doPreSave(Object(Drupal\webform\Entity\Webform))
#5 /code/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.PHP(263): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\webform\Entity\Webform))
#6 /code/web/modules/contrib/webform/src/WebformEntityStorage.PHP(133): Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object(Drupal\webform\Entity\Webform))
#7 /code/web/core/lib/Drupal/Core/Entity/EntityBase.PHP(395): Drupal\webform\WebformEntityStorage->save(Object(Drupal\webform\Entity\Webform))
#8 /code/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.PHP(616): Drupal\Core\Entity\EntityBase->save()
#9 /code/web/modules/contrib/webform/modules/webform_ui/src/Form/WebformUiElementDeleteForm.PHP(217): Drupal\Core\Config\Entity\ConfigEntityBase->save()
#10 [internal function]: Drupal\webform_ui\Form\WebformUiElementDeleteForm->submitForm(Array,Object(Drupal\Core\Form\FormState))
#11 /code/web/core/lib/Drupal/Core/Form/FormSubmitter.PHP(114): call_user_func_array(Array,Array)
#12 /code/web/core/lib/Drupal/Core/Form/FormSubmitter.PHP(52): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array,Object(Drupal\Core\Form\FormState))
#13 /code/web/core/lib/Drupal/Core/Form/FormBuilder.PHP(593): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array,Object(Drupal\Core\Form\FormState))
#14 /code/web/core/lib/Drupal/Core/Form/FormBuilder.PHP(321): Drupal\Core\Form\FormBuilder->processForm('webform_ui_elem...',Array,Object(Drupal\Core\Form\FormState))
#15 /code/web/core/lib/Drupal/Core/Controller/FormController.PHP(91): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\webform_ui\Form\WebformUiElementDeleteForm),Object(Drupal\Core\Form\FormState))
#16 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request),Object(Drupal\Core\Routing\RouteMatch))
#17 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.PHP(123): call_user_func_array(Array,Array)
#18 /code/web/core/lib/Drupal/Core/Render/Renderer.PHP(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#19 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.PHP(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext),Object(Closure))
#20 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.PHP(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array,Array)
#21 /code/vendor/symfony/http-kernel/HttpKernel.PHP(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#22 /code/vendor/symfony/http-kernel/HttpKernel.PHP(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request),1)
#23 /code/web/core/lib/Drupal/Core/StackMiddleware/Session.PHP(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request),1,true)
#24 /code/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.PHP(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request),true)
#25 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.PHP(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request),true)
#26 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.PHP(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request),true)
#27 /code/vendor/asm89/stack-cors/src/Asm89/Stack/Cors.PHP(49): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request),true)
#28 /code/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.PHP(47): Asm89\Stack\Cors->handle(Object(Symfony\Component\HttpFoundation\Request),true)
#29 /code/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.PHP(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request),true)
#30 /code/vendor/stack/builder/src/Stack/StackedHttpKernel.PHP(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request),true)
#31 /code/web/core/lib/Drupal/Core/DrupalKernel.PHP(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request),true)
#32 /code/web/index.PHP(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#33 {main}
我试图在drupal.org上创建一个帐户,但是我的请求被阻止了。 对为什么会发生这种情况有任何想法吗?我是否应该在开发站点上尝试两者的Alpha版本,看看是否可以解决?我没有尝试直接编辑模块。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)