InvalidArgumentException: The timestamp must be numeric

Created on 7 February 2025, about 1 month ago

Problem/Motivation

InvalidArgumentException: The timestamp must be numeric.

  at /home/app/web/core/lib/Drupal/Component/Datetime/DateTimePlus.php:207
  at Drupal\Component\Datetime\DateTimePlus::createFromTimestamp()
     (/home/app/web/core/lib/Drupal/Core/Datetime/DateFormatter.php:121)
  at Drupal\Core\Datetime\DateFormatter->format()
     (/home/app/web/modules/contrib/trash/src/Controller/TrashController.php:200)
  at Drupal\trash\Controller\TrashController->buildRow()
     (/home/app/web/modules/contrib/trash/src/Controller/TrashController.php:95)
  at Drupal\trash\Controller\TrashController->render()
     (/home/app/web/modules/contrib/trash/src/Controller/TrashController.php:65)
  at Drupal\trash\Controller\TrashController->Drupal\trash\Controller\{closure}()
     (/home/app/web/modules/contrib/trash/src/TrashManager.php:136)
  at Drupal\trash\TrashManager->executeInTrashContext()
     (/home/app/web/modules/contrib/trash/src/Controller/TrashController.php:64)
  at Drupal\trash\Controller\TrashController->listing()
  at call_user_func_array()
     (/home/app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:123)
  at Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
     (/home/app/web/core/lib/Drupal/Core/Render/Renderer.php:638)
  at Drupal\Core\Render\Renderer->executeInRenderContext()
     (/home/app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:121)
  at Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
     (/home/app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:97)
  at Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
     (/home/app/vendor/symfony/http-kernel/HttpKernel.php:181)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (/home/app/vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (/home/app/web/core/lib/Drupal/Core/StackMiddleware/Session.php:53)
  at Drupal\Core\StackMiddleware\Session->handle()
     (/home/app/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php:48)
  at Drupal\Core\StackMiddleware\KernelPreHandle->handle()
     (/home/app/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php:28)
  at Drupal\Core\StackMiddleware\ContentLength->handle()
     (/home/app/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php:32)
  at Drupal\big_pipe\StackMiddleware\ContentLength->handle()
     (/home/app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php:116)
  at Drupal\page_cache\StackMiddleware\PageCache->pass()
     (/home/app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php:90)
  at Drupal\page_cache\StackMiddleware\PageCache->handle()
     (/home/app/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php:48)
  at Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
     (/home/app/web/modules/contrib/tracer/src/StackMiddleware/TracesMiddleware.php:38)
  at Drupal\tracer\StackMiddleware\TracesMiddleware->handle()
     (/home/app/web/modules/contrib/webprofiler/src/StackMiddleware/WebprofilerMiddleware.php:42)
  at Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware->handle()
     (/home/app/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php:51)
  at Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
     (/home/app/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php:36)
  at Drupal\Core\StackMiddleware\AjaxPageState->handle()
     (/home/app/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php:51)
  at Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
     (/home/app/web/core/lib/Drupal/Core/DrupalKernel.php:741)
  at Drupal\Core\DrupalKernel->handle()
     (/home/app/web/index.php:19)

Steps to reproduce

  1. Generate nodes using the devel_generate module
  2. Delete Nodes
  3. Go to the /admin/content/trash page

Proposed resolution

The attachment contains a small patch that solves the problem.

🐛 Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

🇷🇺Russia 6RUN0

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

Comments & Activities

Production build 0.71.5 2024