500 error when saving page after changing title #3319
Labels
bug
Something isn't working
needs-further-investigation
This issue needs some further research/investigation
prio: medium
Should be scheduled in the forseeable future.
Milestone
Describe the Bug
Sometimes a 500 error is shown after changing the title of a page in Farsi, Arabic and Russian (maybe other languages too) and trying to save the changes. Although the 500 errror is shown, the changes are still saved.
I haven't yet found a way to reliably reproduce this...
Steps to Reproduce
tbd
Expected Behavior
Page is saved without 500 error.
Actual Behavior
Sometimes 500 error shows up but changes are still saved.
Additional Information
Traceback
Jan 16 18:30:27 ERROR django.request - 500 Internal Server Error: /dortmund/pages/fa/10877/edit/ Traceback (most recent call last): File "/opt/integreat-cms/.venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/integreat-cms/.venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/integreat-cms/.venv/lib/python3.11/site-packages/django/views/generic/base.py", line 104, in view return self.dispatch(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/integreat-cms/.venv/lib/python3.11/site-packages/django/utils/decorators.py", line 46, in _wrapper return bound_method(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/integreat-cms/.venv/lib/python3.11/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapper_view return view_func(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/integreat-cms/.venv/lib/python3.11/site-packages/django/views/generic/base.py", line 143, in dispatch return handler(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/contextlib.py", line 81, in inner return func(*args, **kwds) ^^^^^^^^^^^^^^^^^^^ File "/opt/integreat-cms/.venv/lib/python3.11/site-packages/integreat_cms/cms/views/pages/page_form_view.py", line 346, in post "page_id": other_translation.page.id, ^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'page'The text was updated successfully, but these errors were encountered: