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Â