craftcms / craftcms/docs

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

Open
#539 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
JavaScript
Stars
42
Forks
160
Avg merge
3h 9m
Merged PRs (30d)
4

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the redirects for updating.html, requirements.html, and folder-structure.html, then investigate the redirect configuration suggested by the .htaccess mention. Compare the current destinations with the expected 4.x documentation URLs. Done means versionless links consistently resolve to the corresponding 4.x pages.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.