Opened 11 years ago
Closed 11 years ago
#2408 closed defect (bug) (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@… |
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)
Change History (15)
#2
follow-up:
↓ 3
@
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
@
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.
#5
@
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
@
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.
#11
@
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
@
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.
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.