Redirect hashes created when not retaining the query string

Created on 1 June 2018, about 6 years ago
Updated 12 February 2024, 5 months ago

The option to not retain the query string on redirects reads:

Retain query string through redirect.
For example, given a redirect from source-path to node?a=apples, if a user visits source-path?a=alligators&b=bananas they would be redirected to node?a=apples&b=bananas. The query strings in the redirection will always take precedence over the current query string.

Right now, the hash for a query string free URL is only calculated if passthrough_querystring value is checked. That means that if someone visits source-path?a=alligators&b=bananas, like in the example, source-path would would not be matched because the current logic checks for the passthrough_querystring to calculate a query string free hash.

I believe that the check for passthrough_querystring should be removed and be calculated in all cases if query string is passed. The current logic that current checks for passthrough_querystring in onKernelRequestCheckRedirect before appending the query string should stay as is.

🐛 Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

🇺🇸United States mattsqd

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy FiNeX

    Hi, I'm using this patch on a dozen of websites and it looks fine.

  • 🇺🇸United States jmester13

    All I have tried this patch and am still having redirect issues. I'm try to redirect QuickTabs from there index to a readable name. For example

    /cds?qt-tabs_cds=3 should redirect to /cds?qt-tabs_cds=connect

Production build 0.69.0 2024