There's a major bug in the underlying XML support (#2742233: parentXpathCache/parentElementsOfInterest does not work) that prevents comment migration from working. There shouldn't be anything we need to do in wordpress_migrate to deal with this - once migrate_plus is fixed it should just work - but I want to leave this issue open as a signpost for anyone who misses the mention of this in the README and looks in the issue queue for why comments don't work.
Comment migration is NOT working. It appears that the original poster's claim that the upstream issue would fix this without any further action has proven to be false 3 years later.
Comment | File | Size | Author |
---|---|---|---|
#6 | wordpress_migrate_ui-add_commment-2742311-1.patch | 1.4 KB | John_B |
Comments
Comment #2
frederickjhHi @mikeryan !
It appears that the linked Migrate Plus issue has been closed for over a year now and Migrate Plus has released 3 releases since then.
Is comment migration now working? Can this issue be closed?
Thanks!
Frederick
Comment #3
John_B CreditAttribution: John_B commentedComment migration is not working for me. I have not yet worked out why.
Comment #4
frederickjhChanging description to reflect the reality of the situation and the priority to major as currently there is no easy workaround to this issue.
Comment #5
John_B CreditAttribution: John_B commentedActually comment migration does work for me.
The reason I thought it did not work is that I cannot get the drush command to work with Drush 8 or Drush 9, and the comment migration is not available in the UI. I extended wordpress_migrate_ui to add a form (with no configuration) for migrating comments.
Comment bodies are imported provided I use the core comment field in D8, and run comment import via the UI. If using a non-core comment field, then comments are imported but the body was not populated, so the migration yml file probably needs tweaking.
Comment #6
John_B CreditAttribution: John_B commentedChanging issue to 'task' on the basis that this works provided the UI submodule is changed to include comments, as per my comment above.
I add a crude patch showing what I did to get it working.
I opened a seperate ticket for making the drush command work for Drush 9.
Comment #7
John_B CreditAttribution: John_B commentedThe migration .yml file should probably also have the comment body format defined. Currently it gets set to null.
Comment #8
HongPong CreditAttribution: HongPong at kor group commentedJohn_B thanks for checking into this, excellent information to know. I would be thrilled if we can get someone to test more of these patches - since there are tons of edge cases possible with inputs to this module, it is challenging to figure out if any patch is sufficiently refined.
Comment #9
John_B CreditAttribution: John_B commentedMy view is that no Migrate recipe is ever going handle
the edge casesanything other than vanilla Wordpress migrations. There are definitely ways of extending the module to cover more aspects of vanilla migrations--attachments, Yoast fields etc. For the rest, it is going to need some basic coding skills to set up a recipe for Migrate module.Comment #10
frederickjhI tested the patch in #6 with a vanilla word press migration. Default Wordpress and default Drupal 8 comment settings. All comments were imported successfully.
Comment #12
HongPong CreditAttribution: HongPong at kor group commentedThank you for the testing frederickjh and insight John_B. tagging a new release!