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

fix: session_language should be renamed to update_language #33234

Closed

Conversation

shadinaif
Copy link
Contributor

@shadinaif shadinaif commented Sep 13, 2023

fix: session_language should be renamed to update_language

Description

fix: session_language should be renamed to update_language

This is a patch to pull request #32578 because the session_language was renamed
to update_language except in three two locations causing a 500 error

Reverse for 'session_language' not found. 'session_language' is not a valid view function or pattern name.

Request Method: 	GET
Request URL: 	http://localhost:18000/
Django Version: 	3.2.21
Exception Type: 	NoReverseMatch
Exception Value: 	

Reverse for 'session_language' not found. 'session_language' is not a valid view function or pattern name.

Exception Location: 	/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/urls/resolvers.py, line 698, in _reverse_with_prefix
Python Executable: 	/edx/app/edxapp/venvs/edxapp/bin/python
Python Version: 	3.8.10
Python Path: 	

['/edx/app/edxapp/edx-platform',
 '/edx/app/edxapp/edx-platform',
 '/usr/lib/python38.zip',
 '/usr/lib/python3.8',
 '/usr/lib/python3.8/lib-dynload',
 '/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages',
 '/edx/app/edxapp/edx-platform']

Screenshot from 2023-09-13 08-39-11

Note: updating assets is needed after the fix

Supporting information

Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.
Be sure to check they are publicly readable, or if not, repeat the information here.

Testing instructions

Please provide detailed step-by-step instructions for testing this change.

Deadline

"None" if there's no rush, or provide a specific date or event (and reason) if there is one.

Other information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.
  • If your database migration can't be rolled back easily.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Sep 13, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented Sep 13, 2023

Thanks for the pull request, @shadinaif! 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:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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.

@shadinaif
Copy link
Contributor Author

can you please review this @OmarIthawi ?

@OmarIthawi
Copy link
Member

Thanks @shadinaif.

  1. Please use a more descriptive title in both pull request and commit:
fix: `session_language` should be renamed to `update_language`

This is a patch to pull request #32578 because the the `session_language` was renamed
to `update_language` except in two in two locations causing a 500 error:

    Reverse for 'session_language' not found. 'session_language' is not a valid 
    view function or pattern name.

  1. Should we add tests for those pages? It's strange they're not covered with any sort of tests.

@shadinaif shadinaif force-pushed the shadinaif/fix-update_laguage branch from 3f9c1b0 to 4aa1aa9 Compare September 13, 2023 08:37
This is a patch to pull request openedx#32578 because the `session_language` was renamed
to `update_language` except in three locations causing a 500 error:

Reverse for 'session_language' not found. 'session_language' is not a valid view function or pattern name
@shadinaif shadinaif force-pushed the shadinaif/fix-update_laguage branch from 4aa1aa9 to fabb18c Compare September 13, 2023 08:42
@shadinaif
Copy link
Contributor Author

shadinaif commented Sep 13, 2023

Thank you @OmarIthawi . I made a search all over the code, I found another missing one. So we have three now:

Please use a more descriptive title in both pull request and commit:

Done

Should we add tests for those pages? It's strange they're not covered with any sort of tests.

It's not covered because the template parts are rendered iff header language selector is enabled. We can add tests, but I don't see it worth the trouble

Copy link
Member

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shadinaif the pull request title is still on the old patch one. Please update it.

Otherwise it looks good!

As for tests, I'll see what other reviewers think, but my recommendation is to add them. With tests setup, this pull request wouldn't be needed.

@shadinaif shadinaif changed the title fix: patch for PR (#32578) fix: session_language should be renamed to update_language Sep 13, 2023
@mphilbrick211
Copy link

Hi @OmarIthawi and @shadinaif! Can this PR be closed?

@OmarIthawi
Copy link
Member

@mphilbrick211 I think the PR is still valid, but we need tests for it.

@mphilbrick211
Copy link

Hi @OmarIthawi - just checking in on this

@OmarIthawi
Copy link
Member

@mphilbrick211 I think this one is safe to merge. I've faced this bug multiple times already in devstack.

Please consider merging it, even if has no tests.

@mphilbrick211
Copy link

@mphilbrick211 I think this one is safe to merge. I've faced this bug multiple times already in devstack.

Please consider merging it, even if has no tests.

I'm not able to merge, so I'll see if @brian-smith-tcril can maybe do it?

@OmarIthawi
Copy link
Member

OmarIthawi commented Jan 20, 2024

@brian-smith-tcril @shadinaif @mphilbrick211 this pull request is no longer needed because another similar fix has already been merged:

I was trying to rebase to fix tests and found out.

@OmarIthawi OmarIthawi closed this Jan 20, 2024
@openedx-webhooks
Copy link

@shadinaif Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

@OmarIthawi OmarIthawi deleted the shadinaif/fix-update_laguage branch January 20, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants