When opening the preview modal, I get the following fatal error (excuse the ugly formatting of backtrace):

TypeError: Argument 2 passed to Drupal\paragraphs_previewer\Controller\ParagraphsPreviewController::onForm() must be of the type array, string given in Drupal\paragraphs_previewer\Controller\ParagraphsPreviewController->onForm() (line 39 of /app/drupal/web/modules/contrib/paragraphs_previewer/src/Controller/ParagraphsPreviewController.php) #0 [internal function]: Drupal\paragraphs_previewer\Controller\ParagraphsPreviewController->onForm('form-02le2KqO7R...', 'field_paragraph...') #1 /app/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #2 /app/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #3 /app/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext)

This happens when upgrading to 1.3. Reverting to 1.2 resolves the error.

Comments

jsst created an issue. See original summary.

recrit’s picture

@jsst nice catch!
Cause:
Regression of #3008256: Coding standard.
Commit: https://cgit.drupalcode.org/paragraphs_previewer/commit/?id=a223392

Fix:
Update the onForm arguments to correctly represent the route args.

  • recrit committed 7e9dd57 on 8.x-1.x
    Issue #3033171: Fatal error when opening preview modal
    
recrit’s picture

Status: Needs work » Fixed

Fixed in https://cgit.drupalcode.org/paragraphs_previewer/commit/?id=7e9dd57
Release 1.4 is snapped, it'll take a few minutes to show up on the project page.

jsst’s picture

Confirmed, 1.4 fixes the issue. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.