-
Notifications
You must be signed in to change notification settings - Fork 30
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
Adding `'wagtailcore.page' to WAGTAILTRANSFER_LOOKUP_FIELDS causes error trying to match in admin #133
Comments
Hey Eric, We ran into this issue as well because we wanted to use WAGTAILTRANSFER_LOOKUP_FIELDS = {
…
"wagtailcore.Page": ["url_path"],
} As we were on a tight deadline to make use of this, we implemented a very similar fix in a fork, intending to PR it back of course, but just never got around to it. Would love to work together and settle on the best approach. /cc @addisonhardy Also interested in input from the wagtail-transfer creators on why this sort of approach wasn't taken in the first place, given that maintaining links to / choices of pages on transfer seems pretty highly desirable. |
Looks like at least some related discussion and context in the commit messages on this branch: #15 |
@Scotchester one idea I'm also considering that I wonder if ya'll considered:
this seems to work without changes to |
But that only works if the page has already been imported? The reason we went down this road was to handle links/choosers to non-imported pages that already exist. |
@Scotchester right, thanks for the reminder! :-D |
I don’t think there was ever an expectation that WAGTAILTRANSFER_LOOKUP_FIELDS would be used for looking up the page model, but nothing prevents that from happening either.
However, with this setting on import the admin will fail to find the correct matching page.
#132 proposes a change to allow this, though please consider it just a starting place for discussion as it may not be the best place to make the change (and probably merits some test coverage, ideally)
To replicate
WAGTAILTRANSFER_LOOKUP_FIELDS
ValueError: Field 'id' expected a number but got 'e'.
when trying to choose the page to importuid
is getting passed along as a string instead of a tuple, so it can't match based on that because it gets parsed incorrectlyThe text was updated successfully, but these errors were encountered: