-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AutomaticRedirectsEnabled setting set to false still create redirects for moved/renamed pages #130
Comments
Yes, this should work.
|
Hello, No we never add this settings in our appsettings.json file, we have configured it via services as below: services.AddOptimizelyNotFoundHandler(o => |
I checked in the sandbox app, and the move event stops firing if Could you also check whether a record is always created in the ContentUrlHistory table when content is moved? I suggest also disabling the following two jobs that are related to Automatic Redirects:
|
Hello, as per checking, the two scheduled jobs are not running automatically either, and no the content that was moved are not created in the ContentUrlHistory. I can reproduce the issue both in my local project and also in live environment. |
Thank you for testing and providing information. Here’s how automatic redirects actually work: When content is moved, a record is created in the Maybe we are talking about different things? From your previous comment, it seems that |
Let me share my perspective on how the issue appears from my end. When I create a new page (e.g., /wecare), it is saved in the ContentUrlHistory table with the following information: [{"Url":"/we-care/","Type":"Primary","Language":"en-GB"}]. If I then rename the page to /we-care-2 and check the NotFound Handler Redirects, I notice that a new entry is automatically created for this URL (Old URL: https://jderetail-test-whitelabel.jdecoffee.net/we-care/ & New URL: https://jderetail-test-whitelabel.jdecoffee.net/we-care-2/). Since AutomaticRedirectsEnabled is set to false, I wouldn’t expect redirects to be created automatically for any renamed URL, but that seems to be happening here. Additionally, when I check the database, I don’t see any data reflecting /we-care-2; only the original entry from when the page was first created is present: [{"Url":"/we-care/","Type":"Primary","Language":"en-GB"}]. Given this outcome, do you think we might be looking at the issue from different perspectives? |
Based on the previous comment, it appears that the You could try replicating this issue in the sandbox app included in the package, or debug the initialization of |
Hi there,
I'm using this package to handle NotFound redirects in our Optimizely CMS project. I’ve run into an issue where setting "AutomaticRedirectsEnabled" to false doesn’t seem to stop redirects from being created when I move or rename a page.
What I have in the configuration:
services.AddOptimizelyNotFoundHandler(o =>
{
o.AutomaticRedirectsEnabled = false;
});
What I Expected:
No automatic redirects should be created when AutomaticRedirectsEnabled is set to false.
What Actually Happened:
Redirects are still being created automatically even though I’ve disabled that feature.
Environment:
Optimizely CMS Version: 12.30.0
Geta.NotFoundHandler.Optimizely Version: 5.0.8
.NET Core Version: net6.0
I’ve double-checked the documentation, and it seems like this should be working, so I’m not sure what’s going wrong. Any chance you could take a look?
Thanks!
The text was updated successfully, but these errors were encountered: