The addition of purl support for the redirect module causes query strings in the redirect to be stripped before the redirect is saved.

Comments

awolfey’s picture

StatusFileSize
new1.56 KB

Patch attached. The patch merges PURL options in rather than replacing all options.

awolfey’s picture

StatusFileSize
new566 bytes

Don't overwrite the redirect options array in any case. Apply on top of first patch.

socialnicheguru’s picture

had to amend patch so that it applies from within purl directory. applied fine then

baisong’s picture

Issue summary: View changes
StatusFileSize
new1.02 KB
jeffschuler’s picture

Are these changes successfully fixing this issue for you folks?

I'm still seeing the URL prefix being removed from the URL upon save, in Redirect's call to drupal_get_normal_path().

baisong’s picture

@jeffschuler, yes, the patch in #4 above is currently included in the latest OpenScholar profile release 7.x-3.10, deployed on OpenScholar @ Harvard, where it's resolved the issue.

jeffschuler’s picture

@baisong: Thanks.
The prefix is still being stripped in our case, though.

purl 7.x-1.0-beta1+11-dev
redirect 7.x-1.0-rc1+6-dev

(Using PURL with OG group-based spaces.)
spaces 7.x-3.0-alpha1+10-dev
og 7.x-2.2

When I add a redirect where the From begins with an existing PURL prefix, regardless of whether I set the Modifier, the prefix is stripped from the string that is saved.

I tried applying the other 3 PURL patches that OpenScholar is using (in the drush makefile you linked) but still no luck.

jeffschuler’s picture

I was totally misinterpreting this issue, sorry.

I understand now that this deals with query strings (like "?q=...") at the end of the redirect destination URL.

I'm still trying to figure out how to get PURL to not strip the prefix from the From string, but I'll open a new issue if necessary.

rohnjeynolds’s picture

The fix #4 is the right solution, however we needed an additional check on the presence of redirect options in the second half of the conditional. This patch adds that check.

mmi.cse’s picture

Status: Needs review » Reviewed & tested by the community