View Issue Details

IDProjectCategoryView StatusLast Update
0005763Composrcontent_reviewspublic2025-03-04 01:31
ReporterPatrick SchmalstigAssigned ToPatrick Schmalstig 
SeverityMinor-bug 
Status resolvedResolutionfixed 
Product Version11.alpha3 
Fixed in Version 
Summary0005763: 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
Time estimation (hours)
Sponsorship open

Activities

admin

2024-05-16 18:31

administrator   ~0008759

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

Patrick Schmalstig

2024-07-22 03:44

administrator   ~0008855

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

Patrick Schmalstig

2025-03-02 23:57

administrator   ~0009837

Last edited: 2025-03-03 00:08

View 3 revisions

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 Patrick Schmalstig Description Updated View Revisions
2024-05-16 18:33 Patrick Schmalstig Steps to Reproduce Updated View Revisions
2024-06-07 03:01 Patrick Schmalstig Assigned To => Chris Graham
2024-06-07 03:01 Patrick Schmalstig Status non-assigned => assigned
2024-07-22 03:44 Patrick Schmalstig Note Added: 0008855
2024-07-25 22:20 Chris Graham Tag Attached: Roadmap: v11
2025-03-02 23:54 Patrick Schmalstig Assigned To Chris Graham => Patrick Schmalstig
2025-03-02 23:57 Patrick Schmalstig Note Added: 0009837
2025-03-03 00:01 Patrick Schmalstig Note Edited: 0009837 View Revisions
2025-03-03 00:08 Patrick Schmalstig Note Edited: 0009837 View Revisions
2025-03-04 01:31 Patrick Schmalstig Status assigned => resolved
2025-03-04 01:31 Patrick Schmalstig Resolution open => fixed