Skip to:
Content

BuddyPress.org

Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#8825 closed defect (bug) (fixed)

Message reply bug in v11.0.0

Reported by: casper99's profile casper99 Owned by: imath's profile imath
Milestone: 11.1.0 Priority: normal
Severity: normal Version: 11.0.0
Component: Messages Keywords: has-patch
Cc:

Description

WordPress 6.1.1
Buddypress Version 11.0.0
Theme: bp-nouveau
Tested on PHP 7.4 and PHP 8.2

Hi, since last update, replying on messages is not possible any more.
New messages work.

Only the message “Your reply was not sent. Please enter some content.” appears.

Investigating the problem leads me to
bp-templates/bp-nouveau/includes/messages/ajax.php

The problem is, that $_POST[‘thread_id’] is empty.

$_POST
(
[nonce] => fc63ecc237
[action] => messages_send_reply
[content] => <p>test</p>
)

Any ideas?

Change History (9)

#1 in reply to: ↑ description @casper99
10 months ago

Further invesigation.
The problem only occurs, if you use the site-menue to open the conversation.
You are being redirected to the message-thread by URL (german):
https://example.com/mitglieder/testuser/view/420/

If i manually put the following URL (incl. "messages) into the browser, everything works.
https://example.com/mitglieder/testuser/messages/view/420/

Maybe only an internal linking problem?

Last edited 10 months ago by casper99 (previous) (diff)

#2 @imath
10 months ago

  • Keywords reporter-feedback added

Hi @casper99

Thanks for your report, could you add a screenshot so that I can see what you call « site-menue »? I’m not sure to understand what it is. Thanks in advance.

Last edited 10 months ago by imath (previous) (diff)

#3 @casper99
10 months ago

Hi @imath,

you can see in https://www.cmf-web.de/temp/screen1.png how i am using the usual way to open the message and send a reply. The link-destination is also shown.

Here, the error-message is shown
https://www.cmf-web.de/temp/screen2.png

But if i manually type in the URL with "/messages/" (https://example.com/mitglieder/testuser/messages/view/427/) in the browser, the reply is being sent.

But this is more a workaround than a solution. Sometimes the error still occurs. The main problem seems to be the missing "thread_id" in $_POST, as expected in bp-templates/bp-nouveau/includes/messages/ajax.php on line 181

Last edited 10 months ago by casper99 (previous) (diff)

#4 @casper99
10 months ago

  • Keywords reporter-feedback removed

#5 @imath
10 months ago

  • Milestone changed from Awaiting Review to 11.1.0
  • Priority changed from high to normal
  • Severity changed from major to normal

Hi @casper99

Thanks for your feedback 👍. I was able to reproduce the issue. This only happens when you open the messages view for the first time. As soon as you click on one of the link of the Massages toolbar (eg: Sent Messages), the link is well built.

Looking at it to find a fix.

This ticket was mentioned in PR #63 on buddypress/buddypress by @imath.


10 months ago
#6

  • Keywords has-patch added; needs-patch removed

#7 @imath
10 months ago

In 13415:

BP Nouveau: Make sure the thread ID is transported into thread view

The Backbone based Messages UI of the Nouveau template pack is now looking for the displayed thread ID inside the messages collection if the current thread object hasn't been returned by the Ajax request. This prevent an error that was happening when trying to reply to a thread message after the thread has been displayed without re-requesting the server.

Props casper99

Closes https://github.com/buddypress/buddypress/pull/63
See #8825

#8 @imath
10 months ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 13416:

BP Nouveau: Make sure the thread ID is transported into thread view

The Backbone based Messages UI of the Nouveau template pack is now looking for the displayed thread ID inside the messages collection if the current thread object hasn't been returned by the Ajax request. This prevent an error that was happening when trying to reply to a thread message after the thread has been displayed without re-requesting the server.

Props casper99

Fixes #8825 (branch 11.0)

This ticket was mentioned in Slack in #buddypress by imath. View the logs.


10 months ago

Note: See TracTickets for help on using tickets.