Error: Call to undefined method Drupal\block_content\Entity\BlockContent::getTitle() in Drupal\cyberimpact\Plugin\Field\FieldType\CyberimpactMailoutFieldItem->mailout() (line 156 of modules/contrib/cyberimpact/src/Plugin/Field/FieldType/CyberimpactMailout

Created on 20 April 2022, about 2 years ago
Updated 5 April 2023, over 1 year ago

Problem/Motivation

After activating the module cyberimpact and apply the good api key. We defined a specific block to be able to use the module feature.

Steps to reproduce

When injecting the block in the layout and then save the layout , we have this error.

The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\block_content\Entity\BlockContent::getTitle() in Drupal\cyberimpact\Plugin\Field\FieldType\CyberimpactMailoutFieldItem->mailout() (line 156 of modules/contrib/cyberimpact/src/Plugin/Field/FieldType/CyberimpactMailoutFieldItem.php).
Drupal\cyberimpact\Plugin\Field\FieldType\CyberimpactMailoutFieldItem->mailout() (Line: 146)
Drupal\cyberimpact\Plugin\Field\FieldType\CyberimpactMailoutFieldItem->postSave()
call_user_func_array(Array, Array) (Line: 233)
Drupal\Core\Field\FieldItemList->delegateMethod('postSave', ) (Line: 198)
Drupal\Core\Field\FieldItemList->postSave()
call_user_func_array(Array, Array) (Line: 935)
Drupal\Core\Entity\ContentEntityStorageBase->invokeFieldMethod('postSave', Object, ) (Line: 967)
Drupal\Core\Entity\ContentEntityStorageBase->invokeFieldPostSave(Object, ) (Line: 889)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('insert', Object) (Line: 602)
Drupal\Core\Entity\EntityStorageBase->doPostSave(Object, ) (Line: 782)
Drupal\Core\Entity\ContentEntityStorageBase->doPostSave(Object, ) (Line: 527)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 802)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 291)
Drupal\layout_builder\Plugin\Block\InlineBlock->saveBlockContent(1, 1) (Line: 255)
Drupal\layout_builder\InlineBlockEntityOperations->saveInlineBlockComponent(Object, Object, 1, 1) (Line: 171)
Drupal\layout_builder\InlineBlockEntityOperations->handlePreSave(Object) (Line: 206)
layout_builder_entity_presave(Object)
call_user_func_array('layout_builder_entity_presave', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_presave', Array) (Line: 251)
Drupal\Core\Entity\EntityStorageBase->invokeHook('presave', Object) (Line: 897)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('presave', Object) (Line: 567)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 754)
Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object) (Line: 521)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 802)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 285)
Drupal\Core\Entity\EntityForm->save(Array, Object) (Line: 177)
Drupal\layout_builder\Form\OverridesEntityForm->save(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 592)
Drupal\Core\Form\FormBuilder->processForm('node_page_layout_builder_form', Array, Object) (Line: 320)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object) (Line: 39)
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024