Two more follow-up issues. One’s an easy fix, the other may be time-consuming to resolve.
1.) The “Report” link “a.bbp-report-link” css selector is missing the initial “display: none;” style attribute so that the select drop-down is hidden until a user clicks “Report”. Easy fix.
2.) The AJAX for reporting posts takes FOREVER.
On a site with php.ini script timeout set to 30 seconds, it consistently takes 30 seconds to “process” the report until the “Your report will be reviewed by our moderation team.” message shows.
On a site with 120 second script timeout set in php.ini, it consistently takes 120 seconds to “process” the report until the “Your report will be reviewed by our moderation team.” message shows.
That seems to be an infinite loop happening with the AJAX processing that the script timeout kills.
The processing actually happens pretty quickly (I can see the _bbp_modtools_post_report & _bbp_modtools_post_report_count meta values show up in the DB instantly), but the AJAX call/response itself doesn’t die() immediately after it’s done processing. Once it hits the script timeout value, THEN it finally dies and the page refreshes with the “Your report will be reviewed by our moderation team.”
This excessive processing time is what led me to find the issue with “Report reason” showing up as the reason a post was reported. The processing takes so long, that I selected different values in the reason select drop-down, and multiple reasons were reported/processed BEFORE the initial AJAX call ever finished.
It’s stuck in a loop somewhere along the way. Script timeout kills it, but 30 seconds, 120 seconds, or whatever script timeout is set to for wait time makes it unusable for front-end users. Especially when changing the select drop-down option within that wait time produces multiple reported post reasons.
This may take a while to debug. If you want some assistance, let me know and I’ll do what I can, but you’re far more familiar with how modtools processes reports than I am.