Project

General

Profile

Actions

Bug #9639

closed

Users having problems posting to the forums

Added by Raymond Hoh over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
commonsinabox.org
Target version:
Start date:
2018-04-19
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Received a report that users are having problems posting on the cbox.org forums.

I can verify the report when logging in with an account with the role of subscriber. However, I can post with my admin account.

When attempting to add a forum post as a subscriber, the post submits to the group homepage and doesn't redirect to the forum topic. The post isn't in the "Replies > Spam" admin dashboard page either.

I don't have access to debug the issue further.

Boone, do we have any custom code on cbox.org that might be causing this issue?

Actions #1

Updated by Boone Gorges over 6 years ago

Very odd. I just updated everything (WP, plugins, themes) to the latest, and I'm able to post new forum topics to the Help & Support (http://commonsinabox.org/groups/help-support/forum/topic/test-new-topic__trashed/?view=all). Could you try again to see if the upgrades did indeed solve the problem? Otherwise, can you let me know which user you were testing with to see if maybe it's user-specific?

Actions #2

Updated by Raymond Hoh over 6 years ago

Hmm, I'm still experiencing the issue with the raytest user account in a hidden group.

I just invited your test account to the hidden group. Can you give it a test?

Actions #3

Updated by Boone Gorges over 6 years ago

Thanks for the invite! I'm seeing it now.

Appears to be similar to https://redmine.gc.cuny.edu/issues/6980 and https://bbpress.trac.wordpress.org/ticket/3030#ticket. Let me poke around a bit to see what's up.

Actions #4

Updated by Boone Gorges over 6 years ago

This appears to be fixed now. Here's the critical bit: https://github.com/cuny-academic-commons/commonsinabox-org/blob/master/wp-content/themes/cbox-theme/forums/form-reply.php#L24

John made a change for this in bbPress but I'm pretty sure it's wrong. https://bbpress.trac.wordpress.org/changeset/6452 form-reply.php should reference the topic permalink, not the reply permalink.

Like I said in the bbPress ticket, I have no idea why this pops up only occasionally. Do you think it warrants the same fix in cbox-theme?

Actions #5

Updated by Raymond Hoh over 6 years ago

This bug appears to be reproduceable if a subscriber attempts to post to a hidden group forum.

John's commit doesn't really apply to CBOX or BuddyPress at the moment because that fix is scheduled for bbPress 2.6, which isn't released yet.

Here's my stab at fixing this for CBOX - https://github.com/cuny-academic-commons/commons-in-a-box/commit/ff0757c481a70f37614dce00eb1b7989d3fc8bb3

I've basically patched up our workaround to post to the group's /forum/ slug, which ensures(?) that bbPress will look for the POST response there.

From what you mention in the bbPress ticket:

This causes weird things to happen. bbp_new_reply_handler() still catches, but cap checks fail, because the bbPress group forum extension only maps group admin/moderator caps to 'participate' when bp_is_group_forum().

This should work because of the caps checks relying on bp_is_group_forum().

It appears to work. Can you confirm?

This is pretty good timing for a CBOX maintenance release anyway due to the BP Group Email Subscription template issue, which needs to be patched as well. I'll look into porting back the GES fix to CBOX 1.0.x branch.

Actions #6

Updated by Boone Gorges over 6 years ago

  • Status changed from New to Assigned

Thanks, Ray. I've tested and it appears that this trick works, though for reasons that are a bit obscure - basically, it's enough information for bbPress to recognize that its form handler ought to kick in. That being said, I like simple solutions, so let's go with this.

John's commit doesn't really apply to CBOX or BuddyPress at the moment because that fix is scheduled for bbPress 2.6, which isn't released yet.

I agree, but I don't think it is correct even for bbPress 2.6. I've bumped the ticket and he's going to have a look at it.

A CBOX release sounds good. I'll start coordinating.

Have you confirmed that my fix for commonsinabox.org is indeed working? If so, we can close this ticket out.

Actions #7

Updated by Raymond Hoh over 6 years ago

  • Status changed from Assigned to Resolved

Have you confirmed that my fix for commonsinabox.org is indeed working? If so, we can close this ticket out.

Yes, the fix that you added works on commonsinabox.org.

Going to close this one. Thanks for working through this with me!

Actions

Also available in: Atom PDF