Skip to:
Content

bbPress.org

Opened 12 years ago

Last modified 8 years ago

#2233 new defect (bug)

bbPress Topic or Replies states bugs !

Reported by: alex-ye's profile alex-ye Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.2.3
Component: General Keywords: needs-patch
Cc: nashwan.doaqan@…

Description (last modified by netweb)

Hi , I had been reviewing how bbPress handle the post status like private,closed...etc , There are many bugs I will publish about them soon most of them need some WordPress modifications since WordPress core have a many bugs too in the post states system ...

This is a simple list of some bugs I have founding them nowdays :

1 ---[User Posts Counter]:

The user topics or replies count functions like bbp_get_user_topic_count_raw() , bbp_get_user_reply_count_raw() ...etc

a - Not exclude the private posts , Even for those users they can't read the private posts .
b - Not include the closed or spam ... etc topics or replies .

... etc

2 -- [The Back-end Interface]

There are some bugs in the wp-admin too , because WordPress core doesn't handle the post states in right way as I said a above .:

a - Try to edit a closed topic from the back-end , You will be surprised that the submit button text is "Publish" instead of "Save" , and even after this "Publish" button , the topic being "Open" instead of "Closed" and you need to close it a again !

... etc

I want from you to be aware about theses problems so we can help WordPress to make this easier to us especially for BuddyPress and bbPress developers .

Edit: The first part of item 1b has been extracted to ticket #2978

Change History (6)

#1 @alex-ye
12 years ago

  • Cc nashwan.doaqan@… added

#2 follow-up: @johnjamesjacoby
12 years ago

  • Milestone changed from Awaiting Review to Future Release

These are known issues, though there's actually little that can be done about them until the post_status API's are fleshed out in WordPress core.

We could swap out storing these in post_meta, and instead push them to the object cache. That would make the counts more accurate, with a significant performance cost for users without a persistent object cache. It's something worth considering for a future version, or as a long term project for someone that's interested in picking it up.

#3 in reply to: ↑ 2 @alex-ye
12 years ago

Related : WordPress Trac #12706

#5 @netweb
8 years ago

bbPress has 8 posts statuses and in regard to post counts the following summary:

Two of these statuses are "public" and should be viewable by all users

  • bbp_get_public_status_id()
    • Already included
  • bbp_get_closed_status_id()
    • Created ticket #

The remaining 6

  • bbp_get_private_status_id() & bbp_get_hidden_status_id()
    • These counts should only be available to the user, moderators, and keymasters
  • bbp_get_pending_status_id(), bbp_get_spam_status_id() & bbp_get_trash_status_id()
    • These counts should only be available to moderators and keymasters
  • bbp_get_orphan_status_id()
    • This is a reserved status for posts with orphaned metadata, should only be available to keymasters

We could add another query or helper function to count a users closed topics and add this to the bbp_get_user_topic_count_raw() count, that would satisfy the core of the #meta1870 issue, I've created and added a patch to #2978 to implement just this.

Supporting any of the other statuses without #WP12706 would be a far more complicated for logged in/logged out permutations and combinations of the above, possibly similar topic/reply post status counts functions bbp_get_user_*status*_topic_count() / bbp_get_user_*status*_reply_count() could work here but I've not explored this fully.

#6 @netweb
8 years ago

  • Description modified (diff)

Edited the original ticket and removed the first part of item 1b, this has been extracted to ticket #2978

Note: See TracTickets for help on using tickets.