Skip to:
Content

bbPress.org

Opened 11 years ago

Closed 10 years ago

Last modified 9 years ago

#2653 closed defect (bug) (fixed)

Closed topics missing _bbp_status post meta key

Reported by: netweb's profile netweb Owned by: netweb's profile netweb
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: Component - Topics Keywords: has-patch commit
Cc:

Description (last modified by netweb)

Some 'closed' topics are missing the _bbp_status = publish meta key.

A topic's _bbp_status only exists if the topic is closed with status publish (It does not exist if post_status = publish)

Occurrences:

  1. When creating a new topic and including the status 'closed' post meta key _bbp_status is not created.
  1. Previously imported closed topics were not assigned the _bbp_status = publish meta key.

Extra Issues:

  1. Currently if a closed topic is missing it's _bbp_status meta key we cannot update the status meta.

ToDo:

  1. Update bbp_close_topic() to allow _bbp_status to be added to existing post_status = closed topics
  1. Update repair tools to repair closed topics missing _bbp_status meta key See #2577
  1. Add bbPress 2.6 database upgrade routine we should update closed topics where post_status = closed and meta bbp_status = publish does not exist. See #2654

Related: #2577 Imported closed/locked topics missing 'publish' postmeta _bbp_status

Attachments (3)

2653.diff (1.9 KB) - added by netweb 11 years ago.
2653.2.diff (3.0 KB) - added by netweb 11 years ago.
2653.3.diff (9.6 KB) - added by netweb 10 years ago.

Download all attachments as: .zip

Change History (13)

@netweb
11 years ago

#1 @netweb
11 years ago

  • Keywords needs-patch added

In 2653.diff:

  • Adds a 'closed topic' check in bbp_new_topic_handler() to properly create new closed topics
  • Allow bbp_close_topic() to add/update _bbp_status to existing post_status = closed topics.
  • Repair tools will now be able to utilise bbp_close_topic() to repair existing instances

Still to do, add repair tool and database upgrade

#2 @netweb
11 years ago

  • Description modified (diff)
  • Keywords has-patch added; needs-patch removed

See #2654 for bbPress 2.6 database upgrade routine

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

#3 @netweb
11 years ago

In 2653.2.diff​ add revision toggle so a post revision is not created when closing a topic.

@netweb
11 years ago

@netweb
10 years ago

#4 @netweb
10 years ago

  • Keywords commit added

In 2653.3.diff​, refresh of 2653.2.diff and includes new repair tool "Repair closed topics"

#5 @netweb
10 years ago

In #2654 the patch 2654-repair-closed-topics.diff will run bbp_admin_repair_closed_topics() as part of bbPress 2.6 database upgrade.

#6 @netweb
10 years ago

In 5656:

Don't create post revisions when opening topics in bbp_open_topic() or closing topics in bbp_close_topic() as post content does not change.

Props netweb. See #2653

#7 @netweb
10 years ago

In 5667:

Topics: Update bbp_open_topic() and bbp_close_topic() @uses documentation missed in r5656

See #2653

#8 @netweb
10 years ago

In 5668:

Tools: Introduce "Repair closed topics tool" bbp_admin_repair_closed_topics()

See #2653

#9 @netweb
10 years ago

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

In 5669:

Topics: Fix missing meta data during new closed topic creation

  • In bbp_new_topic_handler() check if the post status is closed and close using bbp_close_topic()
  • In bbp_close_topic() allow topics to be properly closed if _bbp_status is missing from topic meta

Props netweb. Fixes #2653

#10 @netweb
9 years ago

#2867 was marked as a duplicate

Note: See TracTickets for help on using tickets.