You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and try to add one, with multiple locales set in the locale setting
I get the following error:
Internal Server Error: /admin/pages/add/app_cms/pageroot/1/
Traceback (most recent call last):
File "C:\Work\virtual_env\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\Work\virtual_env\lib\site-packages\django\core\handlers\base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Work\virtual_env\lib\site-packages\django\views\decorators\cache.py", line 44, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "C:\Work\virtual_env\lib\site-packages\wagtail\admin\urls\__init__.py", line 127, in wrapper
return view_func(request, *args, **kwargs)
File "C:\Work\virtual_env\lib\site-packages\wagtail\admin\auth.py", line 193, in decorated_view
return view_func(request, *args, **kwargs)
File "C:\Work\virtual_env\lib\site-packages\django\views\generic\base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "C:\Work\virtual_env\lib\site-packages\wagtail\admin\views\pages\create.py", line 96, in dispatch
return super().dispatch(request)
File "C:\Work\virtual_env\lib\site-packages\django\views\generic\base.py", line 98, in dispatch
return handler(request, *args, **kwargs)
File "C:\Work\virtual_env\lib\site-packages\wagtail\admin\views\pages\create.py", line 104, in post
return self.form_valid(self.form)
File "C:\Work\virtual_env\lib\site-packages\wagtail\admin\views\pages\create.py", line 110, in form_valid
return self.publish_action()
File "C:\Work\virtual_env\lib\site-packages\wagtail\admin\views\pages\create.py", line 151, in publish_action
self.parent_page.add_child(instance=self.page)
File "C:\Work\virtual_env\lib\site-packages\treebeard\mp_tree.py", line 1022, in add_child
return MP_AddChildHandler(self, **kwargs).process()
File "C:\Work\virtual_env\lib\site-packages\treebeard\mp_tree.py", line 389, in process
newobj.save()
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\contextlib.py", line 74, in inner
return func(*args, **kwds)
File "C:\Work\virtual_env\lib\site-packages\wagtail\core\models.py", line 1005, in save
result = super().save(**kwargs)
File "C:\Work\virtual_env\lib\site-packages\modelcluster\models.py", line 196, in save
super(ClusterableModel, self).save(update_fields=real_update_fields, **kwargs)
File "C:\Work\virtual_env\lib\site-packages\django\db\models\base.py", line 754, in save
force_update=force_update, update_fields=update_fields)
File "C:\Work\virtual_env\lib\site-packages\django\db\models\base.py", line 803, in save_base
update_fields=update_fields, raw=raw, using=using,
File "C:\Work\virtual_env\lib\site-packages\django\dispatch\dispatcher.py", line 179, in send
for receiver in self._live_receivers(sender)
File "C:\Work\virtual_env\lib\site-packages\django\dispatch\dispatcher.py", line 179, in <listcomp>
for receiver in self._live_receivers(sender)
File "C:\Work\virtual_env\lib\site-packages\wagtail_localize\synctree.py", line 213, in on_page_saved
locale, copy_parents=True, alias=True
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\contextlib.py", line 74, in inner
return func(*args, **kwds)
File "C:\Work\virtual_env\lib\site-packages\wagtail\core\models.py", line 2325, in copy_for_translation
reset_translation_key=False,
File "C:\Work\virtual_env\lib\site-packages\wagtail\core\models.py", line 2210, in create_alias
alias = parent.add_child(instance=alias)
File "C:\Work\virtual_env\lib\site-packages\treebeard\mp_tree.py", line 1022, in add_child
return MP_AddChildHandler(self, **kwargs).process()
File "C:\Work\virtual_env\lib\site-packages\treebeard\mp_tree.py", line 389, in process
newobj.save()
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\contextlib.py", line 74, in inner
return func(*args, **kwds)
File "C:\Work\virtual_env\lib\site-packages\wagtail\core\models.py", line 982, in save
self.full_clean()
File "C:\Work\virtual_env\lib\site-packages\wagtail\core\models.py", line 948, in full_clean
super().full_clean(*args, **kwargs)
File "C:\Work\virtual_env\lib\site-packages\django\db\models\base.py", line 1233, in full_clean
raise ValidationError(errors)
django.core.exceptions.ValidationError: {'path': ['Page with this Path already exists.']}
Fixes#245.
This just works around the crash by disabling the auto-creation of
homepages when a new homepage is created in a locale that is set in the
"sync from" field of another.
The problem is that Treebeard calls the post_save signal before it's set
the numchild attribute of the parent. This isn't a problem in most cases
as the translations are created underneath other parent pages. But for
homepages, we need the parent `numchild` to be up to date because
translations of homepages are created as siblings.
Without the correct numchild, Treebeard/Wagtail attempts to create those
siblings with the same path which results in a crash.
Fixes#245.
This just works around the crash by disabling the auto-creation of
homepages when a new homepage is created in a locale that is set in the
"sync from" field of another.
The problem is that Treebeard calls the post_save signal before it's set
the numchild attribute of the parent. This isn't a problem in most cases
as the translations are created underneath other parent pages. But for
homepages, we need the parent `numchild` to be up to date because
translations of homepages are created as siblings.
Without the correct numchild, Treebeard/Wagtail attempts to create those
siblings with the same path which results in a crash.
Whenever I have no pages (see below image)
and try to add one, with multiple locales set in the locale setting
I get the following error:
With the following Page:
The text was updated successfully, but these errors were encountered: