- 🇧🇪Belgium fernly
Issue still occurs when trying to use the batch update. Using version 8.x-2.0-beta12 and Drupal core 10.2.4.
// Steps to reproduce
This error occurs when a block is saved, or the block layout page is saved.
// Expected behavior
I expected the block to save and the layout page to reload with the updated block.
// What happened
After saving a block (basic block) I got the error below. When I reload the page I see that the block was created and placed into the correct region, but the weight is always set to zero. Adjusting the weight is not possible through the UI because it errors and never updates the weight. I was able to change the block weight manually through config while testing.
The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">LogicException</em>: Getting the base fields is not supported for entity type Block. in <em class="placeholder">Drupal\Core\Entity\EntityFieldManager->buildBaseFieldDefinitions()</em> (line <em class="placeholder">209</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/EntityFieldManager.php</em>). <pre class="backtrace">Drupal\Core\Entity\EntityFieldManager->getBaseFieldDefinitions('block') (Line: 330)
Drupal\Core\Entity\EntityFieldManager->getFieldDefinitions('block', 'block') (Line: 223)
Drupal\entity_usage\EntityUsageTrackBase->getReferencingFields(Object, Array) (Line: 164)
Drupal\entity_usage\EntityUsageTrackBase->trackOnEntityUpdate(Object) (Line: 115)
Drupal\entity_usage\EntityUpdateManager->trackUpdateOnEdition(Object) (Line: 41)
entity_usage_entity_update(Object, 'block')
call_user_func_array('entity_usage_entity_update', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_update', Array) (Line: 349)
Drupal\Core\Config\Entity\ConfigEntityStorage->invokeHook('update', Object) (Line: 535)
Drupal\Core\Entity\EntityStorageBase->doPostSave(Object, 1) (Line: 460)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 263)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 394)
Drupal\Core\Entity\EntityBase->save() (Line: 613)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 381)
Drupal\block\BlockListBuilder->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 590)
Drupal\Core\Form\FormBuilder->processForm('block_admin_display_form', Array, Object) (Line: 319)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 217)
Drupal\Core\Form\FormBuilder->getForm(Object) (Line: 116)
Drupal\block\BlockListBuilder->render('example', Object) (Line: 60)
Drupal\block\Controller\BlockListController->listing('example', Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
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: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
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: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
</pre>
// Some related notes
I had a few broken blocks lingering for a while but I deleted then recreated them and removed all the offending block config. The broken block log messages cleared up but the error persists.
Fixed
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Issue still occurs when trying to use the batch update. Using version 8.x-2.0-beta12 and Drupal core 10.2.4.