wagtail / wagtail-localize

Translation plugin for Wagtail CMS
https://wagtail-localize.org/
Other
226 stars 86 forks source link

Cannot edit translated pages: `side_panels.py` is `missing 1 required keyword-only argument: 'show_schedule_publishing_toggle'` #644

Closed janbaykara closed 1 year ago

janbaykara commented 2 years ago

When I try to edit a newly created translation of a page, the edit page crashes:

Internal Server Error: /admin/pages/5052/edit/
Traceback (most recent call last):
  File "/workspace/create/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/workspace/create/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/workspace/create/lib/python3.9/site-packages/django/views/decorators/cache.py", line 62, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/workspace/create/lib/python3.9/site-packages/wagtail/admin/urls/__init__.py", line 170, in wrapper
    return view_func(request, *args, **kwargs)
  File "/workspace/create/lib/python3.9/site-packages/wagtail/admin/auth.py", line 182, in decorated_view
    response = view_func(request, *args, **kwargs)
  File "/workspace/create/lib/python3.9/site-packages/django/views/generic/base.py", line 103, in view
    return self.dispatch(request, *args, **kwargs)
  File "/workspace/create/lib/python3.9/site-packages/wagtail/admin/views/pages/edit.py", line 349, in dispatch
    response = self.run_hook("before_edit_page", self.request, self.page)
  File "/workspace/create/lib/python3.9/site-packages/wagtail/admin/views/generic/mixins.py", line 28, in run_hook
    result = fn(*args, **kwargs)
  File "/workspace/create/lib/python3.9/site-packages/wagtail_localize/wagtail_hooks.py", line 279, in before_edit_page
    return edit_translation.edit_translation(request, translation, page)
  File "/workspace/create/lib/python3.9/site-packages/wagtail_localize/views/edit_translation.py", line 977, in edit_translation
    LocalizedPageSidePanels(request, instance, translation) if is_page else None
  File "/workspace/create/lib/python3.9/site-packages/wagtail_localize/side_panels.py", line 42, in __init__
    super().__init__(request, page, preview_enabled=False, comments_enabled=False)
TypeError: __init__() missing 1 required keyword-only argument: 'show_schedule_publishing_toggle'
[02/Nov/2022 09:43:32] "GET /admin/pages/5052/edit/ HTTP/1.1" 500 111425

Versions

zerolab commented 2 years ago

On my list to look at this Friday, unless there's a PR before that ;)

zerolab commented 1 year ago

Fixed in v1.3.2