Opened 14 years ago
Closed 7 years ago
#2372 closed enhancement (maybelater)
@mention in wordpress post comment
Reported by: | intimez | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 1.5 |
Component: | Blogs | Keywords: | trac-tidy-2018 |
Cc: | mercijavier@… |
Description
If a person is @mention on the buddypress side, it will send an email notification if enabled.
This does not happen when leaving a comment on a wordpress post.
Is there any way to tie it to the buddypress system or even have a wordpress post recognize it as a buddypress command?
Attachments (1)
Change History (19)
#2
@
14 years ago
- Resolution set to invalid
- Status changed from new to closed
As you confirm, @-mention linking is already working correctly.
Notifications for @-mentions were added is [3403]
#3
@
14 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
- Version set to 1.3
@boonebgorges
I've tested this using trunk r3717 and it's not working.
Is 3403 for wordpress comment or only for buddypress? It sounds like only for buddypress so I'm reopening as my defect report is different.
#4
@
14 years ago
- Milestone changed from 1.3 to 1.4
- Type changed from defect to enhancement
You're right, this should be added. Switching to an enhancement and bumping to 1.4, as it's unlikely that the core team will have time to tackle this for 1.3.
#5
@
13 years ago
- Cc djpaul removed
- Keywords @mention comment notification removed
- Milestone changed from 1.6 to Future Release
- Severity set to normal
Currently, the way that content like blog comments is this:
- They are processed as activity items, which contain an excerpt of the first sentence or two of the original content (eg, the comment)
- If that excerpt contains an @-mention, then notifications will be processed. If the @-mentions appear after the excerpt cut, then nothing happens.
Ideally, we would be more consistent about how this works - generating @-mentions from the original content, or perhaps even storing all original content in the activity table - but that would require a substantial rewrite of the way that @-mentions are processed.
#7
@
12 years ago
- Component changed from Core to Blogs
- Keywords has-patch added
- Milestone changed from Future Release to 1.8
Attached a patch to fix this problem.
Tentatively moving to 1.8, but could make its way back to 1.7 if the other devs agree.
#8
@
12 years ago
Definitely not for 1.7. I don't know if there would be negative repercussions from storing all blog content in wp_bp_activity like this. Needs more research.
#9
@
11 years ago
- Milestone changed from 1.8 to Future Release
Preliminarily, I think it's unwise to make the change suggested by r-a-y in 2372.01.patch. If we're going to store the full content of blog comments, then we should by the same logic store the full content of blog posts and content types that we currently excerpt for activity (like forum posts). But this will grow our activity table in big ways, which will add to the already painfully slow @-mention queries; see #4018. Moreover, storing full content will cause backward compatibility problems for plugins/themes that are currently displaying the full 'content' field of activity items.
A proper solution would be to store @-mention details as some sort of structured metadata (perhaps in activitymeta? perhaps as its own datatype?), to run the full content of the source content through a filter that detects and records @-mentions based on that full content, and _then_ to create and store an excerpt. But this is beyond what we can do for 1.8.
#10
@
11 years ago
I have been giving some thought to r-a-y's patch. I don't think it would have any impact on @-mentions in blog comments when the activity component is disabled. See the following statement earlier in the bp_blogs_record_activity()
function:
if ( ! bp_is_active( 'activity' ) ) return false;
Are @-mentions in blog posts and comments currently dependent on the activity component being active?
#11
@
11 years ago
Are @-mentions in blog posts and comments currently dependent on the activity component being active?
Yes. @-mentions in general are dependent on the Activity component.
The problem with r-a-y's patch is not that it'll have any ill effects when activity is *disabled* (in which case it'll in fact have no effect at all), but instead when activity is *enabled*. We currently store only short excerpts of blog posts in the 'content' column of the activity table - only a few hundred characters - but storing the full text of blog posts would mean that we're storing many, many times that. This will slow down the activity table in a number of important ways. The key issue in this case is that @-mention are fetched by a LIKE
query, and the performance of those kinds of queries will degrade at least linearly with the increasing size of the haystack.
#12
@
11 years ago
Hi boone. That was my point. "I don't think it will have any impact on @-mentions when activity is disabled" - here I was trying to say it wouldn't have any effect at all. I was thinking along the lines of - the solution that is taken should avoid being dependent on the activity component being active as installations that have activity disabled will lose @-mention functionality.
#13
@
11 years ago
We currently store only short excerpts of blog posts in the 'content' column of the activity table
I'm wondering why @-mention content (excerpt or full text) has to be stored at all? A lightweight approach to blog post and comment @-mentioning could be taken:
- At the point which the blog post or comment is successfully submitted and saved, parse the text for @-usernames maybe using
preg_match_all
- Check the found usernames are active members
- Trigger a BP core notification and an email alert to all valid members receiving the mention.
This would avoid:
- Activity table bloat and big haystacks
- Activity component dependency (unless the triggering of BP core notifications is currently dependant on activity?)
- Performance issues due to laborious
LIKE
queries
#14
@
10 years ago
henrywright - The issue is that when you go to view the "Mentions" tab on a user activity page, it's powered by a LIKE
query on the content
column of the activity table. If we don't store the content of the source item (or if we don't store *enough* of the content, as in the case of blog excerpts), the mention won't show up in that list.
#16
@
8 years ago
I think it makes sense to:
1) remove the "my mentions" tab from the template pack, given poor scaling at medium quantities of items (~10K).
2) What @boonebgorges said: that when we generate the activity item for a blog post and then parse it for @-mentions, to run that on the original blog post. And don't worry if the excerpt doesn't show the @-mention when viewing it in the Activity Stream.
#17
@
7 years ago
- Keywords trac-tidy-2018 added
We're closing this ticket because it has not received any contribution or comments for at least two years. We have decided that it is better to close tickets that are good ideas, which have not gotten (or are unlikely to get) contributions, rather than keep things open indefinitely. This will help us share a more realistic roadmap for BuddyPress with you.
Everyone very much appreciates the time and effort that you spent sharing your idea with us. On behalf of the entire BuddyPress team, thank you.
If you feel strongly that this enhancement should still be added to BuddyPress, and you are able to contribute effort towards it, we encourage you to re-open the ticket, or start a discussion about it in our Slack channel. Please consider that time has proven that good ideas without contributions do not get built.
For more information, see https://bpdevel.wordpress.com/2018/01/21/our-awaiting-contributions-milestone-contains/
or find us on Slack, in the #buddypress channel: https://make.wordpress.org/chat/
It correctly link to the buddypress profile so from that we know it's picking it up but no notification is sent.