craft-retour icon indicating copy to clipboard operation
craft-retour copied to clipboard

When the Destination URL is set to the default site path, the redirectDestUrl returned by GraphQL is incorrect.

Open dande-sun opened this issue 1 year ago • 2 comments

Describe the bug

When the Destination URL is set to the default site path, the redirectDestUrl returned by GraphQL is incorrect.

Expected behaviour

This result should not include /fr.

Screenshots

The redirect: Image

The Result: Image

Versions

  • Retour: 4.1.23
  • Craft version: Craft Pro 4.14.9

dande-sun avatar Mar 13 '25 03:03 dande-sun

If you change the destination URL to be a full qualified URL, it will not add any prefix:

https://nystudio107.com/docs/retour/configuring.html#sites-redirect-resolution

Let me know if this is sufficient for your use-case.

khalwat avatar Mar 13 '25 15:03 khalwat

If you change the destination URL to be a full qualified URL, it will not add any prefix:

https://nystudio107.com/docs/retour/configuring.html#sites-redirect-resolution

Let me know if this is sufficient for your use-case.

Well, could we add a switch to disable automatically taking Craft Sites into account?

dande-sun avatar Mar 20 '25 02:03 dande-sun

That's potentially an option.

khalwat avatar Apr 10 '25 22:04 khalwat

That's potentially an option.

Please, I need this option. We have over 1000 redirects, and I cannot modify them one by one. Also, when I set the 'Legacy URL Match Type' to 'Full URL' and then use GraphQL to input the path, it returns the redirect data. Below is a screenshot. Is this correct?

Image

dande-sun avatar Apr 11 '25 05:04 dande-sun

That "full URL" issue with GraphQL should be fixed in 4.1.25: https://github.com/nystudio107/craft-retour/releases

khalwat avatar Apr 11 '25 23:04 khalwat

Please, I need this option. We have over 1000 redirects, and I cannot modify them one by one.

Okay, I'll make it happen.

khalwat avatar Apr 13 '25 04:04 khalwat

Addressed in the above commits. Let me know how this works for you.

Craft CMS 3:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-retour": "dev-develop as 3.2.26”,

Then do a composer clear-cache && composer update

…..

Craft CMS 4:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-retour": "dev-develop-v4 as 4.1.26”,

Then do a composer clear-cache && composer update

…..

Craft CMS 5:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-retour": "dev-develop-v5 as 5.0.10”,

Then do a composer clear-cache && composer update

khalwat avatar Apr 20 '25 18:04 khalwat

We good @dande-sun ?

khalwat avatar Apr 22 '25 03:04 khalwat

Great! Thank you so much!

dande-sun avatar Apr 23 '25 07:04 dande-sun