Project

General

Profile

Actions

Bug #23613

closed

Forum attachments do not appear on edit forum post page

Added by Raymond Hoh about 1 month ago. Updated 26 days ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Group Forums
Target version:
Start date:
2025-10-03
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Go to https://commons.gc.cuny.edu/wp-admin/edit.php?post_type=forum&page=gdbbpress_attachments&tab=advanced

And set both Moderators and Authors to "Delete from Media Library".


Description

On the dev call, a bug was reported about existing forum attachments not being displayed when editing a forum post.

It appears that the plugin we use for forum attachments (gd-bbpress-attachments) does not display forum attachments on the edit forum post page; attachments only show up in the forum thread. Kind of a big oversight by the plugin author! Fortunately, we can manually call some of the plugin's internals so that the attachments will show up when editing a forum post.

It also appears that gd-bbpress-attachments has included the Freemius SDK in v4.8. I'll add our Freemius stub to remove their admin activation screen as per other instances (#18434, #20661).


Files

gd-bbpress-attachments.png (12.2 KB) gd-bbpress-attachments.png Raymond Hoh, 2025-10-07 01:34 PM
Actions #1

Updated by Raymond Hoh about 1 month ago

  • Status changed from New to Staged for Production Release

I've added forum attachments to the edit forum post page in https://github.com/cuny-academic-commons/cac/commit/ab56e762d4dd22e461997a7c18cb34576e396ae3.

Boone, for the Freemius stub, I've added that in https://github.com/cuny-academic-commons/cac/commit/f3244c89eac775311d0d7e7c3946790f6ca37521. Had to add a new is_premium() method stub to our dummy class to avoid a new fatal error. I tested this with our existing Freemius plugins -- Password Protected and TablePress -- and this seems to work.

Also while working on the Freemius stub, I discovered that some other developers also thought about creating a dummy Freemius stub as well: https://gist.github.com/thefrosty/d9bb001c05a407ba1aaa60c8b75aeb43. It might be worthwhile to move to their Freemius stub down the road.

Actions #2

Updated by Raymond Hoh about 1 month ago

As noted on the dev call, you can now test viewing attachments on the edit forum post page on cdev.

For deleting a forum attachment, I needed to go into the gd-bbpress-attachments admin page to enable both Moderators and Authors to delete their attachments: /wp-admin/edit.php?post_type=forum&page=gdbbpress_attachments&tab=advanced. See attached screenshot. Once I did that, forum post authors can also delete their own attachments as well.

Actions #3

Updated by Colin McDonald about 1 month ago

Thanks Ray, I tested this on cdev and it looks good to go.

Actions #4

Updated by Boone Gorges 26 days ago

  • Status changed from Staged for Production Release to Resolved

I've made the settings change.

Actions

Also available in: Atom PDF