Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#8281 closed defect (bug) (fixed)

Query Var values for page and pagename

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

Description

We didn't get the Message or thread id on a single message when we open a single message or thread from Message listing. If we refresh the page, then we have the message or thread ID.

on the first load, it displays pagename = messages

https://www.awesomescreenshot.com/video/30373?key=4d10de51fae5cf4b7e84359a65507f6d

We are trying to enable moderation for the messages, and due to missing id, flag option works after reload.

Attachments (1)

8281.patch (1.7 KB) - added by imath 5 years ago.

Download all attachments as: .zip

Change History (6)

#1 @imath
5 years ago

  • Keywords reporter-feedback added

Hi @vapvarun

It's probably because everything is done without reloading the page as It's using JavaScript there. What do you need to insert ? A button ? I believe it should be added using JavaScript. Maybe I can help ?

#2 @vapvarun
5 years ago

Hi @imath we can set some bp-message-thread-id at the same time when we are loading a message with js, then it will be easier to use data-values to add actions. Currently, we are using location.reload() to fetch the id when values are blank to set an action for the message moderation.

@imath
5 years ago

#3 @imath
5 years ago

  • Keywords has-patch added; reporter-feedback removed

HI,

I believe the best way to achieve your goal is to be able to pass your meta data into the function to get the thread to be able to manage it in JavaScript.

The patch is adding 2 filters as otherwise it's a bit complex to get the thread ID. And here's an example of use of one of the filter: https://gist.github.com/imath/b9f68e2a0754d7296c6abdbd16d62816

Using template overrides, you can specify how to render the information > https://gist.github.com/imath/b9f68e2a0754d7296c6abdbd16d62816#file-index-php-L250

#4 @imath
4 years ago

  • Milestone changed from Awaiting Review to 8.0.0

#5 @imath
4 years ago

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

In 12937:

BP Nouveau: add filters to include messages metadata in Ajax responses

Props vapvarun

Fixes #8281

Note: See TracTickets for help on using tickets.