- Status changed to Postponed: needs info
almost 2 years ago 10:12am 1 February 2023 - Status changed to Fixed
over 1 year ago 8:28am 13 July 2023 Automatically closed - issue fixed for 2 weeks with no activity.
Hello,
I'm trying to modify a Smart Date field "end date" after a node has been saved and the following error shows up:
The website encountered an unexpected error. Please try again later.
AssertionError: Cannot load the "smart_date_format" entity with NULL ID. in assert() (line 295 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).
assert(, 'Cannot load the "smart_date_format" entity with NULL ID.') (Line: 295)
Drupal\Core\Entity\EntityStorageBase->load(NULL) (Line: 483)
Drupal\smart_date_recur\Plugin\Field\FieldFormatter\SmartDateRecurrenceFormatter::loadSmartDateFormat(NULL) (Line: 161)
smart_date_recur_tokens('field_nota_interval_data', Array, Array, Array, Object)
call_user_func_array(Object, Array) (Line: 426)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'smart_date_recur') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('tokens', Object) (Line: 433)
Drupal\Core\Extension\ModuleHandler->invokeAll('tokens', Array) (Line: 357)
Drupal\Core\Utility\Token->generate('field_nota_interval_data', Array, Array, Array, Object) (Line: 331)
Drupal\eca\Token\ContribToken->generate('field_nota_interval_data', Array, Array, Array, Object) (Line: 1779)
field_tokens('entity', Array, Array, Array, Object)
call_user_func_array(Object, Array) (Line: 426)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'field') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('tokens', Object) (Line: 433)
Drupal\Core\Extension\ModuleHandler->invokeAll('tokens', Array) (Line: 357)
Drupal\Core\Utility\Token->generate('entity', Array, Array, Array, Object) (Line: 331)
Drupal\eca\Token\ContribToken->generate('entity', Array, Array, Array, Object) (Line: 1057)
token_tokens('node', Array, Array, Array, Object)
call_user_func_array(Object, Array) (Line: 426)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'token') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('tokens', Object) (Line: 433)
Drupal\Core\Extension\ModuleHandler->invokeAll('tokens', Array) (Line: 357)
Drupal\Core\Utility\Token->generate('node', Array, Array, Array, Object) (Line: 331)
Drupal\eca\Token\ContribToken->generate('node', Array, Array, Array, Object) (Line: 239)
Drupal\Core\Utility\Token->doReplace(1, '[node:field_nota_interval_data:end_value]', Array, Array, Object) (Line: 189)
Drupal\Core\Utility\Token->replace('[node:field_nota_interval_data:end_value]', Array, Array, NULL) (Line: 340)
Drupal\eca\Token\ContribToken->replace('[node:field_nota_interval_data:end_value]', Array, Array, NULL) (Line: 135)
Drupal\eca\Token\TokenServices->replace('[node:field_nota_interval_data:end_value]') (Line: 24)
Drupal\eca_content\Plugin\Action\SetFieldValue->getFieldsToUpdate() (Line: 456)
Drupal\eca_content\Plugin\Action\FieldUpdateActionBase->access(Object, NULL, 1) (Line: 99)
Drupal\eca\Entity\Objects\EcaAction->execute(Object, Object, Array) (Line: 188)
Drupal\eca\Processor->executeSuccessors(Object, Object, Object, Array) (Line: 190)
Drupal\eca\Processor->executeSuccessors(Object, Object, Object, Array) (Line: 146)
Drupal\eca\Processor->execute(Object, 'eca.content_entity.update') (Line: 76)
Drupal\eca\EventSubscriber\EcaBase->onEvent(Object, 'eca.content_entity.update', Object)
call_user_func(Array, Object, 'eca.content_entity.update', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'eca.content_entity.update') (Line: 73)
Drupal\eca\Event\TriggerEvent->dispatchFromPlugin('content_entity:update', Object, Object) (Line: 297)
Drupal\eca_content\HookHandler->update(Object) (Line: 97)
eca_content_entity_update(Object)
call_user_func_array(Object, Array) (Line: 426)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'eca_content') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('entity_update', Object) (Line: 433)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_update', Array) (Line: 251)
Drupal\Core\Entity\EntityStorageBase->invokeHook('update', Object) (Line: 903)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('update', Object) (Line: 598)
Drupal\Core\Entity\EntityStorageBase->doPostSave(Object, 1) (Line: 784)
Drupal\Core\Entity\ContentEntityStorageBase->doPostSave(Object, 1) (Line: 523)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 804)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 195)
auto_entitylabel_entity_insert(Object)
call_user_func_array(Object, Array) (Line: 426)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'auto_entitylabel') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('entity_insert', Object) (Line: 433)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_insert', Array) (Line: 251)
Drupal\Core\Entity\EntityStorageBase->invokeHook('insert', Object) (Line: 903)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('insert', Object) (Line: 598)
Drupal\Core\Entity\EntityStorageBase->doPostSave(Object, ) (Line: 784)
Drupal\Core\Entity\ContentEntityStorageBase->doPostSave(Object, ) (Line: 523)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 804)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 270)
Drupal\node\NodeForm->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: 595)
Drupal\Core\Form\FormBuilder->processForm('node_nota_form', Array, Object) (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
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: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
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: 707)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
The action I'm using is very simple as you can see in the attached images. The event is Update Content Entity, after that the entity is loaded in the current scope and saved in the token system and the final step is Entity Set Field Value. As method I tried all the options without success.
Cardinality of the field is 1.
Thank you~
Fixed
1.1
Miscellaneous
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Automatically closed - issue fixed for 2 weeks with no activity.