Fehlermeldung "Invalid argument supplied for foreach()" bei Erstellung eines Feldes in einem Inhaltstyp
am 08.07.2020 - 09:45 Uhr in
Hallo,
ich erhalte folgende Fehlermeldung, wenn ich z.B. ein Listen-Feld oder ein einfaches Textfeld erstellen will:
Warning: Invalid argument supplied for foreach() in Drupal\Component\Utility\NestedArray::mergeDeepArray()
Die Seite sieht dann immer aus, als wär sie gestorben - weiße Seite mit dem Text "The website encountered an unexpected error." etc.
Aber wenn ich dann in die Feld-Übersicht des Inhaltstyps schaue, ist das Feld trotzdem normal angelegt und lässt sich weiterbearbeiten und auch in das Formular integrieren.
Funktioniert also normal.
Die Google-Suche half mir leider nicht weiter, weil die Fehlermeldung anscheinend auch bei (anderen) Modulen auftritt und bis jetzt nur diese berücksichtigt werden.
Beispiele:
https://www.drupal.org/project/markdown/issues/3153674
https://www.drupal.org/project/twitter_feed/issues/3096291
Wie kriege ich denn den Fehler in meinem speziellen Fall weg?
Nutze aktuell Drupal 8.9.1.
- Anmelden oder Registrieren um Kommentare zu schreiben
Wichtig wäre zu wissen,
am 10.07.2020 - 09:12 Uhr
Wichtig wäre zu wissen, welche Datei den Fehler verursacht. Das dürftest du im Logfile deiner Seite bzw. deines Servers sehen. Die beiden von dir verlinkten Issues referenzieren stets ein Problem mit (multiplen) Bibliotheken. Ich gehe davon aus, dass du mal den Cache gelöscht und Cron durchlaufen lassen hast? Vielleicht "hängt" irgendwo etwas.
Web: Halle im Bild | n8aktiv
Social: Facebook | Xing
Vielen Dank zwerg für deine
am 13.07.2020 - 17:13 Uhr
Vielen Dank zwerg für deine Antwort.
Habe nochmal in die Protokollnachrichten geschaut und dabei bemerkt, dass es sogar zwei Meldungen zum gleichen Vorgang gibt, die mit "Warning: Invalid argument supplied for foreach()" anfangen.
Hier die kompletten Fehlermeldungen aus den Protokollnachrichten (mit Beispielpfaden versehen):
1. Fehlermeldung:
Referrer: https://www.beispieldomain.de/admin/structure/types/manage/beispiel_cont...
Nachricht: Warning: Invalid argument supplied for foreach() in Drupal\Component\Utility\NestedArray::mergeDeepArray() (Zeile 327 in /.../drupal/core/lib/Drupal/Component/Utility/NestedArray.php)
#0 /.../drupal/core/includes/bootstrap.inc(600): _drupal_error_handler_real(2, 'Invalid argumen...', '/is/htdocs/...', 327, Array)
#1 /.../drupal/core/lib/Drupal/Component/Utility/NestedArray.php(327): _drupal_error_handler(2, 'Invalid argumen...', '/is/htdocs/...', 327, Array)
#2 /.../drupal/core/lib/Drupal/Component/Utility/NestedArray.php(295): Drupal\Component\Utility\NestedArray::mergeDeepArray(Array)
#3 /.../drupal/core/modules/views/src/ViewsData.php(252): Drupal\Component\Utility\NestedArray::mergeDeep(Array, NULL)
#4 /.../drupal/core/modules/views/src/ViewsData.php(162): Drupal\views\ViewsData->getData()
#5 /.../drupal/core/modules/views/src/Plugin/Derivative/ViewsEntityRow.php(98): Drupal\views\ViewsData->get('block_content')
#6 /.../drupal/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101): Drupal\views\Plugin\Derivative\ViewsEntityRow->getDerivativeDefinitions(Array)
#7 /.../drupal/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array)
#8 /.../drupal/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(284): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
#9 /.../drupal/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(175): Drupal\Core\Plugin\DefaultPluginManager->findDefinitions()
#10 /.../drupal/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(22): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#11 /.../drupal/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(16): Drupal\Core\Plugin\DefaultPluginManager->getDefinition('search_api')
#12 /.../drupal/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(83): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('search_api', Array)
#13 /.../drupal/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(817): Drupal\Component\Plugin\PluginManagerBase->createInstance('search_api')
#14 /.../drupal/core/modules/views/src/Plugin/views/style/StylePluginBase.php(122): Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('row')
#15 /.../drupal/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(820): Drupal\views\Plugin\views\style\StylePluginBase->init(Object(Drupal\views\ViewExecutable), Object(Drupal\views\Plugin\views\display\Page), Array)
#16 /.../drupal/core/modules/views/src/ViewExecutable.php(882): Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('style')
#17 /.../drupal/core/modules/views/src/ViewExecutable.php(1842): Drupal\views\ViewExecutable->initStyle()
#18 /.../drupal/core/modules/views/src/Plugin/views/display/PathPluginBase.php(132): Drupal\views\ViewExecutable->getTitle()
#19 /.../drupal/core/modules/views/src/Plugin/views/display/Page.php(91): Drupal\views\Plugin\views\display\PathPluginBase->getRoute('beispiel_contenttype...', 'page_1')
#20 /.../drupal/core/modules/views/src/Plugin/views/display/PathPluginBase.php(220): Drupal\views\Plugin\views\display\Page->getRoute('beispiel_contenttype...', 'page_1')
#21 /.../drupal/core/modules/views/src/EventSubscriber/RouteSubscriber.php(120): Drupal\views\Plugin\views\display\PathPluginBase->collectRoutes(Object(Symfony\Component\Routing\RouteCollection))
#22 [internal function]: Drupal\views\EventSubscriber\RouteSubscriber->routes()
#23 /.../drupal/core/lib/Drupal/Core/Routing/RouteBuilder.php(146): call_user_func(Array)
#24 /.../drupal/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild()
#25 /.../drupal/core/includes/common.inc(1090): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild()
#26 /.../drupal/modules/admin_toolbar/admin_toolbar_tools/src/Controller/ToolbarController.php(205): drupal_flush_all_caches()
#27 [internal function]: Drupal\admin_toolbar_tools\Controller\ToolbarController->flushAll()
#28 /.../drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#29 /.../drupal/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#30 /.../drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#31 /.../drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#32 /.../drupal/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#33 /.../drupal/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#34 /.../drupal/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 /.../drupal/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#36 /.../drupal/core/modules/ban/src/BanMiddleware.php(50): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#37 /.../drupal/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#38 /.../drupal/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#39 /.../drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#40 /.../drupal/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#41 /.../drupal/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#42 {main}
2. Fehlermeldung:
Referrer: https://www.beispieldomain.de/admin/structure/types/manage/beispiel_cont...
Nachricht: Warning: Invalid argument supplied for foreach() in Drupal\views\ViewsData->getData() (Zeile 247 in /.../drupal/core/modules/views/src/ViewsData.php)
#0 /.../drupal/core/includes/bootstrap.inc(600): _drupal_error_handler_real(2, 'Invalid argumen...', '/is/htdocs/...', 247, Array)
#1 /.../drupal/core/modules/views/src/ViewsData.php(247): _drupal_error_handler(2, 'Invalid argumen...', '/is/htdocs/...', 247, Array)
#2 /.../drupal/core/modules/views/src/ViewsData.php(162): Drupal\views\ViewsData->getData()
#3 /.../drupal/core/modules/views/src/Plugin/Derivative/ViewsEntityRow.php(98): Drupal\views\ViewsData->get('block_content')
#4 /.../drupal/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101): Drupal\views\Plugin\Derivative\ViewsEntityRow->getDerivativeDefinitions(Array)
#5 /.../drupal/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array)
#6 /.../drupal/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(284): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
#7 /.../drupal/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(175): Drupal\Core\Plugin\DefaultPluginManager->findDefinitions()
#8 /.../drupal/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(22): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#9 /.../drupal/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(16): Drupal\Core\Plugin\DefaultPluginManager->getDefinition('search_api')
#10 /.../drupal/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(83): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('search_api', Array)
#11 /.../drupal/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(817): Drupal\Component\Plugin\PluginManagerBase->createInstance('search_api')
#12 /.../drupal/core/modules/views/src/Plugin/views/style/StylePluginBase.php(122): Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('row')
#13 /.../drupal/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(820): Drupal\views\Plugin\views\style\StylePluginBase->init(Object(Drupal\views\ViewExecutable), Object(Drupal\views\Plugin\views\display\Page), Array)
#14 /.../drupal/core/modules/views/src/ViewExecutable.php(882): Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('style')
#15 /.../drupal/core/modules/views/src/ViewExecutable.php(1842): Drupal\views\ViewExecutable->initStyle()
#16 /.../drupal/core/modules/views/src/Plugin/views/display/PathPluginBase.php(132): Drupal\views\ViewExecutable->getTitle()
#17 /.../drupal/core/modules/views/src/Plugin/views/display/Page.php(91): Drupal\views\Plugin\views\display\PathPluginBase->getRoute('beispiel_contenttype...', 'page_1')
#18 /.../drupal/core/modules/views/src/Plugin/views/display/PathPluginBase.php(220): Drupal\views\Plugin\views\display\Page->getRoute('beispiel_contenttype...', 'page_1')
#19 /.../drupal/core/modules/views/src/EventSubscriber/RouteSubscriber.php(120): Drupal\views\Plugin\views\display\PathPluginBase->collectRoutes(Object(Symfony\Component\Routing\RouteCollection))
#20 [internal function]: Drupal\views\EventSubscriber\RouteSubscriber->routes()
#21 /.../drupal/core/lib/Drupal/Core/Routing/RouteBuilder.php(146): call_user_func(Array)
#22 /.../drupal/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild()
#23 /.../drupal/core/includes/common.inc(1090): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild()
#24 /.../drupal/modules/admin_toolbar/admin_toolbar_tools/src/Controller/ToolbarController.php(205): drupal_flush_all_caches()
#25 [internal function]: Drupal\admin_toolbar_tools\Controller\ToolbarController->flushAll()
#26 /.../drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#27 /.../drupal/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#28 /.../drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#29 /.../drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#30 /.../drupal/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#31 /.../drupal/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#32 /.../drupal/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#33 /.../drupal/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 /.../drupal/core/modules/ban/src/BanMiddleware.php(50): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 /.../drupal/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#36 /.../drupal/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#37 /.../drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#38 /.../drupal/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#39 /.../drupal/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#40 {main}
Könnt Ihr hiermit etwas anfangen?
Welche PHP-Version benutzt
am 13.07.2020 - 18:36 Uhr
Welche PHP-Version benutzt Du?
.
Werner
drupal-training.de
Moderator und Drupal Trainer
* - - - - - - - - - - - - - - - - - - - - - - - - - - - *
PHP 7.2.31
am 14.07.2020 - 08:15 Uhr
PHP 7.2.31
Auf welcher Ansichtritt der
am 14.07.2020 - 15:32 Uhr
Auf welcher Ansichtritt der Fehler denn auf?
https://drupal-tv.de
Drupal sehen und lernen