There is finally a dev release of the privatemsg out for drupal 6.x.

This has a different database structure from the drupal 5 versions. The released phpbb2privatemsg module assumes the old structure. This needs to be updated.

Comments

naheemsays’s picture

Status: Active » Fixed

untested updates have been committed to both HEAD and the 6.x-1.x-dev branch.

naheemsays’s picture

Status: Fixed » Active

"un-fixing" the issue as there are side effects of the change: false positives in the dupe checking.

previously, the module compared author, recipient and the timestamp to see wether the message was a dupe or not. This had a miniscule chance for false positives: two messages sent at the same timestamp by the same person to the same person, but with a different message body.

The new system only compares the author and the body - if a person sent the same message to multiple people, it will see all messages after the first one as dupes and not import them.

Simple and ugly solution is to remove dupe checking.

More complicated solution is to have a more finegrained check through the two separate database tables to make 100% sure the message is not a dupe.

I will hold off on this until the schema of the privatemsg module stabilises, as any changes there may open up other avenues.

naheemsays’s picture

Status: Active » Fixed
NeoID’s picture

As privatemsg has both a 1.x and 2.x version.. what have you used when developing this module? :)
I'll do a second test-importing in the next couple of days and report back, but my first test-import some days ago did import everything except posts with attachments and private messages. That was with the prior version of this module, so I guess the attachments-bug is sorted, so I'll see how the private messages works now... :)

naheemsays’s picture

The privatemsg 2.x version is really old and not to be used. it's code is the same as 1.0-rc2.

Saying that, since then, there have been no schema changes in privatemsg, so there should be no incompatibility.

As for testing, it would be good to have people test the import messages from phpbb3 - I refactored the code, but it has not been tested so I expect bugs to be lingering somewhere.

NeoID’s picture

Edit: Guess there's a typo somewhere ("db_name"."some random number that (I guess) shouldn have been phpbb_""table_name"...):
http://img132.imageshack.us/img132/7838/privmsgsimport.jpg

naheemsays’s picture

oops - a simple bug I think.

in the phpbb2privatemsg.module file, can you change line 153 from

  $result = db_query($query, $pm->msg_id);

to

  $result = db_query($query, $pre, $pm->msg_id);

and try again?

This should be fixed in HEAD.

NeoID’s picture

Cool, now it imported the private messages!

I'm not too familiar with Drupal's private message module, but my user on phpBB automatically sends an PM to new users upon registration and for some reason I found all those messages (all welcome messages sent to new users) in my inbox...quite messy... :P

Not sure if we may consider it a bug or feature/"by design" as private message module lists topics by participants and as I've sent that message I'm also considered a participants.
However.. as I sent those messages they rather should have shown up under sent messages then inbox in my opinion...

naheemsays’s picture

What version of privatemsg are you using?

If you are using 1.0-rc2 then that does not have an inbox - but an all messages and a sent messages.

If you are using the newer 6.x-1.x-dev, then that does have an inbox if you enable the filter module and if the messages are showing in the inbox, that may be a bug in the import (unless there was a reply back to you).

So far thanks for testing - makes it much closer for me to release a 2.0 version (which may be the same as the current changes in HEAD if there are no other bugs.)

NeoID’s picture

I'm using: Privatemsg 6.x-1.x-dev (2009-mai-02)
The messages were "sent" from my account to another user and I've never got a reply from them...

However, on a second thought... as the messages may not be sent in the ordinary way as the rest of the messages, but "placed" in the newly registered users inbox. It's a phpBB-mod I've added myself, so I think this is a mod-related problem which makes the import think that the message has been sent to me and the new user... or something like that... Quite har to explain, but I don't think this is a import-related issue, but the phpbb-mod that has done something wrong in term of sending the message to the user...

Glad to help... I'll test anything you want :)

Status: Fixed » Closed (fixed)

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