- Issue created by @sagesolutions
- Status changed to Needs review
9 months ago 3:25am 23 March 2024 - π¨π¦Canada sagesolutions
I've created a MR for review. It's a bit hard to test since https://www.drupal.org/project/private_message/issues/3424499 π Stuck on undefined URL Needs review is not merged yet.
I found the easiest way to test is to test with two browsers A and B and disable Javascript on B. Login to browser A with user 1 go to your private message chat with user 2. Then, send a message from user 2 on browser B to user 1. Back on browser A you should see the message appear without refreshing.
Also, all messages now no longer load every minute!
Please review!
- π¦πΊAustralia Stephen Ollman Canberra
I'm sort of getting the opposite of this since moving to V3. Now I'm not seeing any new messages via an ajax callback. I need to manually refresh the page to see the new message.
- π¨π¦Canada sagesolutions
Hi Stephen,
If you disable javascript, you will always need to manually refresh to see new messages appear. Ithink an easier way to test is to include the patch from https://www.drupal.org/project/private_message/issues/3424499 π Stuck on undefined URL Needs review and then test with javascript enabled.
- Status changed to Needs work
9 months ago 12:59am 27 March 2024 - π¨π¦Canada sagesolutions
After further testing, this is close to working but there is still an issue. When I send a message to someone, I see it appear in the chat above. However, once the get_new_messages is called, my message that I just sent appears again. It only appears an extra time once, but still not ideal.
- Status changed to Needs review
9 months ago 6:11pm 28 March 2024 - π¨π¦Canada sagesolutions
Fixed the issue of reloading the message I just sent.
Ready for review!
- πΊπΈUnited States loze Los Angeles
Tested the MR and it resolves the issue for me. +1
- First commit to issue fork.
- π΅π±Poland alorenc Wolsztyn, π΅π±
I set up a fresh instance and used the latest code from the module's 3.0.x branch, not from this specific merge request.
Hereβs what I tested:
Logged in as two different users simultaneously.
Started messaging between the two users.
Throughout my testing, I didnβt observe any duplicate messages.In my case, I noticed the module triggers AJAX requests with the messageId parameter, which appears to be calculated in JavaScript. You can see the specific line in the code here:
https://git.drupalcode.org/project/private_message/-/blame/3.0.x/js/priv...Could the issue be related to how the messageId is being calculated in your instance? It might be worth checking if the markup has been customized, as this could impact how the parameter is generated.
- π·π΄Romania claudiu.cristea Arad π·π΄
Marking as postponed, to get some feedback from @sagesolutions or other users