I put a flag on a paragraph type.
The flag is a standard link (A normal non-JavaScript request will be made and the current page will be reloaded).
It works but I have a error message on click :

warning: htmlspecialchars() expects parameter 1 to be string, object given in symfony\component\httpfoundation\redirectresponse->settargeturl() (line 103 of vendor/symfony/http-foundation/redirectresponse.php).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zorax created an issue. See original summary.

patrickkrueger’s picture

Status: Active » Needs work
FileSize
623 bytes

As Url::fromUri('internal:/') returns an object, this should be converted to a string before calling RedirectResponse.

patrickkrueger’s picture

Status: Needs work » Needs review
nace_fr’s picture

Status: Needs review » Reviewed & tested by the community

I was able to reproduce this issue and tested patch from #2. It applied successfully and solved the issue. Changing status to RTBC.

TR’s picture

Assigned: zorax » Unassigned
FileSize
678 bytes

This is still a bug and the patch still fixes the bug. I would have written the patch in a slightly different way (attached), but the patch in #2 is not wrong and it works, so leaving this at RTBC.

  • Berdir committed 9fa2b9c on 8.x-4.x authored by TR
    Issue #3089145 by patrickkrueger, TR: Error when I Flag on paragraph...
Berdir’s picture

Status: Reviewed & tested by the community » Fixed

Clearly the original code should have added test coverage for that case, torn between requiring it for the fix or not, but committed, thanks.

Status: Fixed » Closed (fixed)

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