Skip to:

Opened 12 years ago

Closed 11 years ago

#2130 closed defect (bug) (duplicate)

Importer 'post_status' precedence and priority

Reported by: netweb's profile netweb Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.2
Component: API - Importers Keywords:


bbPress uses the WordPress wp_posts.post_status value to manage the bbPress CPT's 'Forums', 'Topics' and 'Reply' for moderation, permissions and anti spam management.

When importing forums using the built in bbPress 'Import Forums' tool, multiple instances of wp_posts.post_status are updated with a callback_status routine as the import process as each step of the SQL queries are performed.

Each bbPress CPT type 'Forum', 'Topic' and 'Reply' may use one of the valid fields below as the 'status' (wp_posts.post_status) for the CPT.

  • publish
  • draft
  • spam
  • trash
  • closed
  • private
  • hidden
  • inherit

During the import steps we need to set the priority/order/precedence of each of these values for wp_posts.post_status


  • 'closed' has higher precedence than 'publish'
  • 'spam' has higher precedence than 'publish', 'closed', 'private' and 'hidden'
  • 'trash' has a higher precedence than 'spam'

eg. bbPress1.php

Post Status - Spam/Trash/Publish
Topic Status - Open/Closed
Reply Status - Spam/Trash/Publish

Currently callback_status is only looking at values for 'spam', 'trash' and 'publish'. In #2125 callback_topic_status was added to update post_status for 'closed' topics and has no checks in place and will overwrite any 'spam' or 'trash' values with 'publish' or 'closed'

What is needed is a single routine for callback_status that includes all the cases above as during import we do not want to update post_status with a 'closed' value if the topic was already 'trash'

Related: #2125 bbPress #2074 SimplePress #2123 phpBB

Change History (4)

#1 @johnjamesjacoby
12 years ago

  • Milestone changed from Awaiting Review to 2.4

Moving to 2.4 to focus on the importers then.

#2 @johnjamesjacoby
11 years ago

  • Milestone changed from 2.4 to 2.5

No time. Moving to 2.5.

#3 @netweb
11 years ago

Had another look at this today... No luck...

Problem is we are importing two fields to a single field:

  • FROM bb_topics.topic_status for Spam/Trash/Publish topic status
  • FROM bb_topics.topic_open for Closed/Publish
  • TO wp_posts.post_status for publish/draft/spam/trash/closed/private/hidden/inherit

Quite tempted to resolve this as 'wont fix' and leave the necessary docs caveat that any 'closed' topics when imported will not be imported as 'closed' and must manually be done to topics after import (Far higher priority should be given to the trash/spam status of the topic IMHO).

#4 @netweb
11 years ago

  • Milestone 2.5 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Just going to flat out close this ticket as a duplicate of #2125

Note: See TracTickets for help on using tickets.