Skip to:
Content

bbPress.org

Opened 5 years ago

Closed 4 years ago

#2647 closed defect (fixed)

Missing forum post meta keys when creating a new forum

Reported by: netweb Owned by: netweb
Milestone: 2.6 Priority: high
Severity: normal Version:
Component: Component - Forums Keywords: has-patch commit
Cc:

Description (last modified by netweb)

When creating a new 'open' forum (i.e. not closed) post meta key _bbp_status with meta value open is not created.

  • When editing a forums status post meta key _bbp_status is correctly updated with open or closed values
  • A forum's _bbp_status can be either open or closed

When creating a new 'forum' forum (i.e. not a category) post meta key _bbp_forum_type with meta value forum is not created.

  • When editing a forums type post meta key _bbp_forum_type is correctly updated with forum or category values
  • A forum's _bbp_forum_type can be either forum or category

Related:

  • #2303 $check_ancestors Parameter Logic

Edit: Edited and updated ticket description of exact behaviour

Attachments (2)

2647.diff (2.6 KB) - added by netweb 5 years ago.
2647.2.diff (1.8 KB) - added by netweb 4 years ago.

Download all attachments as: .zip

Change History (10)

#1 @netweb
5 years ago

  • Component changed from General to Forums
  • Keywords has-patch added; needs-patch removed

In 2647.diff:

* Introduce bbp_update_forum_forum_id() updater forum function
* bbp_update_forum() calls bbp_update_forum_forum_id() to add _bbp_forum_id post meta key when a forum is created or edited using bbp_new_forum_handler() and bbp_edit_forum_handler() respectively

We should also updating existing forum meta as part of the bbPress 2.6 update.

Related: #2652 Post meta key _bbp_reply_id is not created when creating new replies

Last edited 5 years ago by netweb (previous) (diff)

#2 @netweb
5 years ago

  • Description modified (diff)
  • Keywords needs-patch added; has-patch removed
  • Summary changed from Post meta key _bbp_forum_id is not created when creating new forums to Missing forum post meta keys when creating a new forum

I have deleted (strikethough text) the original _bbp_forum_id section from the original ticket and in comment:1:

  • Meta key _bbp_forum_id is only used in bbp_exclude_forum_ids() and bbp_request_feed_trap() with topic and reply queries to not include topics or replies in hidden and/or private forums unless the user has the capability to read those forums

The _bbp_status and _bbp_forum_type meta keys issues when creating a new forum are still valid and needs patch

#3 @netweb
5 years ago

  • Description modified (diff)

@netweb
5 years ago

#4 @netweb
5 years ago

  • Keywords has-patch added; needs-patch removed

In 2647.diff, when creating a new forum as part of bbp_save_forum_extras():

  • Call bbp_open_forum() if the forum is open to add the forums _bbp_status = open meta
  • Call bbp_normalize_forum() if the forum is a forum to add the forums _bbp_forum_type = forum meta

#5 @netweb
5 years ago

  • Description modified (diff)

#6 @netweb
5 years ago

In 5516:

Include 'default' forum status and forum type meta keys in importers for databases that do not support these values.

  • Forum status: _bbp_status = open meta
  • Forum type: _bbp_forum_type = forum

Props netweb. See #2647

#7 @netweb
5 years ago

  • Keywords commit added

@netweb
4 years ago

#8 @netweb
4 years ago

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

In 5655:

Forums: Fix missing meta data during new forum creation

  • Call bbp_open_forum() if the forum is "open" to add the forum _bbp_status = open meta
  • Call bbp_normalize_forum() if the forum is a "forum" to add the forum _bbp_forum_type = forum meta

Props netweb. Fixes #2647

Note: See TracTickets for help on using tickets.