#5763 - Periodic content: delete action causes critical error
0 guests and 0 members have recently viewed this.
The top 3 point earners from 23rd Nov 2025 to 30th Nov 2025.
| PDStig |
|
|
|---|---|---|
| Master Rat |
|
|
| cupper3 |
|
There are no events at this time
After doing some investigation and checking with AI to help diagnose the bug, I think I found a solution path. Instead of checking on the privilege (which we cannot do anymore), we should be using the CRUD permission module's "may_delete_this" function instead. I am modifying it to allow a null content ID for when we are adding a new piece of content to see if it could be later deleted by the member.
I am also adding a new function which, when given the name of a permission module, will try to find it (since some are CMS modules, others are Admin Zone ones, etc).
EDIT: Actually this might not work for cns_* modules. Investigating, most calls to make periodic content fields come from modules, so we could just put a parameter whether to include a delete option based on a direct call from the module's may_delete_this. Will need to work out chat and member settings though as these are not called directly from their modules.