Skip to:
Content

bbPress.org

Opened 11 years ago

Closed 11 years ago

#2408 closed defect (bug) (fixed)

Cannot create/change forums public/private/hidden visibility

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

Description

Repro:

  • 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 11 years ago.

Download all attachments as: .zip

Change History (15)

#1 @alex-ye
11 years 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.

#2 follow-up: @johnjamesjacoby
11 years 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.

#3 in reply to: ↑ 2 @alex-ye
11 years 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.

#4 @mordauk
11 years ago

  • Cc pippin@… added

#5 @palmdoc
11 years 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.

#6 @johnjamesjacoby
11 years 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.

#7 @johnjamesjacoby
11 years ago

Able to duplicate. Working on fixes.

#8 @johnjamesjacoby
11 years ago

In 5113:

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

#9 @johnjamesjacoby
11 years ago

In 5114:

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

@netweb
11 years ago

#10 @netweb
11 years ago

In 2408.diff revert wp_insert_post changes introduced in r5060

#11 @johnjamesjacoby
11 years 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)

#12 @netweb
11 years 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.

#13 @alex-ye
11 years ago

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

#14 @johnjamesjacoby
11 years 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.