#8281 closed defect (bug) (fixed)
Query Var values for page and pagename
Reported by: | vapvarun | Owned by: | 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)
Change History (6)
#2
@
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.
#3
@
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
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 ?