Skip to:
Content
Pages
Categories
Search
Top
Bottom

Problem with trashing a topic?

  • @scmsteve

    Participant

    We tried to trash a topic on our site and ddespite no errors and everything looking correct it comes back with the same status.

    Looking in the postmeta entries I saw:

    One _bbp_status of “closed”
    A number of _bbp_status entries of “trash”
    A number of _wp_trash_meta_status entries
    A number of _wp_trash_meta_time

    I tried to clean those up, leaving just one _bbp_status of “trash”, the matching (?) “_wp_trash_meta_status” of “closed” and one _wp_trash_meta_time. It didn’t fix anything, and hitting “TRASH” just adds another set of metadata.

    What are we doing wrong?

Viewing 6 replies - 1 through 6 (of 6 total)
  • @robin-w

    Moderator

    bbpress uses custom post types, so uses their status in the posts table (not post meta) to determine whether to display.

    So on trashing a topic, I would expect the post_status on the posts table to be changed to trash.

    To enable you to ‘untrash’ a topic (say if it was a mistake) in tbe post_meta table, I would then expect to see

    _bbp_pre_trashed_replies	a:4:{i:0;i:33965;i:1;i:33963;i:2;i:33959;i:3;i:33956;}
    _wp_trash_meta_status	publish
    _wp_trash_meta_time	1748443956

    The trash status being the status BEFORE it was trashed, so that it can go back to this if you made a mistake.

    I am not sure what the other statuses are doing there, if you have been trashing and untrashing, other stuff might happen, and other bbpress plugins might be adding things.

    I’d suggest you try creating a test topic and then trashing it, and seeing what happens, so that you can see a ‘clean’ set of entries.

    If you still have problems, then it could be a theme or plugin issue, so I’d try creating and trashing a topic with the below happening.

    Themes

    As a test switch to a default theme such as twentytwenty, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    @scmsteve

    Participant

    The post status is ‘closed’.

    @robin-w

    Moderator

    of the original, or a test post?

    @scmsteve

    Participant

    The original. The site owner reported this to me, and said he had tried to do it both using the action item in the post, which didn’t work, but then also used the Dashboard under Forums -> Topics and neither worked.

    @scmsteve

    Participant

    I just did a test post, closed it to simulate the same post status and then trashed it, all worked fine. So the issue is why the older posts couldn’t do the same thing. Bizarre.

    @robin-w

    Moderator

    ok, not sure I can help further, I’m not saying you do not have the issue, but as it is not a repeatable issue, it is either individual post related or site related.

    I’d suggest that you just change the status in the posts table database, and come back if you find other posts that have the same issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar