Skip to:
Content

bbPress.org

Opened 7 months ago

Last modified 4 weeks ago

#3235 reopened defect

admin area update puts a subscription on a revision post (RC7)

Reported by: wpturk Owned by: johnjamesjacoby
Milestone: 2.6 Priority: high
Severity: normal Version: trunk
Component: API - Engagements Keywords: needs-patch
Cc:

Description

I am running the latest 2.6 RC7 and discovered problem regarding subscriptions:

This is before updating topic (post_id:54878) in admin area:

mysql> select * from forum_postmeta where meta_key="_bbp_subscription" ; 
+---------+---------+-------------------+------------+
| meta_id | post_id | meta_key          | meta_value |
+---------+---------+-------------------+------------+
.....
.....
|   35265 |   54878 | _bbp_subscription | 11743      |
+---------+---------+-------------------+------------+

This is after updating the topic (post_id:54878) in admin area:

mysql> select * from forum_postmeta where meta_key="_bbp_subscription" ; 
+---------+---------+-------------------+------------+
| meta_id | post_id | meta_key          | meta_value |
+---------+---------+-------------------+------------+
.....
.....
|   35265 |   54878 | _bbp_subscription | 11743      |
|   35280 |   54879 | _bbp_subscription | 1          |
+---------+---------+-------------------+------------+

admin save puts a subscription on a revision post (54879). I think this should be corrected.

Change History (4)

#1 @johnjamesjacoby
7 months ago

  • Component changed from General to API - Engagements
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 2.6
  • Owner set to johnjamesjacoby
  • Version set to trunk

#2 @johnjamesjacoby
7 months ago

This bug was introduced in r6811, as part of #3185.

Working on a fix now.

#3 @johnjamesjacoby
7 months ago

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

In 6886:

Subscriptions: Do not add or remove subscriptions when editing via WordPress admin.

This change passes the current post ID through to bbp_is_user_subscribed(), ensuring that admin area subscriptions are saved to the correct topic ID (not revisions, etc...) while also not changing the subscriptions status.

Fixes #3235.

#4 @wpturk
4 weeks ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Hi John,

Unfortunately, this fix (6886) does not work completely. Wordpress Admin save is not putting subscription anymore (thats good) but existing user subscriptions are getting deleted.

Regards.

Last edited 4 weeks ago by wpturk (previous) (diff)
Note: See TracTickets for help on using tickets.