Closed (fixed)
Project:
Smart Date
Version:
3.3.0-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Apr 2021 at 10:57 UTC
Updated:
13 Jul 2021 at 21:34 UTC
Jump to comment: Most recent
Smart Date with Duration in Layout builder causes endless loop
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in /Users/martin/Sites/drupal9/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php on line 174
I will add that I tried to use devel_debug_log to output the contents of $this->cacheKey in DefaultPluginManager.php just before line 174, and then got an error that devel_debug_log had run out of memory.
As mentioned in a comment, using Layout Builder with the default formatter appears to work as expected.
Original post included the following details:
Setting the Formatter to "Smarte Date with Duration" and Comact or default Date Format gives:
Error: Maximum function nesting level of '1024' reached, aborting! in Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (line 172 of /../html/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php)
#0 /../html/core/lib/Drupal/Core/Config/TypedConfigManager.php(160): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#1 /../html/core/lib/Drupal/Core/Config/TypedConfigManager.php(200): Drupal\Core\Config\TypedConfigManager->getDefinitionWithReplacements()
#2 /../html/core/lib/Drupal/Core/Config/TypedConfigManager.php(165): Drupal\Core\Config\TypedConfigManager->getDefinition()
#3 /../html/core/lib/Drupal/Core/Config/TypedConfigManager.php(200): Drupal\Core\Config\TypedConfigManager->getDefinitionWithReplacements()
#4 /../html/core/lib/Drupal/Core/Config/TypedConfigManager.php(165): Drupal\Core\Config\TypedConfigManager->getDefinition()
#5 /../html/core/lib/Drupal/Core/Config/TypedConfigManager.php(200): Drupal\Core\Config\TypedConfigManager->getDefinitionWithReplacements()
#6 /../html/core/lib/Drupal/Core/Config/TypedConfigManager.php(165): Drupal\Core\Config\TypedConfigManager->getDefinition()
...
/../html/core/lib/Drupal/Core/Config/TypedConfigManager.php(105): Drupal\Core\Config\TypedConfigManager->getDefinitionWithReplacements()
#978 /../html/core/lib/Drupal/Core/Config/Schema/ArrayElement.php(153): Drupal\Core\Config\TypedConfigManager->buildDataDefinition()
#979 /../html/core/lib/Drupal/Core/Config/Schema/Mapping.php(26): Drupal\Core\Config\Schema\ArrayElement->buildDataDefinition()
#980 /../html/core/lib/Drupal/Core/Config/Schema/ArrayElement.php(37): Drupal\Core\Config\Schema\Mapping->getElementDefinition()
#981 /../html/core/lib/Drupal/Core/Config/Schema/ArrayElement.php(85): Drupal\Core\Config\Schema\ArrayElement->parse()
#982 /../html/core/lib/Drupal/Core/Config/Schema/ArrayElement.php(59): Drupal\Core\Config\Schema\ArrayElement->getElements()
#983 /../html/core/lib/Drupal/Core/Config/Schema/ArrayElement.php(65): Drupal\Core\Config\Schema\ArrayElement->get()
#984 /../html/core/lib/Drupal/Core/Config/StorableConfigBase.php(179): Drupal\Core\Config\Schema\ArrayElement->get()
#985 /../html/core/lib/Drupal/Core/Config/StorableConfigBase.php(211): Drupal\Core\Config\StorableConfigBase->castValue()
#986 /../html/core/lib/Drupal/Core/Config/StorableConfigBase.php(211): Drupal\Core\Config\StorableConfigBase->castValue()
#987 /../html/core/lib/Drupal/Core/Config/StorableConfigBase.php(211): Drupal\Core\Config\StorableConfigBase->castValue()
#988 /../html/core/lib/Drupal/Core/Config/StorableConfigBase.php(211): Drupal\Core\Config\StorableConfigBase->castValue()
#989 /../html/core/lib/Drupal/Core/Config/StorableConfigBase.php(211): Drupal\Core\Config\StorableConfigBase->castValue()
#990 /../html/core/lib/Drupal/Core/Config/StorableConfigBase.php(211): Drupal\Core\Config\StorableConfigBase->castValue()
#991 /../html/core/lib/Drupal/Core/Config/StorableConfigBase.php(211): Drupal\Core\Config\StorableConfigBase->castValue()
#992 /../html/core/lib/Drupal/Core/Config/StorableConfigBase.php(211): Drupal\Core\Config\StorableConfigBase->castValue()
#993 /../html/core/lib/Drupal/Core/Config/Config.php(212): Drupal\Core\Config\StorableConfigBase->castValue()
#994 /../html/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(284): Drupal\Core\Config\Config->save()
#995 /../html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(452): Drupal\Core\Config\Entity\ConfigEntityStorage->doSave()
#996 /../html/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(263): Drupal\Core\Entity\EntityStorageBase->save()
#997 /../html/core/lib/Drupal/Core/Entity/EntityBase.php(339): Drupal\Core\Config\Entity\ConfigEntityStorage->save()
#998 /../html/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(591): Drupal\Core\Entity\EntityBase->save()
#999 /../html/core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php(300): Drupal\Core\Config\Entity\ConfigEntityBase->save()
#1000 /../html/core/modules/layout_builder/src/Form/DefaultsEntityForm.php(200): Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage->save()
#1001 [internal function]: Drupal\layout_builder\Form\DefaultsEntityForm->save()
#1002 /../html/core/lib/Drupal/Core/Form/FormSubmitter.php(113): call_user_func_array()
#1003 /../html/core/lib/Drupal/Core/Form/FormSubmitter.php(51): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers()
#1004 /../html/core/lib/Drupal/Core/Form/FormBuilder.php(593): Drupal\Core\Form\FormSubmitter->doSubmitForm()
#1005 /../html/core/lib/Drupal/Core/Form/FormBuilder.php(321): Drupal\Core\Form\FormBuilder->processForm()
#1006 /../html/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#1007 /../html/core/modules/layout_builder/src/Controller/LayoutBuilderHtmlEntityFormController.php(39): Drupal\Core\Controller\FormController->getContentResult()
#1008 [internal function]: Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult()
#1009 /../html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#1010 /../html/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#1011 /../html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#1012 /../html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#1013 /../html/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#1014 /../html/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#1015 /../html/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle()
#1016 /../html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle()
#1017 /../html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#1018 /../html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#1019 /../html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle()
#1020 /../html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#1021 /../html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#1022 /../html/core/lib/Drupal/Core/DrupalKernel.php(706): Stack\StackedHttpKernel->handle()
#1023 /../html/index.php(19): Drupal\Core\DrupalKernel->handle()
#1024 {main}
| Comment | File | Size | Author |
|---|---|---|---|
| 2021-04-27_12h51_12.png | 10.94 KB | maxilein |
Comments
Comment #2
maxilein commentedForgot to mention: D 9.1.7
Smart Date Formatter does work.
Smart Date based on an standard Drupal date range field.
Comment #3
maxilein commentedComment #4
mandclu commentedComment #5
mandclu commentedComment #6
mandclu commentedComment #7
mandclu commentedComment #9
mandclu commentedAfter merging in #3221364: Out of memory error when using Duration formatter I encountered some errors about private functions, so moved a number of previously private functions to protected. After doing this, the duration formatter appears to work fine with Layout Builder. Merged in these changes and marking this as fixed, but feel free to re-open if you encounter any other errors.