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

Partner sites must run with settings.DEBUG = True #31

Closed
zzgvh opened this issue Jun 14, 2012 · 1 comment
Closed

Partner sites must run with settings.DEBUG = True #31

zzgvh opened this issue Jun 14, 2012 · 1 comment
Assignees
Labels

Comments

@zzgvh
Copy link
Contributor

zzgvh commented Jun 14, 2012

In 2.0.6 partner sites have a bug where the site crashes if a request is made without the language part of the path included and settings.DEBUG = False. Changing DEBUG to True solves the issue.

@zzgvh
Copy link
Contributor Author

zzgvh commented Jun 14, 2012

The gist of this bug is that the CSRF middleware accesses the rendering of the template at a point where the template loading and the urlconf are out of synch so we try to render the RSR base template with the partner sites urlconf. This of course won't work and manifests as errors trying to reverse the {% url %} tags. And this happens in the middleware sequence before the language middleware figures out that we need to redirect to a url with a language prepended to the path. That it works when DEBUG = True is because the rendering of the debugging template circumvents the CSRF rendering problem.

Digging deeper into this we find that the reason we try to render the RSR base template is that the 404 handler uses the same templates for both RSR and partner sites. This is the actual reason for the bug.

@ghost ghost assigned zzgvh Jun 14, 2012
@zzgvh zzgvh closed this as completed in eace21f Jun 14, 2012
@MichaelAkvo MichaelAkvo moved this to Done in RSR Dec 8, 2022
@MichaelAkvo MichaelAkvo added this to RSR Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

1 participant