fix: use common default for LANGUAGE_COOKIE_NAME - #29096
Conversation
|
Thanks for the pull request, @cmltaWt0! I've created OSPR-6161 to keep track of it in JIRA, where we prioritize reviews. Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
Changes: - use default LANGUAGE_COOKIE_NAME value from common for cases when there is no `LANGUAGE_COOKIE` and `LANGUAGE_COOKIE_NAME` in ENV_TOKENS
c97cbaa to
9acc82f
Compare
|
Your PR has finished running tests. There were no failures. |
|
@cmltaWt0 Thank you for your contribution. Is this ready for our review? |
Yes. It's ready. |
dianakhuang
left a comment
There was a problem hiding this comment.
Thanks so much for this fix!
|
@cmltaWt0 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
Changes:
LANGUAGE_COOKIE_NAMEvalue from common.py for cases when there is noLANGUAGE_COOKIEandLANGUAGE_COOKIE_NAMEin ENV_TOKENSDescription
Fix regression introduced in https://github.com/edx/edx-platform/pull/28796
The defaults from
lms/envs/common.pyandcms/envs/common.pyaren't used.This causes login exception in case
LANGUAGE_COOKIE_NAMEis absent inENV_TOKENS.Actually this happened for tutor installation overhangio/tutor#507 and avoided temporary by settings
LANGUAGE_COOKIE_NAMEincommon_all.pyfor maple release.Supporting information
Original PR: https://github.com/edx/edx-platform/pull/28796
Testing instructions
To test it in devstack just remove
LANGUAGE_COOKIEfrom/edx/etc/lms.ymland try to login into LMS or Studio.Login to the LMS and get the Error:
LanguagePreferenceMiddleware do the following:
Also there are tons of code in the platform with direct accessing to the lang setting as
settings.LANGUAGE_COOKIE_NAME