Array to string conversion in Drupal\diff\Plugin\diff\Field\ImageFieldBuilder->build()

Created on 17 January 2017, almost 8 years ago
Updated 13 August 2024, 3 months ago

After updating the diff module to 8.x-1.0-rc1, I get the following in my log:

Notice: Array to string conversion in Drupal\diff\Plugin\diff\Field\ImageFieldBuilder->build() (line 70 of /home/[anonymized]/public_html/modules/diff/src/Plugin/diff/Field/ImageFieldBuilder.php)
 #0 /home/[anonymized]/public_html/core/includes/bootstrap.inc(548): _drupal_error_handler_real(8, 'Array to string...', '/home/[anonymized]...', 70, Array)
 #1 [internal function]: _drupal_error_handler(8, 'Array to string...', '/home/[anonymized]...', 70, Array)
 #2 /home/[anonymized]/public_html/modules/diff/src/Plugin/diff/Field/ImageFieldBuilder.php(70): implode('\n', Array)
 #3 /home/[anonymized]/public_html/modules/diff/src/DiffEntityParser.php(94): Drupal\diff\Plugin\diff\Field\ImageFieldBuilder->build(Object(Drupal\file\Plugin\Field\FieldType\FileFieldItemList))
 #4 /home/[anonymized]/public_html/modules/diff/src/DiffEntityComparison.php(96): Drupal\diff\DiffEntityParser->parseEntity(Object(Drupal\node\Entity\Node))
 #5 /home/[anonymized]/public_html/modules/diff/src/Plugin/diff/Layout/SplitFieldsDiffLayout.php(115): Drupal\diff\DiffEntityComparison->compareRevisions(Object(Drupal\node\Entity\Node), Object(Drupal\node\Entity\Node))
 #6 /home/[anonymized]/public_html/modules/diff/src/Controller/PluginRevisionController.php(167): Drupal\diff\Plugin\diff\Layout\SplitFieldsDiffLayout->build(Object(Drupal\node\Entity\Node), Object(Drupal\node\Entity\Node), Object(Drupal\node\Entity\Node))
 #7 /home/[anonymized]/public_html/modules/diff/src/Controller/NodeRevisionController.php(49): Drupal\diff\Controller\PluginRevisionController->compareEntityRevisions(Object(Drupal\Core\Routing\CurrentRouteMatch), Object(Drupal\node\Entity\Node), Object(Drupal\node\Entity\Node), 'split_fields')
 #8 [internal function]: Drupal\diff\Controller\NodeRevisionController->compareNodeRevisions(Object(Drupal\node\Entity\Node), Object(Drupal\node\Entity\Node), Object(Drupal\node\Entity\Node), 'split_fields')
 #9 /home/[anonymized]/public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
 #10 /home/[anonymized]/public_html/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
 #11 /home/[anonymized]/public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
 #12 /home/[anonymized]/public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
 #13 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
 #14 /home/[anonymized]/public_html/vendor/symfony/http-kernel/HttpKernel.php(139): call_user_func_array(Object(Closure), Array)
 #15 /home/[anonymized]/public_html/vendor/symfony/http-kernel/HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
 #16 /home/[anonymized]/public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
 #17 /home/[anonymized]/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
 #18 /home/[anonymized]/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
 #19 /home/[anonymized]/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
 #20 /home/[anonymized]/public_html/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
 #21 /home/[anonymized]/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
 #22 /home/[anonymized]/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
 #23 /home/[anonymized]/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
 #24 /home/[anonymized]/public_html/core/lib/Drupal/Core/DrupalKernel.php(652): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
 #25 /home/[anonymized]/public_html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #26 {main}.

๐Ÿ› Bug report
Status

Needs work

Version

2.0

Component

Diff builder plugins

Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands dhendriks

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024