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
I've been testing using this for the first time using two development servers with the same configuration, but with dumps from my staging and production servers. I've been running into a couple of different issues. The first is that often, an import process will redirect to the desired parent page as if it was complete, but with no data transferred. I haven't seen any logs or errors related to this, so my assumption is that it's related to the next error.
On some types of pages, I'm running into the following error when importing (truncated to the important part):
File "/Users/eward/.virtualenvs/kcai/lib/python3.10/site-packages/wagtail_transfer/views.py", line 60, in pages_for_export
uid = get_locator_for_model(model).get_uid_for_local_id(pk)
File "/Users/eward/.virtualenvs/kcai/lib/python3.10/site-packages/wagtail_transfer/locators.py", line 147, in get_locator_for_model
return IDMappingLocator(base_model)
File "/Users/eward/.virtualenvs/kcai/lib/python3.10/site-packages/wagtail_transfer/locators.py", line 33, in __init__
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: IDMappingLocator cannot be used on MTI subclasses (got <class 'common.models.EditorialPage'>)
Looking into the relevant lines, it looks like this is expected by the code to pass in the base Wagtail Page class, which is eventually determined by the following function (from here)
def get_base_model(model):
"""
For the given model, return the highest concrete model in the inheritance tree -
e.g. for BlogPage, return Page
"""
if model._meta.parents:
model = model._meta.get_parent_list()[0]
return model
This is expected to return the base model of the class, but looking at the Django documentation, the get_parent_list function is expected to return in MRO, i.e., the highest concrete model last. This is supported by experimenting in the django shell and looking at the meta values for the Page model in question:
I'm not sure whether this is an error or something that's incorrect with how I'm trying to use this tool. I haven't done any preseeding since these two databases should be distinct, but I wouldn't think that would have an impact on this.
The text was updated successfully, but these errors were encountered:
I've been testing using this for the first time using two development servers with the same configuration, but with dumps from my staging and production servers. I've been running into a couple of different issues. The first is that often, an import process will redirect to the desired parent page as if it was complete, but with no data transferred. I haven't seen any logs or errors related to this, so my assumption is that it's related to the next error.
On some types of pages, I'm running into the following error when importing (truncated to the important part):
Looking into the relevant lines, it looks like this is expected by the code to pass in the base Wagtail Page class, which is eventually determined by the following function (from here)
This is expected to return the base model of the class, but looking at the Django documentation, the
get_parent_list
function is expected to return in MRO, i.e., the highest concrete model last. This is supported by experimenting in the django shell and looking at the meta values for the Page model in question:I'm not sure whether this is an error or something that's incorrect with how I'm trying to use this tool. I haven't done any preseeding since these two databases should be distinct, but I wouldn't think that would have an impact on this.
The text was updated successfully, but these errors were encountered: