Skip to content
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

[Bug]: Wrong redirect to version 2 for links without version #539

Open
frank-laemmer opened this issue Aug 26, 2023 · 2 comments
Open

[Bug]: Wrong redirect to version 2 for links without version #539

frank-laemmer opened this issue Aug 26, 2023 · 2 comments

Comments

@frank-laemmer
Copy link

Page URL

https://craftcms.com/docs/updating.html

Client

FireFox, Chrome, doesn't matter

Description

Details

I'd like to link to link a Craft CMS install guide without specifying the version.

Here is an example from Laravel: https://laravel.com/docs/deployment will redirect to https://laravel.com/docs/10.x/deployment.

It seem you have folks have implemented such behavior (.htaccess?), but it redirect to version 2.x of Craft CMS at least for some pages I tested:

Steps to reproduce the issue

  1. Open https://craftcms.com/docs/updating.html
  2. See it will redirect to https://craftcms.com/docs/2.x/updating.html
  3. Expected: https://craftcms.com/docs/4.x/updating.html

Same for:

https://craftcms.com/docs/requirements.html
https://craftcms.com/docs/folder-structure.html

@AugustMiller
Copy link
Contributor

AugustMiller commented Aug 29, 2023

These redirects are likely in place due to legacy documentation structures—you can see a complete list of redirections that our provider (Netlify) will perform, in the _redirects file.

I will make sure to update some of these “versionless” pages to point at the equivalent 4.x pages!

Edit: I don't know if within the current system it makes sense to create bulk redirects from the non-versioned URLs (i.e. /docs/elements.html), but know that we are looking into streamlining the structure + routing of the documentation, as a whole!

@frank-laemmer
Copy link
Author

frank-laemmer commented Aug 30, 2023

Missed that file. Sorry for the somehow lazy ticket here. I hope you can work it out. I found:

/docs/updating* https://craftcms.com/docs/2.x/updating.html
/docs/requirements* https://craftcms.com/docs/2.x/requirements.html

But there are some more also to version 3. It just seems that this hasn't been updated for a while. I don't know about the inner workings and where the original links come from so I will not file a PR. Thanks for taking care.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants