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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeryan created an issue. See original summary.

frederickjh’s picture

Hi @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

John_B’s picture

Comment migration is not working for me. I have not yet worked out why.

frederickjh’s picture

Priority: Normal » Major
Issue summary: View changes

Changing description to reflect the reality of the situation and the priority to major as currently there is no easy workaround to this issue.

John_B’s picture

Actually 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.

John_B’s picture

Category: Bug report » Task
FileSize
1.4 KB

Changing 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.

John_B’s picture

The migration .yml file should probably also have the comment body format defined. Currently it gets set to null.

HongPong’s picture

Status: Active » Needs review

John_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.

John_B’s picture

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.

My view is that no Migrate recipe is ever going handle the edge cases anything 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.

frederickjh’s picture

Status: Needs review » Reviewed & tested by the community

I tested the patch in #6 with a vanilla word press migration. Default Wordpress and default Drupal 8 comment settings. All comments were imported successfully.

  • HongPong committed b17a7f8 on 8.x-3.x authored by John_B
    Issue #2742311 by John_B, frederickjh, mikeryan: Comment migration now...
HongPong’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for the testing frederickjh and insight John_B. tagging a new release!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.