View Issue Details

IDProjectCategoryView StatusLast Update
5763Composrcontent_reviewspublic2025-03-04 01:31
ReporterPDStig Assigned ToPDStig  
PriorityhighSeverityminor 
Status resolvedResolutionfixed 
Product Version11.alpha3 
Summary5763: Periodic content: delete action causes critical error
DescriptionYou cannot delete items in periodic content reviews because the code in content_reviews2.php is invalid.

This code was based on v10 where low/mid/high range content was explicitly defined in content meta aware hooks. That is no longer the case for v11, and the code is trying to do something invalid.
Steps To ReproduceEnable periodic content reviews on a piece of content (specifically a catalogue entry) and set the action to delete. View as a moderator and not as admin.
Additional InformationThis issue is too complex to resolve for me; it looks like we'd have to find privilege overrides by extracting functions from the modules. I could be wrong but I see no easy way to resolve this right now.
TagsRoadmap: v11
Attach Tags
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

admin

2024-05-16 18:31

administrator   ~8759

Automated message: This issue was created using the Report Issue Wizard on the Composr homesite.

PDStig

2024-07-22 03:44

administrator   ~8855

Note that the delete option has been temporarily disabled in Composr until this is fixed.

PDStig

2025-03-02 23:57

administrator   ~9837

Last edited: 2025-03-03 00:08

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.

Issue History

Date Modified Username Field Change
2024-05-16 18:33 PDStig Description Updated
2024-05-16 18:33 PDStig Steps to Reproduce Updated
2024-06-07 03:01 PDStig Assigned To => Chris Graham
2024-06-07 03:01 PDStig Status Not Assigned => Assigned
2024-07-22 03:44 PDStig Note Added: 0008855
2024-07-25 22:20 Chris Graham Tag Attached: Roadmap: v11
2025-03-02 23:54 PDStig Assigned To Chris Graham => user4172
2025-03-02 23:57 PDStig Note Added: 0009837
2025-03-03 00:01 PDStig Note Edited: 0009837
2025-03-03 00:08 PDStig Note Edited: 0009837
2025-03-04 01:31 PDStig Status Assigned => Resolved
2025-03-04 01:31 PDStig Resolution open => fixed