I used in Drupal 8 and with version 8.x-2.6 this syntax to debug a pdf-print of a view with arguments:
mydrupal.de/print/view/pdf///debug?view_args[0]=

After Upgrade to Drupal 10 with version 8.x-2.11 I get this error:
Symfony\Component\HttpKernel\Exception\BadRequestHttpException: Input value "view_args" contains a non-scalar value. in Symfony\Component\HttpKernel\HttpKernel->handle() (line 81 of /path/vendor/symfony/http-kernel/HttpKernel.php).

How can i debug entity print pdf view with arguments?

This link for exampel gives me the right debug-view:
mydrupal.de/print/view/pdf/print/view/pdf/content/page_1/debug

CommentFileSizeAuthor
#3 3352429.patch664 byteslarowlan

Comments

Lissy created an issue. See original summary.

lissy’s picture

Issue summary: View changes
larowlan’s picture

Status: Active » Needs review
StatusFileSize
new664 bytes

Please try the attached patch and report back.

Thanks!

lissy’s picture

HI @larowlan

Thanks for the patch, but the code

    if ($args = $this->currentRequest->query->get('view_args')) {
      $executable->setArguments($args);
    }

is already in the version 8.x-2.11.

larowlan’s picture

I don't think so, check the line numbers, the patch is a diff against 8.x-2.11

kaszarobert’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm the patch fixes the issue. You have to use a URL like that:

/print/view/pdf/faktura_view/page_1/debug?view_args[0]=54

If you try otherwise with the patch, you get UnexpectedValueException: Unexpected value for parameter "view_args": expecting "array", got "string". in Drupal\Core\Http\InputBag->all() (line 31 of core/lib/Drupal/Core/Http/InputBag.php).

gerzenstl’s picture

I can confirm patch from #3 works.

I tested in:
* Drupal 10.2.1
* Entity print 8.x-2.13

trickfun’s picture

Patch #3 works fine.
Thank you

vladimiraus’s picture

Status: Reviewed & tested by the community » Closed (duplicate)