Problem/Motivation
When a views PDF can't be generated due to an error, the error handlers attempt to send a RedirectResponse to "", but passing a Url object to the symfony RedirectResponse constructor instead of a string.
$url = $executable->hasUrl() ? $executable->getUrl()->toString() : Url::fromRoute('<front>');
$event->setResponse(new RedirectResponse($url));
Steps to reproduce
Trigger an error when generating a views PDF, instead of being redirected to the homepage and see the debug output and actual errors, you will see an error along the lines of:
Recoverable fatal error: Object of class Drupal\Core\Url could not be converted to string in Drupal\Component\Utility\UrlHelper::isExternal()
Comments
Comment #2
eric115 commentedPatch to add ->toString();
Comment #5
jannakha commented- created MR 98 out of patch
- before patch applied, exception occurs when redirecting to
- after patch applied, redirection to works as expected