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

Dismiss for Discussions x-blocks deprecation banner in Studio causes 500 error message #34483

Open
DmytroAlipov opened this issue Apr 8, 2024 · 4 comments
Labels
bug Report of or fix for something that isn't working as intended

Comments

@DmytroAlipov
Copy link
Contributor

DmytroAlipov commented Apr 8, 2024

edx.cms  | 2024-04-08 09:42:28,266 ERROR 32 [django.request] [user None] [ip None] log.py:241 - Internal Server Error: /course/course-v1:RG+New-course-2+2024
edx.cms  | Traceback (most recent call last):
edx.cms  |   File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner
edx.cms  |     response = get_response(request)
edx.cms  |   File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/handlers/base.py", line 197, in _get_response
edx.cms  |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
edx.cms  |   File "/usr/lib/python3.8/contextlib.py", line 75, in inner
edx.cms  |     return func(*args, **kwds)
edx.cms  |   File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapper_view
edx.cms  |     return view_func(request, *args, **kwargs)
edx.cms  |   File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/course.py", line 301, in course_handler
edx.cms  |     raise NotImplementedError()
edx.cms  | NotImplementedError
edx.cms  | [08/Apr/2024 09:42:28] "DELETE /course/course-v1:RG+New-course-2+2024 HTTP/1.1" 500 245031

This error concerns the Dismiss button:

Знімок екрана 2024-04-08 о 13 41 21

This error occurs here:

elif request.method == 'DELETE':
    raise NotImplementedError()

This banner was added in this MR. But the backend part was not prepared for this at all.

Hello, @muhammadadeeltajamul, You have been working on this task. Can you tell me if there are plans to continue this work? Would it be possible to add a variable to control the display of the banner? It could help manage user preferences or control this content.
As I understand it, in the current implementation the Dismiss button is not needed at all.

@DmytroAlipov DmytroAlipov added the bug Report of or fix for something that isn't working as intended label Apr 8, 2024
@qasimgulzar
Copy link
Contributor

Hey @DmytroAlipov I was looking into this issue, but unable to understand the relation between this Warning popup and the code you have linked. I tried to reproduce this issue but nothing happens even it didn't sent out any request to the studio/lms server.

https://drive.google.com/file/d/1kXSheo-WHtzBVPJsV7rBh906z4Z5HCLS/view?usp=sharing

@DmytroAlipov
Copy link
Contributor Author

Hi @qasimgulzar
But if you reload the page, the banner will be displayed again.

@qasimgulzar
Copy link
Contributor

qasimgulzar commented Apr 18, 2024

@DmytroAlipov can we find the original issue under which this banner was added, so we can better understand the intention. You are right on refresh it appears again.

Note: We have notifications in openedx to maintain user specific state of the notification. Ideal that would have to be reused here. I can take care of it you are think the same?

@DmytroAlipov
Copy link
Contributor Author

DmytroAlipov commented Apr 18, 2024

In my opinion, it is best to do as it is implemented for this banner. Here, when you click Dismiss, the backend works.
dissm

After the Dismiss button for the top banner is pressed, this top banner no longer appears after the page reloads

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
Projects
None yet
Development

No branches or pull requests

2 participants