Skip to:
Content

BuddyPress.org

Opened 4 months ago

Last modified 3 months ago

#8281 new defect (bug)

Query Var values for page and pagename

Reported by: vapvarun Owned by:
Milestone: Awaiting Review 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 3 months ago.

Download all attachments as: .zip

Change History (4)

#1 @imath
4 months 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
3 months 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
3 months ago

#3 @imath
3 months 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

Note: See TracTickets for help on using tickets.