Skip to content

Redirects on subprojects do not work #5889

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

Closed
humitos opened this issue Jul 8, 2019 · 4 comments
Closed

Redirects on subprojects do not work #5889

humitos opened this issue Jul 8, 2019 · 4 comments
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@humitos
Copy link
Member

humitos commented Jul 8, 2019

Due to the way we get the project.slug from the request object (set by the SubdomainMiddleware), redirects instances for subprojects are never catched.

At this point,

path, http_status = project.redirects.get_redirect_path_with_status(
path=path, language=language, version_slug=version_slug
)

project is the superproject instead of the subproject, and all the redirect instanced defined in the subproject are completely omited.

This is strongly related to #5557. We need to refactor the middleware and set the subproject.slug into the request object to make these things to work properly.

@humitos humitos added Bug A bug Accepted Accepted issue on our roadmap labels Jul 8, 2019
@Abhi-khandelwal
Copy link
Contributor

Hi @humitos, Can I work on this issue ?

@stsewd
Copy link
Member

stsewd commented Jul 29, 2019

@Abhi-khandelwal sure

@Abhi-khandelwal
Copy link
Contributor

@humitos Can you help me with refactoring in the middleware ?

@stsewd
Copy link
Member

stsewd commented Feb 20, 2023

Looks like the linked code is prior to proxito, we now catch the redirects from the subproject, but not as users would expect, tracking that problem in #10049.

@stsewd stsewd closed this as completed Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
None yet
Development

No branches or pull requests

3 participants