Closed (fixed)
Project:
Redirect
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2018 at 15:32 UTC
Updated:
11 Feb 2019 at 21:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tomsegarra commentedThe problem is that parse_url() looks for a "?" character to separate the URL's path component from the querystring component. If Clean URLs are off, then the path is implicitly prefixed by "?q=". Since the "path" is then separated from the rest of the "querystring" by the "&" character rather than the "?" character, parse_url finds no querystring at all, thus parsing the URL incorrectly upon saving the redirect.
The attached patch adds a special case in redirect_parse_url(), delimiting the path and query components according to the "&" character if Clean URLs are found to be disabled.
It also adds a unit test for this function, which would fail without this code update, but should succeed after it's applied.
Comment #3
chris matthews commentedThe 2 year old patch in #2 still applied cleanly to the latest 7.x-1.x-dev and fixes this issue for me so changing to RTBC.
Comment #4
pifagor commentedComment #7
pifagor commented