Problem/Motivation

If you have the following redirect configured /path1 -> /path2 it works.
If you open /path2?test=1 the route is looked up correctly and served.

If you call it like /path1?test=1 you get a 404.
I think it should do the redirect as it is configured and open it as either /path2 or /path2?test=1, based on what redirect module is configured to do.

Proposed resolution

Patch direction:
- Have all but the path stripped and then do the redirect looked-up.
- Preserve the query parameter passed (if any).
- Do the lookup based on path only (as it currently does)
- If a route is found add the query on top (if redirect module allows it).
- Profit :D

This is already implemented in #4.

Remaining tasks

Patch, Review, [Iterations], Commit.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

Mention a bug-fix (maybe).

CommentFileSizeAuthor
#4 issue-3085179-5.patch2.39 KBndobromirov

Comments

ndobromirov created an issue. See original summary.

ndobromirov’s picture

Found the root cause.
Will have a patch for this today.

e0ipso’s picture

Found the root cause.
Will have a patch for this today.

💯✨

ndobromirov’s picture

Status: Active » Needs review
StatusFileSize
new2.39 KB

Here is the promised patch - it was exactly as in the description's proposed solution.
Seems to work, at least for my case :D.

I've added this to respect redirect's settings as well for the query string propagation on redirects (found it by chance).

ndobromirov’s picture

Issue summary: View changes

Updated IS to represent the patch better.

e0ipso’s picture

Status: Needs review » Fixed

  • e0ipso committed 3e3c8c6 on 8.x-1.x authored by ndobromirov
    Issue #3085179 by ndobromirov, e0ipso: Does not handle redirects with...

Status: Fixed » Closed (fixed)

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