Node preview button broken when date is set for EQSF

Created on 3 February 2023, almost 2 years ago

1. Attach the EQSF field to one of your content types.
2. Create a new node and fill the dates on the EQSF form
3. Click on node "Preview"
4. Click on "Back to content editing"
-> You will get an error:

The website encountered an unexpected error. Please try again later.
TypeError: date(): Argument #2 ($timestamp) must be of type ?int, Drupal\Core\Datetime\DrupalDateTime given in date() (line 60 of modules/contrib/eqsf/src/Plugin/Field/FieldWidget/EqsfWidget.php).
date() (Line: 60)
Drupal\eqsf\Plugin\Field\FieldWidget\EqsfWidget->formElement() (Line: 353)
Drupal\Core\Field\WidgetBase->formSingleElement() (Line: 220)
Drupal\Core\Field\WidgetBase->formMultipleElements() (Line: 111)
Drupal\Core\Field\WidgetBase->form() (Line: 181)
Drupal\Core\Entity\Entity\EntityFormDisplay->buildForm() (Line: 121)
Drupal\Core\Entity\ContentEntityForm->form() (Line: 127)
Drupal\node\NodeForm->form() (Line: 106)
Drupal\Core\Entity\EntityForm->buildForm()
call_user_func_array() (Line: 531)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 278)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)
🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇩🇪Germany vistree

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

Comments & Activities

Production build 0.71.5 2024