InvalidArgumentException: The timestamp must be numeric

Created on 7 February 2025, 3 months 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

  • Issue created by @6RUN0
  • 🇷🇴Romania amateescu

    I can't reproduce this problem. How are you deleting the nodes in step 2?

  • 🇷🇺Russia 6RUN0

    I can't tell you exactly how I removed the nodes. The devel_generate module may have already created such a node. I didn't check it much.
    I just had to solve the problem. Sorry I can't take more time to find out the real reason.

  • 🇷🇴Romania amateescu

    No worries, we'll have to see if this problem comes up again in the future.

  • Status changed to Active 22 days ago
  • 🇩🇪Germany c-logemann Frankfurt/M, Germany

    Our customer just got the same problem. I will report when I found out more.

  • 🇩🇪Germany c-logemann Frankfurt/M, Germany

    I just wanted to test the patch on a cloned system but there the error was gone. The clone does not include caching information which would be very hard because of redis. So I just did a cache rebuild on the productive system and the error is gone.
    My first plan was to hopefully repair the prod system with the patch and trying to switch between patched and unpatched code and analyze the two nodes in the trash list. But now it seems that the problem is more complex. Maybe this report helps others to understand a little bit more.

Production build 0.71.5 2024