-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Exact Redirects changed behavior from working, now 404s #4008
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
Comments
Hi @stevepiercy, thanks for your report. I think that you were affected by #3965. That PR fixes a bug and I understand that it's incompatible with your setup. Unfornately (for your setup), how is working now it's the correct way and you/we need to solve your problem in a different way now: re-writing your rules. I need to understand what are your exact needing here:
Let me know this. In the meantime I will keep taking a look/talking to the other folks. |
@humitos thank you! This is not a rush. Let's see what the team comes up with in its internal discussion. This project has only one version and language. It's primary purpose is to serve as redirects and mile markers to direct users to the correct resources and avoid 404s from old bookmarks, pages, and search engine indices. Ideally backward compatibility would be maintained without configuration changes, and the redirects without specifying language/version would be implicit across all languages/versions for the project. In fact, that might be a desirable feature. IMO, DRY > explicit > implicit. Pending the outcome of your internal discussion, and if there is no better alternative, then I would appreciate your execution of option 2 above. Side note for option 2, the UI for Page Redirects make it appear that they would not work for external URLs (even though they do):
I can file a separate issue for that, if you think it merits it. |
Yes. I think the Redirects section from the admin needs some love. It's very confusing how it works. I just created a sample project locally to debug this and I finally understood the UI by debugging the code :) Look at this example: Then, if you open the browser at: |
@humitos agreed. It's the point immediately before clicking the If I click the Anyway, should I submit a separate issue for that UI bit? |
@humitos I thought that page redirects can only redirect to pages inside rtd 🤔 https://docs.readthedocs.io/en/latest/user-defined-redirects.html#page-redirects |
Yes, please. So we track this specific thing in a separate issue (it may be a similar one, if you can take a minute to search before opening the new one, that would be great :D ) Also, when you know, please let us know what is the decision you made regarding this original issue and the redirects that do not work as you expect. Thanks! |
Submitted readthedocs/ext-theme#525. I was awaiting further response from your internal discussion:
Thank you! |
@stevepiercy hey! I just updated our database to use |
@humitos the redirects work, however the Admin UI does not reflect the changes you made in the database: I think all the redirects should display the prefix of Thank you! |
I changed the
It works as I described in my previuos comment. Otherwise, I'm not following you. |
@humitos just for clarification, all redirects also work for external links? If so, that isn't specified in the docs. |
@stsewd I don't know if all. At least |
@humitos You're right. Please ignore my comment. I'm closing this issue as complete. Thank you for your assistance! |
Expected Result
All of our previously working and configured Exact Redirects should continue to work.
Actual Result
All of our configured Exact Redirects now result in 404s.
Details
At some point within the last few days, perhaps with the recent changes to Exact Redirects in #3965 or #3593, all of our configured Exact Redirects now result in 404s. We expected them to continue to function. A complete list of our redirects is available at https://readthedocs.org/dashboard/pylons/redirects/
Example configuration:
Redirect Type:
Exact Redirect
From URL:
/docs/pyramid.html
To URL:
https://trypyramid.com/resources.html
https://docs.pylonsproject.org/en/latest/docs/pyramid.html used to redirect to https://trypyramid.com/resources.html. It now 404s.
This is a backward incompatible change, and it caught us by surprise. Is it possible to restore backward compatibility so that the previously entered redirects would still work without the now required "language/version" path preface? Or must I remove the redirects and add them all back with the preface?
The text was updated successfully, but these errors were encountered: