Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

(private) messages missing from SMF1 import

This discussion is related to the Vanilla Porter addon.

I ran the export import from an old SMF 1 forum to a fresh vanilla install a couple of times.
Both times, the personal messages from the old forum seem to be missing when looking in the "inbox" of a user.
Looking in the database, almost all items are "deleted = 1", which seems weird.

I've update all to deleted = 0 to check, but even then, only a few messages are showing and nothing newer then 2008 for some strange reason.

Anyone with an idea about this?

Comments

  • I posted my last(first) post after a few days of debugging. As is normal in these situations, i now found the answer myself.

    The problem is, all messages were imported properly into the GDN_conversationMessages table. But for some messages/conversations no entry was made into the GDN_conversations table, which binds different messages together in a discussion.

    I've created a query to rectify this afther the import is run. This fixes this issue for me. It neatly sets amount of messages, first message id and last message id to the right settings.
    Not all columns in the GDN_conversations table can be set, but those aren't really needed.

    I hope this helps someone in the future who's having the same issues.

    INSERT INTO vanilla_beta.GDN_Conversation( ConversationID, Subject, Contributors, FirstMessageID, LastMessageID, InsertUserID, DateInserted, DateUpdated, CountMessages ) SELECT ConversationID, null, ' ', (SELECT MessageID FROM GDN_ConversationMessage cm2 WHERE cm.ConversationID = cm2.ConversationID ORDER BY cm2.DateInserted ASC LIMIT 1), (SELECT MessageID FROM GDN_ConversationMessage cm2 WHERE cm.ConversationID = cm2.ConversationID ORDER BY cm2.DateInserted DESC LIMIT 1), InsertUserID, DateInserted, DateInserted, (SELECT COUNT(*) FROM GDN_ConversationMessage cm2 WHERE cm.ConversationID = cm2.ConversationID) FROM GDN_ConversationMessage cm WHERE ConversationID NOT IN (SELECT ConversationID FROM GDN_Conversation) GROUP BY ConversationID

    whu606R_JBleistivthgtonight
  • @Swigle you may wish to open an issue here

    https://github.com/vanilla/porter/issues

    grep is your friend.

  • Good thinking, i've added it there.

    R_J
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Don't get me wrong, but I hope you have many more problems in the future ;)

  • I'll take that as a compliment ;)

    hgtonight
Sign In or Register to comment.