Hello,
I am trying to migrate my blog, and I am working on the book content type. I need to use the postImport method to fix the bid of the imported book (the root of the books).
I have implemented postImport in my destination class but it is not triggered and I can't find any call to the next functions in the migrate module.
public function preImport();
public function preRollback();
public function postImport();
public function postRollback();
Is it normal? Do I need to provide a patch?
Thanks for the responses.
Comments
Comment #1
mikeryanYou're right, they were added to the interface (or rather, copied from D7 migrate) but are currently unused in the D8 implementation. We need to think about how this functionality should be supported.
Separately, if the migrate_drupal book migration is not working for you out-of-the-box, can you report that at #2214259: Manual Testing: D6 Book? The last report there was that it was working (maintaining the books structure).
Thanks.
Comment #2
grimreaperOk, Thanks for your response. Should I wait before making a patch or could I try to do one now?
Ok, but it is a D7 migration https://github.com/FlorentTorregrosa/migrate_ftorregrosa, I used the D6 migrations as examples and I adjusted its.
If there are any elements in my module on github that would be useful to document or use, I will be very happy to contribute it. :)
Comment #3
mikeryanAt the moment, the plan is for this to be accomplished by #2535458: Dispatch events at key points during migration.
Comment #4
mikeryanThis functionality has been implemented using events - see https://www.drupal.org/node/2544874
Comment #5
grimreaperThank you very much.
Comment #6
couloir007 commentedUsing https://www.drupal.org/node/2544874 as my guide I've implemented a onPreImport. What I'm not able to do is test whether it is an --update or not. I need this conditional logic. Any thoughts?