Issue comparing revisions with '?view_mode=full'

Created on 14 May 2024, 7 months ago
Updated 27 August 2024, 4 months ago

Problem/Motivation

Trying to compare Two revisions sometimes it breaks with this filter '?view_mode=full'

Proposed resolution

I have seen that was an issue in the past with Drupal core:
https://www.drupal.org/project/drupal/issues/2962941 πŸ› TypeError: Argument 1 passed to Drupal\Component\Utility\UrlHelper::buildQuery() must be of the type array, string given, called in /core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php on line 154 in Drupal\Component\Utility\UrlHelper::buildQuery() Closed: cannot reproduce

with the pathch #7 the problem seems to be solved but i dont know if maybe we need to find another way to handle it.
This issue just happen in rare cases also with 'view_mode=pdf'.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain carlosgm91 Alicante

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

Comments & Activities

  • Issue created by @carlosgm91
  • πŸ‡ͺπŸ‡ΈSpain carlosgm91 Alicante
  • πŸ‡ΊπŸ‡ΈUnited States luke.leber Pennsylvania

    Thanks for the bug report. Unfortunately, I wasn't able to reproduce a White Screen of Death as in #2962941, but I was able to trigger an E_WARNING by manually editing the view mode to a nonsensical value.

    Warning: Undefined array key "this-view-mode-does-not-exist" in Drupal\diff_plus\Plugin\diff\Layout\VisualInlineHtml5DiffLayout->getDisplayModeOptions() (line 154 of modules/contrib/diff_plus/src/Plugin/diff/Layout/VisualInlineHtml5DiffLayout.php).
    Drupal\diff_plus\Plugin\diff\Layout\VisualInlineHtml5DiffLayout->getDisplayModeOptions(Object, Object, Object, 'this-view-mode-does-not-exist') (Line: 234)
    Drupal\diff_plus\Plugin\diff\Layout\VisualInlineHtml5DiffLayout->build(Object, Object, Object) (Line: 168)
    Drupal\diff\Controller\PluginRevisionController->compareEntityRevisions(Object, Object, Object, 'visual_inline_html5') (Line: 49)
    Drupal\diff\Controller\NodeRevisionController->compareNodeRevisions(Object, Object, Object, 'visual_inline_html5')
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 592)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
    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: 53)
    Asm89\Stack\Cors->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: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
    

    Is this what you were seeing?

    In order to fix a bug, we'll first need a failing test. Can you update the steps to reproduce so that I can write such a test case?

    Thanks!

  • πŸ‡ͺπŸ‡ΈSpain carlosgm91 Alicante

    Hi luke.leber!
    Right now i dont remember well if this was exaclty the message but could be.
    Anyway thanks for your time, i think that we can close it and review it if we reproduce it in the future!

Production build 0.71.5 2024