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.
A recent core change requires paths to start with a leading slash.
Comment | File | Size | Author |
---|---|---|---|
#13 | leading-slash-2529996-13.patch | 6.32 KB | jhedstrom |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedretesting
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #4
BerdirThanks for the patch.
Might be possible to just no longer trim() the path that we have there?
Comment #5
BerdirComment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedSure, I only did it to validate the format, but I guess it's safe to assume that the format is correct as it's not the module's job to valid it...
Added new patch...
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedWhoops, seems you need to check the path isn't '/' when you de-slash a URI, to stop redirects on the homepage.
Comment #9
jhedstromThis should get tests passing.
Comment #10
jhedstromSorry for the array syntax changes, they make it look a little more complex of a change.
Comment #11
BerdirI guess we''ll have to wait on #2532740: Fix incorrect config schema to land but this looks good to me.
Comment #12
BerdirI've been testing this, globalredirectDeslash() fails on the frontpage because it results in an empty URL.
Comment #13
jhedstromThis adds a test and resolves the issue for deslashing the front page.
Comment #14
vimokkhadipa CreditAttribution: vimokkhadipa as a volunteer commentedI apply #13 patch. Work fine!
Comment #15
Berdir#2548075: Globalredirect 8.x-1.x has been merged into redirect