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

forums v2: invalud parameters being passed to thread retrieval #155

Open
feoh opened this issue Jan 28, 2025 · 1 comment
Open

forums v2: invalud parameters being passed to thread retrieval #155

feoh opened this issue Jan 28, 2025 · 1 comment
Labels
bug Report of or fix for something that isn't working as intended release blocker Blocks the upcoming release (fix needed)

Comments

@feoh
Copy link

feoh commented Jan 28, 2025

Hi there folks;

We're trying to migrate to forums v2, and we're seeing the params object being unpacked into the get_user_threads function call and we're seeing a 'context' parameter that's causing this function to blow up with the following exception:

lms-1  | 2025-01-28 21:00:45,390 ERROR 13 [edx.courseware] views.py:622 - Error in /courses/course-v1:MITx+10.50.CH01x+1T2023/discussion/forum/: user=cpatti, effective_user=cpatti, course=course-v1:MITx+10.50.CH01x+1T2023
lms-1  | Traceback (most recent call last):
lms-1  |   File "/openedx/edx-platform/lms/djangoapps/courseware/views/views.py", line 534, in get
lms-1  |     return super().get(request, course=course, page_context=page_context, **kwargs)
lms-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/.local/lib/python3.11/site-packages/web_fragments/views.py", line 23, in get
lms-1  |     fragment = self.render_to_fragment(request, **kwargs)
lms-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/edx-platform/lms/djangoapps/courseware/views/views.py", line 688, in render_to_fragment
lms-1  |     return tab.render_to_fragment(request, course, **kwargs)
lms-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/edx-platform/xmodule/tabs.py", line 291, in render_to_fragment
lms-1  |     return self.fragment_view.render_to_fragment(request, course_id=str(course.id), **kwargs)
lms-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/edx-platform/lms/djangoapps/discussion/views.py", line 827, in render_to_fragment
lms-1  |     context = _create_discussion_board_context(request, base_context, thread=thread)
lms-1  |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/edx-platform/lms/djangoapps/discussion/views.py", line 529, in _create_discussion_board_context
lms-1  |     threads, query_params = get_threads(request, course, user_info)   # This might process a search query
lms-1  |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/edx-platform/lms/djangoapps/discussion/views.py", line 172, in get_threads
lms-1  |     paginated_results = cc.Thread.search(query_params)
lms-1  |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/edx-platform/openedx/core/djangoapps/django_comment_common/comment_client/thread.py", line 83, in search
lms-1  |     response = forum_api.get_user_threads(**params)
lms-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  | TypeError: get_user_threads() got an unexpected keyword argument 'context'

Here's a link to a public Sentry issue which has some more details on the exception.

Thanks in advance for any clues you can give us!

@feoh
Copy link
Author

feoh commented Jan 30, 2025

@pdpinch pdpinch added bug Report of or fix for something that isn't working as intended release blocker Blocks the upcoming release (fix needed) labels Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of or fix for something that isn't working as intended release blocker Blocks the upcoming release (fix needed)
Projects
None yet
Development

No branches or pull requests

2 participants