Invalid argument error after update to 1.5

Created on 18 November 2021, about 3 years ago
Updated 18 November 2022, about 2 years ago

Problem/Motivation

After updating to 1.5 we go the following errors when loading the home page of a client site.

Invalid argument supplied for foreach() in Drupal\ui_patterns_field_formatters\Plugin\Field\FieldFormatter\PatternFormatter->viewElements() (line 205 of /var/www/html/idrc/web/modules/contrib/ui_patterns_field_formatters/src/Plugin/Field/FieldFormatter/PatternFormatter.php) #0 /var/www/html/idrc/web/core/includes/bootstrap.inc(312): _drupal_error_handler_real(2, 'Invalid argumen...', '/var/www/html/i...', 205)
2021-11-18T10:09:57.081575-05:00 idrc-qa-web1 drupal: #1 /var/www/html/idrc/web/modules/contrib/ui_patterns_field_formatters/src/Plugin/Field/FieldFormatter/PatternFormatter.php(205): _drupal_error_handler(2, 'Invalid argumen...', '/var/www/html/i...', 205, Array)
2021-11-18T10:09:57.081580-05:00 idrc-qa-web1 drupal: #2 /var/www/html/idrc/web/core/lib/Drupal/Core/Field/FormatterBase.php(89): Drupal\ui_patterns_field_formatters\Plugin\Field\FieldFormatter\PatternFormatter->viewElements(Object(Drupal\Core\Field\FieldItemList), 'fr')
2021-11-18T10:09:57.081584-05:00 idrc-qa-web1 drupal: #3 /var/www/html/idrc/web/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php(263): Drupal\Core\Field\FormatterBase->view(Object(Drupal\Core\Field\FieldItemList), 'fr')
2021-11-18T10:09:57.081588-05:00 idrc-qa-web1 drupal: #4 /var/www/html/idrc/web/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php(302): Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array)

Steps to reproduce

No sure yet, have to figure out which field has the issue

Proposed resolution

Right now we're trying to roll back to 1.2

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: cannot reproduce

Version

1.0

Component

Code

Created by

🇨🇦Canada minoroffense Ottawa, Canada

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Hello
    I have encountered a similar errors when working with UI_patterns_formatters 8.x.1.18. Could anyone help pls ?

    Le site Web a rencontré une erreur inattendue. Veuillez essayer de nouveau plus tard.
    
    InvalidArgumentException: Property value is unknown. in Drupal\Core\TypedData\TypedDataManager->getPropertyInstance() (line 196 of core/lib/Drupal/Core/TypedData/TypedDataManager.php).
    Drupal\Core\TypedData\Plugin\DataType\Map->get('value') (Line: 207)
    Drupal\ui_patterns_field_formatters\Plugin\Field\FieldFormatter\PatternFormatter->viewElements(Object, 'fr') (Line: 89)
    Drupal\Core\Field\FormatterBase->view(Object, 'fr') (Line: 265)
    Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 266)
    Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildMultiple(Array) (Line: 340)
    Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
    Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 282)
    Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 239)
    Drupal\Core\Entity\EntityViewBuilder->build(Array)
    call_user_func_array(Array, Array) (Line: 101)
    Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 788)
    Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 374)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array, ) (Line: 242)
    Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 243)
    Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
    Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
    Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
    call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
    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: 718)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Production build 0.71.5 2024