Closed BenParizek closed 3 months ago
Which would be your ideal behavior here @BenParizek ?
The CMS author who called this out to me said they would expect:
So I tested this by creating this redirect A (/foo
) -> B (/bar
):
Then I created a new redirect Z (/baz
) -> A (/foo
):
And it ends up creating a redirect from Z (/baz
) -> A (/foo
) that overwrites the first redirect A (/foo
) -> B (/bar
).
But what you want to end up with is Z (/baz
) -> B (/bar
) with it eliminating the original A (/foo
) -> B (/bar
) redirect ya?
In the above commits, I removed the code that deletes redirects that have the redirectDestUrl
of the redirect being saved as their redirectSrcUrl
So now both redirects will be in place, and work.
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.17”,
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.18”,
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.2”,
Then do a composer clear-cache && composer update
Describe the bug
When adding a new redirect that redirects to the same URL as another redirect, the first redirect gets deleted.
To reproduce
#1
is now gone and only the#2
redirect from Z->A existsThe code suggests it's cleaning up the first one to avoid a redirect loop, but in this case, it's not really a loop, just sloppy redirects.
Expected behaviour
Either:
Someone tells me that Retour used to behave something like
#2
and thinks there may have been a change in behavior at some point.Screenshots
Versions