- Issue created by @erdm
- π¬π§United Kingdom jaydenpearly
I have the same problem. Maybe it's ajax issue, I don't know. I send a message. It doesn't seem to be gone, but when I refresh the page, it appears in the stream.
- π·πΊRussia k.prozorov
I have prepared a patch that fixes this problem.
I removed the function call in the method and replaced it with the$response[] = $message;
construct.
I hope this helps. - last update
over 1 year ago 7 pass - Status changed to Needs review
over 1 year ago 5:18pm 30 August 2023 Hi k.prozorov,
Thanks for patch but it didn't work.
Unfortunately both 2 problems still exist.I confirm that the patch in #6 fixed this issue for me.
- I cannot reproduce the overlay issue. Not sure which overlay it is though, because I cannot see it while clicking on the "Load Previous" link.
- After applying this patch, the messages list started getting refreshed properly. If an AJAX refresh interval is set, it loads new messages after that interval, otherwise it loads instantly after form submission.
- Status changed to Needs work
9 months ago 4:22pm 14 April 2024 - π¨π¦Canada sagesolutions
Can confirm patch #6 does not fix the issue.
This is a javascript issue, which is breaking not only the load previous link, but all other links on the page no longer work when viewing the thread.
I can confirm that you can send 25 messages just fine, but once the "Load Previous" link appears, you cannot submit the next one.
Whichever link you click on a link or button, the page submits to "/private-message/ajax-callback/get_old_messages? token=W2RZzcxI6isICC5_MZYFCantGuhyx_slkOhHC8zUul8&threadid=123456&messageid=NaN" which has an e.preventdefault() which prevents the page from submitting/ loading.
- π¨π¦Canada sagesolutions
At some point the javascript functions were updated to use `() =>` notation.
However, using that broke the ability to use `$(this)` inside them. See https://www.freecodecamp.org/news/the-difference-between-arrow-functions... for a review of arrow functions.
I've replaced the `() =>` with `function()` and that worked for me. Will create a patch / MR shortly.
- Status changed to Needs review
9 months ago 1:50pm 27 April 2024 - π¨π¦Canada sagesolutions
Added patch that fixes the previous message issue. Please review!
- πΊπΈUnited States SocialNicheGuru
Will this be backported to private_message 3.0.0?
- π¨π¦Canada sagesolutions
@SocialNicheGuru I doubt it. Ideally they will tag a new release when they merge the MR
- Status changed to RTBC
8 months ago 1:30pm 26 May 2024 - πΊπΈUnited States SocialNicheGuru
This does not apply. Was it already applied to 3.0.1?
- πΊπΈUnited States loze Los Angeles
I believe this was fixed here π Revert the ESLint autommatted conversion to arrow functions - it broke multiple things Fixed
- π·π΄Romania claudiu.cristea Arad π·π΄
Is this still a problem with version 3.0.1?
- π¦πΉAustria drupalfan2
The problem still exists in v3.0.1 as you can see here:
https://www.drupal.org/project/private_message/issues/3486589 π Answer is not shown in message thread after posting a new reply Active - Status changed to Needs work
2 months ago 8:29pm 18 November 2024 - π·π΄Romania claudiu.cristea Arad π·π΄
Could you, please, test also with 3.0.3?
- π¦πΉAustria drupalfan2
Do you know, where in the code the problem is located?
Maybe I can help to write a patch.
- π¦πΉAustria drupalfan2
Same problem in v3.0.4.
And ajax refresh in the inbox of the message receiver is not working anymore.
Tell me how I can help to write a patch for these problems.
- π·π΄Romania claudiu.cristea Arad π·π΄
@drupalfan2, in 3.0.x a lot of JS functionality has been messed up. We're in the middle of stabilizing the code, fixing bugs and ensuring more test coverage. This is an ongoing effort in the new 4.x branch but we're also backporting as much as we can in 3.0.x.
It would help if you can provide a JS test that shows the bug. In the meantime you can test with 4.x and 3.0.x branches maybe this issue is already fixed there.
Thank you for understanding
- π¦πΉAustria drupalfan2
This patch #29 for v3.0.1 solves both problems.
The patch for v3.0.4 must be the same or nearly the same.Please include code out of this patch into v3.0.5!
Without patching this problem the module is unusable.
Thank you very much.
- π·π΄Romania claudiu.cristea Arad π·π΄
@drupalfan2, you didn't answer: Have you tried 3.0.x-dev or 4.x-dev?
- π¦πΉAustria drupalfan2
Both, 3.0x-dev and 4.x-dev seem to work. But I am not sure.
And I can not install them via composer.
And I will NOT install any dev version on my productive site.Please include code out of the patch #29 into v3.0.5 or have a look it the code is already part of it.
I will not use 4.0.0 as long as a 3.0.x version exists. There is no need for a 4.0.x version.
It would be glad to have a stabe. 3.1.x version soon.I have done more than a half dozen tests and I generated/wrote patch #23, which solves both problems of this issue.
And all of the problems did not exist in v3.0.0. We should come to an end here.
Thank you. - π΅π±Poland alorenc Wolsztyn, π΅π±
Please see #3492289 as it could be related
- π΅π±Poland alorenc Wolsztyn, π΅π±
patch #6 removes array_splice so the idea is similar to https://www.drupal.org/project/private_message/issues/3492289 π Wrong usage of array_splice Active
- π¦πΉAustria drupalfan2
This issue "Loading previous messages and listing last messages doesn't work" is an ajax issue.
- π·π΄Romania claudiu.cristea Arad π·π΄
Both, 3.0x-dev and 4.x-dev seem to work. But I am not sure.
And I can not install them via composer.
And I will NOT install any dev version on my productive site.We will release shortly 4.0.0.-alpha1 and 3.0.5 if the -dev are OK for you
- π¦πΉAustria drupalfan2
We will release shortly 4.0.0.-alpha1 and 3.0.5 if the -dev are OK for you
When?
- π·π΄Romania claudiu.cristea Arad π·π΄
Maybe in few days, not later the end of the year.