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

Error when trying to archive a page without backend language translation #2405

Closed
seluianova opened this issue Aug 22, 2023 · 0 comments · Fixed by #2406
Closed

Error when trying to archive a page without backend language translation #2405

seluianova opened this issue Aug 22, 2023 · 0 comments · Fixed by #2406
Assignees
Labels
🐛 bug Something isn't working ☺️ effort: low Should be doable in <4h
Milestone

Comments

@seluianova
Copy link
Contributor

seluianova commented Aug 22, 2023

Describe the Bug

Pages without backend language translation ( it's a CMS UI language I guess?) cannot be archived, since this action uses a title in the backend language to print a success message

Steps to Reproduce

  1. Set CMS UI language to English in user settings
  2. Try archiving any page without an English translation

Expected Behavior

Page can be archived

Actual Behavior

Error occurs:
image

Additional Information

Aug 21 20:59:47 ERROR django.request - 500 Internal Server Error: /augsburg/pages/de/bulk-archive/
Traceback (most recent call last):
  File "/home/tory/Integreat/integreat-cms/.venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/home/tory/Integreat/integreat-cms/.venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, callback_args, *callback_kwargs)
  File "/home/tory/Integreat/integreat-cms/.venv/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, args, *kwargs)
  File "/home/tory/Integreat/integreat-cms/.venv/lib/python3.9/site-packages/django/contrib/auth/mixins.py", line 104, in dispatch
    return super().dispatch(request, args, *kwargs)
  File "/home/tory/Integreat/integreat-cms/.venv/lib/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
    return handler(request, args, *kwargs)
  File "/home/tory/Integreat/integreat-cms/integreat_cms/cms/views/bulk_action_views.py", line 288, in post
    content_object.backend_translation.title
AttributeError: 'NoneType' object has no attribute 'title'
@seluianova seluianova added 🐛 bug Something isn't working ☺️ effort: low Should be doable in <4h labels Aug 22, 2023
@seluianova seluianova added this to the 23Q3 milestone Aug 22, 2023
@seluianova seluianova self-assigned this Aug 22, 2023
@seluianova seluianova linked a pull request Aug 22, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working ☺️ effort: low Should be doable in <4h
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant