Skip to:
Content

BuddyPress.org

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#7908 closed defect (bug) (fixed)

Nouveau: Private Message Button Not Working Correctly?

Reported by: rt77's profile RT77 Owned by: imath's profile imath
Milestone: 3.3.0 Priority: normal
Severity: normal Version: 3.0.0
Component: Templates Keywords: has-patch commit
Cc:

Description

Hello I think I have a bug here, ok I am on buddypress Version 3.1.0 and logged in as admin I click on a member in the members directory and it has a button for “private message”, when clicked on I am assuming it is supposed to open the compose message box with the members ID in the send to field but it is not doing that for some reason. I am assuming this also because of the url link. The link structure contains “compose” and the members id but it is not opening like I assume it should be.. seems to be a bug.

Attachments (2)

7908.01.patch (1.5 KB) - added by r-a-y 7 years ago.
7908.02.patch (1.7 KB) - added by imath 7 years ago.

Download all attachments as: .zip

Change History (16)

#1 @r-a-y
7 years ago

  • Component changed from Core to Templates
  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to 3.2.0
  • Summary changed from Private Message Button Not Working Correctly? to Nouveau: Private Message Button Not Working Correctly?

Saw another report of this on the forums:
https://buddypress.org/support/topic/private-message-button-not-working-right/

There's a purported fix in that thread that needs verifying.

@r-a-y
7 years ago

#2 @r-a-y
7 years ago

  • Keywords has-patch added; needs-testing removed

01.patch fixes the issue by simply adding the attempted username to the "Messages > Compose" screen.

However, unlike bp-legacy, Nouveau doesn't show the avatar or userlink of the recipient.

#3 @DJPaul
7 years ago

@imath Can you check/commit this? Not sure if the patch is a decent fix for this problem.

#4 @imath
7 years ago

  • Keywords needs-patch added; has-patch removed
  • Owner set to imath
  • Status changed from new to assigned

Thanks @DJPaul for raising my attention about it. You’re right it needs to be improved as the way it’s done in the patch completely bypasses the Backbone Views.

I’m working on it asap.

#5 @DJPaul
7 years ago

  • Milestone changed from 3.2.0 to 3.3.0

#6 @imath
7 years ago

  • Keywords has-patch added; needs-patch removed

Well, i forgot we are pushing state (prefixing routes with # is no more needed), my bad. Sorry. So part of the patch is fine and I've picked it. But I think populating the input field should be done in the JavaScript part, just like what we're doing for activity mentions.

7908.02.patch is my proposed fix.

@imath
7 years ago

#7 @DJPaul
6 years ago

Sure, happy to go with your best fix for this.

#8 follow-up: @admin0478
6 years ago

Hello, I started with Wordpress. How to add this patch please? Thank you.

#9 @imath
6 years ago

  • Keywords commit added

Thanks a lot for your feedback @DJPaul. Let's have it in :)

#10 @imath
6 years ago

In 12249:

Render the Message compose view on user's profile header button click

In BP Nouveau, we use Backbone views to display the BP Messages component screens. When the user's profile header Private Message button is clicked, we need to make sure to populate the Send To input field with the corresponding username.
This commit also fix a regression introduced in r12115 where I forgot to update this specific button link.

Props RT77, r-a-y, DJPaul

See #7908 (Branch 3.0)

#11 @imath
6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 12250:

Render the Message compose view on user's profile header button click

In BP Nouveau, we use Backbone views to display the BP Messages component screens. When the user's profile header Private Message button is clicked, we need to make sure to populate the Send To input field with the corresponding username.
This commit also fixes a regression introduced in r12115 where I forgot to update this specific button link.

Props RT77, r-a-y, DJPaul

Fixes #7908 (trunk)

#12 in reply to: ↑ 8 @imath
6 years ago

Replying to admin0478:

Hello, I started with WordPress. How to add this patch please? Thank you.

You can now use these two files:

to replace the ones that are on your copy of BuddyPress. If it's to early fix the issue, you'll need to generate a minified version of buddypress-message.js or rename it buddypress-message.min.js

To apply a patch, you need to work with a Git/SVN repository of BuddyPress here are the commands to run from your terminal for this SVN repository:

svn co https://buddypress.svn.wordpress.org/trunk/ buddypress
cd buddypress
patch -p0 < path/to/the/downloaded/version/of/7908.02.patch

#13 follow-up: @georg.io
6 years ago

Hi @imath ,
please don't forget to include the @ symbol in the value field:
/bp-templates/bp-nouveau/buddypress/common/js-templates/messages/index.php:37

<input type="text" name="send_to" class="send-to-input" id="send-to-input" value="@<?php bp_message_get_recipient_usernames() ?>" />

Otherwise the message is not sent and a recipient is requested.
Thank you

#14 in reply to: ↑ 13 @imath
6 years ago

Replying to georg.io:

Hi @georg.io

It's already added using JavaScript at line 544 of this file
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-templates/bp-nouveau/js/buddypress-messages.js?rev=12250#L544

It will be in next BuddyPress plugin upgrade. If you need it before you'll need to make sure to rename the copied/edited JavaScript file to buddypress-messages.min.js and refresh your browser's cache

Note: See TracTickets for help on using tickets.