Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
#5 | 3089145-5.patch | 678 bytes | TR |
| |||
#2 | 3089145-1.patch | 623 bytes | patrickkrueger |
Comments
Comment #2
patrickkruegerAs Url::fromUri('internal:/') returns an object, this should be converted to a string before calling RedirectResponse.
Comment #3
patrickkruegerComment #4
nace_fr CreditAttribution: nace_fr at Agiledrop - Your Trusted Drupal Teammates commentedI was able to reproduce this issue and tested patch from #2. It applied successfully and solved the issue. Changing status to RTBC.
Comment #5
TR CreditAttribution: TR commentedThis 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.
Comment #7
BerdirClearly the original code should have added test coverage for that case, torn between requiring it for the fix or not, but committed, thanks.