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

Files: 
CommentFileSizeAuthor
#1 privatemsg.migrate.inc_.txt6.6 KBhadsie

Comments

StatusFileSize
new6.6 KB

Category:bug» feature

Status:Needs review» Needs work

A couple of things:

  1. Naming conventions - _privatemsg_migrate_save is not a good method name. privateMsgSave(), perhaps - but isn't there an API function in the privatemsg module you can call?
  2. Please use dbtng (db_insert, db_select, etc.) instead of D6 db_query calls.

Subscribe:-). I'll be needing this soon - see related request #1184984: Full public CRUD API

Status:Needs work» Needs review

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

Version:6.x-2.x-dev» 7.x-2.x-dev

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

Status:Needs review» Fixed

This was committed long ago, any problems found with the privatemsg integration should be opened up as separate issues.

Status:Fixed» Closed (fixed)

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