BBpress topic vs parent reply differences
-
This is an extension to https://bbpress.org/forums/topic/bbpress-like-reply-notification/#post-191588
There is a limitation of BBpress when you have a forum and try to send reply notifications to the users.
I will illustrate this in an example:
New thread timeline:
1. post_1_author_A_topic_start
2. post_2_author_B
3. post_3_author_C_reply_to_post_1
4. post_4_author_D_reply_to_post_2What my program does (let’s see it as a blackbox):
User A is notified that B (!) and C replied to his post.
User B is notified that user D replied to this post.The wrong notification is that User A is notified that B commented on this post. However, B never pressed on BBpress reply to A.
The problem:
How to differentiate between
2. post_2_author_B
3. post_3_author_C_reply_to_post_1You cannot do it by looking to the tables wp_posts and wp_postmeta.
Explanation:In wp_posts, the only difference between 2. (false reply) and 3. (the real reply) is the menu_order column. And this seems to be used just for the time order of posting. So not enough data to see the different between 2. and 3.
Now let’s take a look on wp_postmeta. 4. is a reply to 2.
SELECT * FROM wp_postmeta WHERE post_id = “4”4
_bbp_topic_id
14
_bbp_reply_to
2So, in the case of a standard reply (such as 4.) _bbp_reply_to helps you identify the parent.
However, this is not the case of 2. and 3. wrt 1.
SELECT * FROM wp_postmeta WHERE post_id = “2”
2
_bbp_topic_id
1SELECT * FROM wp_postmeta WHERE post_id = “3”
3
_bbp_topic_id
1_bbp_reply_to doesn’t appear anymore.
So we cannot differentiate 2. and 3.
The only difference is the reply button , but this information is not registered in the DB.
Neither extra categorization (adding extra layer to the BB forum) won’t solve the problem.
Is there any way to differentiate 2. from 3. ?
- You must be logged in to reply to this topic.