Skip to:
Content

bbPress.org

Opened 4 weeks ago

#3353 new defect

Template notice not shown when a forum post is moderated

Reported by: r-a-y Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 2.6.0
Component: API - Moderation Keywords: has-patch
Cc:

Description

Related: #3349, #3352

When a forum post is auto-moderated (a.k.a. post status is pending), the user is not informed as to why the forum post failed to post. It just looks like the page refreshed.

Looks like this issue has been this way since v2.1.0, but hasn't really surfaced until now due to how the blog comment moderation settings are now inherited in v2.6.0.

To duplicate:

  1. When logged-in as a regular user, attempt to create a forum post with two links on separate lines:
  • * As a forum reply to a topic in any forum (BuddyPress group or regular forum)
  • * As a forum topic in a BuddyPress group forum
  1. Submit the form and you'll see no notice or forum post.

For regular forum topics that are moderated (those not connected to a BuddyPress group forum), a notice does show though.


There are two problems:

  1. When wp_insert_post() is used in the post handlers, a pending post is still considered successful and no error checks are added.
  2. When redirection occurs after the post is created (such as for BuddyPress group forums), the template notice will not persist because it's only meant for the initial pageload.

The attached patch fixes this for forum replies. There is one issue though; the template notice is displayed in the form and not above the fold:

https://i.postimg.cc/HxX5HkhK/mod-reply-notice.png

The notice should probably show up above the fold like the other template notices.

I haven't had time to look into the BuddyPress group topic problem yet, but I'll look into it soon.

Attachments (1)

3353.reply.patch (1.7 KB) - added by r-a-y 4 weeks ago.

Download all attachments as: .zip

Change History (1)

@r-a-y
4 weeks ago

Note: See TracTickets for help on using tickets.