Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It looked like privatemsg support was missing from the migrate_extras module so here's a "first draft" for the privatemsg migrate support on the 2.x branch :). It doesn't support importing of threaded messages yet and it has a bunch of commented out code that still needs review and more testing (as to whether it's even necessary or not).
Let me know if I've done this correctly or if there's anything I'm missing
- Scott
Comment | File | Size | Author |
---|---|---|---|
#1 | privatemsg.migrate.inc_.txt | 6.6 KB | hadsie |
Comments
Comment #1
hadsie CreditAttribution: hadsie commentedComment #2
mikeryanComment #3
mikeryanA couple of things:
Comment #4
mikeryanSubscribe:-). I'll be needing this soon - see related request #1184984: Full public CRUD API
Comment #5
mikeryanMoshe and I put some work into this today and committed - minimally tested, so any interested parties are encouraged to pull it and try it before we mark this fixed.
Comment #6
geerlingguy CreditAttribution: geerlingguy commentedBeen trying to use this on my site, and it doesn't handle errors too gracefully (was getting lots of array_flip() errors from entity.inc, due to missing users that didn't exist in source database, and it took me a while to figure out why), but the messages are all imported respectably. It doesn't seem there is any way to indicate threads, though :-/
Just looked through #1184984: Full public CRUD API, and had a glance through privatemsg and the inc file with migrate_extras, and threading looks like it would be well nigh impossible without writing up something to create the initial thread message, storing that thread, and following up by adding other messages to it... not very fun, and not that well-suited to a migration process, imo.
Comment #7
mikeryanThis was committed long ago, any problems found with the privatemsg integration should be opened up as separate issues.