#5763 - Periodic content: delete action causes critical error

This is a spacer post for a website comment topic. The content this topic relates to: #5763 - Periodic content: delete action causes critical error
Automated message: This issue was created using the Report Issue Wizard on the Composr homesite.
Note that the delete option has been temporarily disabled in Composr until this is fixed.
Assigning to myself.

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.

0 guests and 0 members have recently viewed this.