Skip to Content Skip to Menu

CB PMS Glitch on Import from UddeIM

  • micheleq
  • micheleq
  • OFFLINE
  • Posts: 144
  • Thanks: 22
  • Karma: 6
1 month 5 days ago #339371 by micheleq
CB PMS Glitch on Import from UddeIM was created by micheleq
I have solved the issue for my case .It was just reported to me that some users were seeing the wrong "replied to" message under a few of their messages. These messages were from unrelated users, so in some cases they were seeing conversations that were not meant for them. 

I found that messages that had their parent message deleted and somehow had a random message id in the reply_to field which was prompting the user to see messages that they had supposedly replied to, but were from completely random unrelated users. This only happened to messages that were imported from UddeIm and not for messages generated after the migration.  I'm assuming the glitch happened for messages deleted by the user before I did the migration and that message had a replied to which been not deleted. 

It is entirely possible that I botched the migration. I'm not sure if this was on this particular site, but I know that I have confused UddeIM with CB PMS some years ago unknowingly switching between systems. The final migration, was a year ago and other than this I have not seen any glitches. I imported about 82,000 private messages. There were only about 3,000 with the wrong "reply_to" id.

The MySQL query I used to find the messages is
Code:
SELECT t1.id as ID, t1.from_user as From_User, t1.to_user as To_User, t1.reply_to as Reply_ID, t2.from_user as Orig_Sender, t2.to_user as Orig_to, t1.date as Sent FROM `#_comprofiler_plugin_messages` t1  INNER JOIN `#_comprofiler_plugin_messages` t2  ON t1.reply_to = t2.id  WHERE t1.reply_to > '0' AND NOT t1.from_user = t2.to_user  ORDER BY t1.date DESC;
And the query I used to unlink the wrong trees is 
Code:
UPDATE `#_comprofiler_plugin_messages` t1  INNER JOIN `#_comprofiler_plugin_messages` t2  ON t1.reply_to = t2.id  SET t1.reply_to = 0  WHERE  t1.reply_to > '0' AND NOT t1.from_user = t2.to_user ;

Again, I think I've solved this for me, but I thought I'd mention it if it helps anyone. 
Tomás 
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48512
  • Thanks: 8286
  • Karma: 1444
1 month 3 days ago #339373 by krileon
Replied by krileon on topic CB PMS Glitch on Import from UddeIM
Will review the migration code to see if there's a possible bug with reply migrations.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: micheleq

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum