-
Notifications
You must be signed in to change notification settings - Fork 16
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
replace_with
fails with Cannot replace one element with another when the element to be replaced is not part of a tree
error
#141
Comments
Something odd I noticed is the fact that |
Thanks for the report. I tried importing your XML snippet and it works OK, without console errors or warnings. I get a single imported page as expected with 2 'raw_html` blocks, each containing the iframe.
The |
eg <div> <blockquote></blockquote> <tag></tag> <blockquote></blockquote> </div> <blockquote></blockquote> <div> <tag></tag> </div> <blockquote></blockquote> <blockquote></blockquote> This solve the following crash Cannot replace one element with another when the element to be replaced is not part of a tree Closes torchbox#141
eg <div> <blockquote></blockquote> <tag></tag> <blockquote></blockquote> </div> <blockquote></blockquote> <div> <tag></tag> </div> <blockquote></blockquote> <blockquote></blockquote> This solve the following crash Cannot replace one element with another when the element to be replaced is not part of a tree Closes torchbox#141
eg ```html <div> <blockquote></blockquote> <tag></tag> <blockquote></blockquote> </div> ``` Needs to become ```html <blockquote></blockquote> <div> <tag></tag> </div> <blockquote></blockquote> ``` Before it became ```html <blockquote></blockquote> ``` This solves the following crash ValueError: Cannot replace one element with another when the element to be replaced is not part of a tree. Related torchbox#141
eg <div> <blockquote></blockquote> <tag></tag> <blockquote></blockquote> </div> <blockquote></blockquote> <div> <tag></tag> </div> <blockquote></blockquote> <blockquote></blockquote> This solve the following crash Cannot replace one element with another when the element to be replaced is not part of a tree Closes torchbox#141
Sorry about the title, I am not sure how to name this issue as it is very specific and related to a specific post.
I am still investigating where it comes from but thought I could post it as some of you might have a better idea of the source of the issue.
The importer fails on this specific item
Here is the traceback
And here are some logs I added in the promote_child_tags method
Details
Wagtail v2.15.2
I installed
wagtail-wordpress-import
from the main branch yesterday, so I am using the latest version of this codebase.The text was updated successfully, but these errors were encountered: