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

django.urls.exceptions.NoReverseMatch error when opening empty content list #2151

Closed
timobrembeck opened this issue Mar 23, 2023 · 0 comments · Fixed by #2152
Closed

django.urls.exceptions.NoReverseMatch error when opening empty content list #2151

timobrembeck opened this issue Mar 23, 2023 · 0 comments · Fixed by #2152
Assignees
Labels
🍼 good first issue Good for newcomers 🐛 bug Something isn't working ⁉️ prio: low Not urgent, can be resolved in the distant future. ☺️ effort: low Should be doable in <4h
Milestone

Comments

@timobrembeck
Copy link
Member

Describe the Bug

When the page/event/location/imprint/push notification lists are opened in a region without a language tree, an error occurs.

Steps to Reproduce

  1. Create empty region
  2. Go to e.g. page tree
  3. See error

Expected Behavior

One should be redirected to the language tree to create nodes

Actual Behavior

django.urls.exceptions.NoReverseMatch: Reverse for 'language_tree' not found. 'language_tree' is not a valid view function or pattern name.

Additional Information

Traceback
Internal Server Error: /empty/pages/
Traceback (most recent call last):
File "/home/timo/job/integreat/integreat-cms/.venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 47, in inner
  response = get_response(request)
File "/home/timo/job/integreat/integreat-cms/.venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 181, in _get_response
  response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/timo/job/integreat/integreat-cms/.venv/lib/python3.10/site-packages/django/views/generic/base.py", line 70, in view
  return self.dispatch(request, *args, **kwargs)
File "/home/timo/job/integreat/integreat-cms/.venv/lib/python3.10/site-packages/django/utils/decorators.py", line 43, in _wrapper
  return bound_method(*args, **kwargs)
File "/home/timo/job/integreat/integreat-cms/.venv/lib/python3.10/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
  return view_func(request, *args, **kwargs)
File "/home/timo/job/integreat/integreat-cms/.venv/lib/python3.10/site-packages/django/views/generic/base.py", line 98, in dispatch
  return handler(request, *args, **kwargs)
File "/home/timo/job/integreat/integreat-cms/integreat_cms/cms/views/pages/page_tree_view.py", line 83, in get
  return redirect(
File "/home/timo/job/integreat/integreat-cms/.venv/lib/python3.10/site-packages/django/shortcuts.py", line 41, in redirect
  return redirect_class(resolve_url(to, *args, **kwargs))
File "/home/timo/job/integreat/integreat-cms/.venv/lib/python3.10/site-packages/django/shortcuts.py", line 130, in resolve_url
  return reverse(to, args=args, kwargs=kwargs)
File "/home/timo/job/integreat/integreat-cms/.venv/lib/python3.10/site-packages/django/urls/base.py", line 86, in reverse
  return resolver._reverse_with_prefix(view, prefix, *args, **kwargs)
File "/home/timo/job/integreat/integreat-cms/.venv/lib/python3.10/site-packages/django/urls/resolvers.py", line 698, in _reverse_with_prefix
  raise NoReverseMatch(msg)
django.urls.exceptions.NoReverseMatch: Reverse for 'language_tree' not found. 'language_tree' is not a valid view function or pattern name.

This is a regression from b2eaf7e.

@timobrembeck timobrembeck added 🐛 bug Something isn't working 🍼 good first issue Good for newcomers ⁉️ prio: low Not urgent, can be resolved in the distant future. ☺️ effort: low Should be doable in <4h labels Mar 23, 2023
@timobrembeck timobrembeck added this to the 23Q1 milestone Mar 23, 2023
@timobrembeck timobrembeck self-assigned this Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍼 good first issue Good for newcomers 🐛 bug Something isn't working ⁉️ prio: low Not urgent, can be resolved in the distant future. ☺️ effort: low Should be doable in <4h
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant