PDA

View Full Version : Issues with importing private messages from phpBB



jashan
Tue 23rd Jan '07, 5:03pm
* Clean import
* Source - phpBB 2.0.22
* Target - vBulletin 3.5.7

I am trying to make sure that all private messages are being imported correctly from our phpBB board.

1. Is it correct that private messages that appear in the phpBB Outbox are imported into the vBulletin Sent folder?

2. I am finding that private messages and not being correctly placed in the vBulletin saved message folders upon import. For example, one account has 36 private messages in the phpBB Savebox, but after importing into vBulletin that user has 0 Imported Saved Received Messages and 2 Imported Saved Sent Messages. I noticed that at least some of the messages that were received from members that were placed in the phpBB Savebox can be found in the vBulletin Inbox.

Has anyone else run into problem importing private messages from phpBB? Any help on this would be appreciated.

Thanks in advance,

Jeff

jashan
Tue 30th Jan '07, 7:21pm
I looked at the code for importing phpBB private messages (011.php), but I was not able to figure things out.

Can anyone confirm question 1?

Can anyone help with question 2?

Thanks.

Jeff

Jerry
Wed 31st Jan '07, 1:25am
1. Yes, that should be the case.

2. ImpEx should create some custom folders for each user for saved received and saved sent as well as the in and out, is that happening also ?

jashan
Thu 1st Feb '07, 7:26pm
Yes, Impex did create the saved message folders, so I see those in addition to the Inbox and Sent Items folders.

jashan
Wed 4th Apr '07, 5:40pm
* Clean import
* Source - phpBB 2.0.22
* Target - vBulletin 3.5.8
* ImpEx 1.79

I am still running into problems importing private messages from phpBB.

Some PMs are not being imported into the correct vBulletin private message folders. For one account, two messages that were imported into the vB Imported Saved Sent Messages folder were PMs that were received. In addition, the vB Imported Saved Received Messages folder is empty, but should contain 38 PMs. It looks like all those messages ended up in the vB Inbox.

For the account mentioned above, the total of all PMs in the phpBB folders matches the number of imported PMs in all the vBulletin folders.

Any help would be appreciated.

Jeff

Jerry
Wed 4th Apr '07, 6:54pm
Yes, the saved are moved into the Inbox, that is by design.

There have been so many changes and updates the current effort is just to get all the In and Out to the correct users and into the ImpEx created folders.

jashan
Mon 9th Apr '07, 6:37pm
I agree that the main thing should be to make sure that all of the private messages make it into vBulletin. I have looked into the account I mentioned above and not all of the private messages in phpBB are being imported. Based on that account, here are the issues I have identified:

* Saved received messages are being imported into vB Imported Saved Sent Messages
- two saved received messages were imported into both vb Imported Saved Sent Messages and into the vb Inbox
* Deleted sent messages are being imported into vB Sent Items
- many deleted messages were imported
* Sent messages are not being imported into vB Sent Items
- not all of the sent messages were imported
- maybe the user to whom the message was sent deleted the message?

jashan
Thu 19th Apr '07, 1:02pm
I posted a bug report for the main issue we are having with ImpEx. The problem is that some private messages are missing from the phpBB import. The post is at http://www.vbulletin.com/forum/project.php?issueid=21882.

We are looking forward to switching to vBulletin and would appreciate your help.

Thanks.

Jerry
Wed 25th Apr '07, 5:21pm
Fixed in 1.81

jashan
Mon 14th May '07, 6:24pm
Hi Jerry,

Could you explain what changes were made in ImpEx 1.81 to address this issue? With ImpEx, private messages that were deleted by the recipient are still not importing into the sender's Sent Items folder.

I did a new install of phpBB to help me understand what is going on. I created two members (Member1 and Member2). I sent a few PMs from Member1 to Member2. I found that when a PM is sent from Member1 to Member2, there is one line added to the phpbb_privmsgs table with privmsgs_type = 1 ("NEW_MAIL"). When Member2 goes into the PM Inbox, the privmsgs_type is set to 5 ("UNREAD_MAIL"). When the message is opened by Member2, an additional line in the table is added. The first PM record goes from 5 to 0 ("READ_MAIL") and the new PM record is set to 2 ("SENT_MAIL"). When Member2 deletes the PM they received, only the record with status 2 remains for Member1.

ImpEx does not import private messages where the privmsgs_type = 2 ("SENT_MAIL"), so the sent messages that were deleted by the recipient will not be imported.

Is there any way update ImpEx so these sent messages will not be lost when importing into vBulletin? I can give you the phpBB and vBulletin databases I used in my test if that would help.

Thank you!

Jerry
Mon 14th May '07, 7:21pm
phpBB has these defines :



define('PRIVMSGS_READ_MAIL', 0);
define('PRIVMSGS_NEW_MAIL', 1);
define('PRIVMSGS_SENT_MAIL', 2);
define('PRIVMSGS_SAVED_IN_MAIL', 3);
define('PRIVMSGS_SAVED_OUT_MAIL', 4);
define('PRIVMSGS_UNREAD_MAIL', 5);


ImpEx selects : 0,1,3,4,5

3 and 4 go into their own folder and everything else goes into folder 0.

jashan
Tue 15th May '07, 10:16am
Hi Jerry,

I see that ImpEx does not import private messages that have a privmsgs_type of 2. If the recipient deletes a message, the only line that remains in the phpbb_privmsgs table for that message has a privmsgs_type of 2.

Is there any way to update ImpEx so these sent messages will not be lost when importing into vBulletin? I am hoping that it will be possible to import all our members' PMs into vBulletin from phpBB.

Jerry
Tue 15th May '07, 5:42pm
The mails are duplicated I believe, so while they won't be in the outbox of one user they will be in the inbox of another.

jashan
Wed 16th May '07, 7:55pm
The messages are not duplicated if the recipient deletes the PM they received. In phpBB, the PM would only appear in the Sent Items folder of the sender and would not be imported into vBulletin since the privmsgs_type is 2.

Jerry
Wed 16th May '07, 8:24pm
The line that selects them is 1275 of impex/systems/phpbb2/000.php :



$pms = $Db_object->query("SELECT * FROM {$tableprefix}privmsgs WHERE privmsgs_type IN (0,1,3,4,5) ORDER BY privmsgs_id LIMIT {$start}, {$per_page}");


change the IN there to include 2 :



IN (0,1,2,3,4,5)


Then in impex/systems/phpbb2/011.php on line 127 :



switch($pm['privmsgs_type'])
{
case 0:
case 1:
case 3:
case 4:
case 5:
break;
default:
continue;
}


Add the 2:



switch($pm['privmsgs_type'])
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
continue;
}

jashan
Wed 6th Jun '07, 5:09pm
Jerry,

Thanks for the code. I made the changes and PMs deleted by the recipient are now correctly imported into the sender's Sent Items PM folder.

However, there are now duplicate PMs appearing in the sender's Sent Items folder and the recipient's Inbox.

Would you be able to add some code to ImpEx to import PMs deleted by the recipient into the sender's Sent Items PM folder, but not create the duplicate PMs?

I appreciate you help.

Jerry
Wed 6th Jun '07, 6:50pm
The duplicates are the reason that the original types were masked as I remember.

That they are now added back in, they are duplicated, due to the default way ImpEx works at the moment.

I'll put the receipt creation in a switch depending on the type on the todo list.

jashan
Wed 6th Jun '07, 7:14pm
What do you mean by receipt creation?

Jerry
Wed 6th Jun '07, 9:17pm
For each PM in vBulletin, there is one PM text and two receipts, the sent receipt for the author and the received receipt for the receiver.

Currently, both users get receipts, though it can be augmented so they only receive one.

In phpBB there is a PM for both the in and out, hence why they some of them are masked so there aren't duplicates created.

jashan
Tue 19th Jun '07, 12:21pm
Jerry,

Thank you for the clarification. In vBulletin, if the recipient of a PM deletes the message, is the recipient's receipt deleted? So, the PM text and the sender's receipt remain?


I'll put the receipt creation in a switch depending on the type on the todo list.
I appreciate you adding this to your todo list and hope you can get to it soon. I am anxious to move our community to vBulletin and it would be great to be able to import all of the PMs.

Jerry
Tue 19th Jun '07, 1:54pm
........ In vBulletin, if the recipient of a PM deletes the message, is the recipient's receipt deleted? So, the PM text and the sender's receipt remain?

Each person has a receipt, and the body of the PM is a separate entry in a diffrent table, once vBulletin detects that both receipts have been deleted the text of the PM is deleted.