Skip to:

#2408 closed defect (fixed)

Cannot create/change forums public/private/hidden visibility

Reported by: netweb Owned by: johnjamesjacoby
Milestone: 2.5 Priority: high
Severity: critical Version: trunk
Component: Component - Forums Keywords:
Cc: pippin@…



  • Open wp-admin forum admin panel /wp-admin/edit.php?post_type=forum
  • Edit a forum and try to change the forum visibility from public to private or hidden and hit 'update'
  • After the forum is updated/saved the forum visibility remains 'public'

Attachments (1)

2408.diff (2.0 KB) - added by netweb 18 months ago.

Download all attachments as: .zip

Change History (15)

comment:1 @alex-ye19 months ago

I think this is because the change-sets in #2351, I believe that using the $wpdb->update was fine in some functions like bbp_hide_forum(), bbp_privatize_forum(), bbp_publicize_forum()

waiting for @jjj , maybe he have another opinion.

comment:2 follow-up: @johnjamesjacoby19 months ago

  • Milestone changed from Awaiting Review to 2.4.1

Should be an easy fix. Is probably related to having duplicate post_status fields in the metaboxes.

comment:3 in reply to: ↑ 2 @alex-ye19 months ago

Replying to johnjamesjacoby:

Is probably related to having duplicate post_status fields in the metaboxes.

Actually it's not.. it's about how the wp_insert_post() function working.

The wp_insert_post() function is not designed to update a certain data in the post, You can debug the bbp_hide_forum(), bbp_privatize_forum(), bbp_publicize_forum() functions you will see that the wp_insert_post() return the empty_content WP_Error

Personlly, I vote to revert-back the using of $wpdb->update until the WordPress design a proper function.. or we can implement a smart beehive that using wp_update_post() or $wpdb->update depending on the current filter.

comment:4 @mordauk19 months ago

  • Cc pippin@… added

comment:5 @palmdoc19 months ago

  • Severity changed from normal to critical

I notice this bug too. I think it is critical for those of us who have private forums.

comment:6 @johnjamesjacoby18 months ago

Probably worth reverting. Will want to test the post cache situation to ensure what's in the cache matches the actual post after updating.

comment:7 @johnjamesjacoby18 months ago

Able to duplicate. Working on fixes.

comment:8 @johnjamesjacoby18 months ago

In 5113:

Fix theme-side forum editing debug notices. See #2408. (2.4.1)

comment:9 @johnjamesjacoby18 months ago

In 5114:

Fix theme-side forum editing debug notices. See #2408. (2.5)

@netweb18 months ago

comment:10 @netweb18 months ago

In 2408.diff revert wp_insert_post changes introduced in r5060

comment:11 @johnjamesjacoby18 months ago

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

Revert part of r5060. Fixes issues with setting forum statuses. Props netweb. (2.4.1)

comment:12 @netweb18 months ago

  • Milestone changed from 2.4.1 to 2.5
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopened for 2.5 branch
via IRC #bbpress-dev

<jjj> I'm not convinced that $wpdb->update() plays nicely with cache busting, but at least it works for a majority of users.
<jjj> I'd like to avoid doing any 'save_post' unhook/rehook dancing around.
<jjj> I actually think I can fix it more elegantly.

comment:13 @alex-ye17 months ago

I could reproduce the bug on the trunk, can you update it?

comment:14 @johnjamesjacoby16 months ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from reopened to closed

In 5171:

Go back to direct DB queries when changing forum visibilities. Fixes issues with visibility not saving correctly, at least for now. Fixes #2408, hat-tip netweb.

Note: See TracTickets for help on using tickets.