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

Cancelling translation process not possible #1164

Closed
Tracked by #1887
timobrembeck opened this issue Feb 15, 2022 · 0 comments · Fixed by #1186
Closed
Tracked by #1887

Cancelling translation process not possible #1164

timobrembeck opened this issue Feb 15, 2022 · 0 comments · Fixed by #1186
Assignees
Labels
🐛 bug Something isn't working ❗ prio: medium Should be scheduled in the forseeable future.

Comments

@timobrembeck
Copy link
Member

Describe the Bug

When a page is currently in translation, its not possible to cancel this process anymore.

Steps to Reproduce

  1. Go to page tree
  2. Export page as xliff
  3. Open page form that is in translation
  4. Click on "Abort translation process"

Expected Behavior

The process should be aborted and the UI should be updated

Actual Behavior

Nothing happens and the ajax view returns a 500 error code

Additional Information

Traceback
Feb 15 01:15:50 ERROR   django.request - Internal Server Error: /ajax/nuernberg/post_translation_state
Traceback (most recent call last):
File "/opt/integreat-cms/.venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
  response = get_response(request)
File "/opt/integreat-cms/.venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
  response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/integreat-cms/.venv/lib/python3.8/site-packages/django/views/decorators/http.py", line 40, in inner
  return func(request, *args, **kwargs)
File "/opt/integreat-cms/.venv/lib/python3.8/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
  return view_func(request, *args, **kwargs)
File "/opt/integreat-cms/.venv/lib/python3.8/site-packages/integreat_cms/cms/decorators.py", line 112, in wrap
  return function(request, *args, **kwargs)
File "/opt/integreat-cms/.venv/lib/python3.8/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
  return view_func(request, *args, **kwargs)
File "/opt/integreat-cms/.venv/lib/python3.8/site-packages/integreat_cms/cms/views/pages/page_actions.py", line 395, in post_translation_state_ajax
  page_translation = page.get_translation(target_language.slug)
AttributeError: 'str' object has no attribute 'slug'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working ❗ prio: medium Should be scheduled in the forseeable future.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant