View Issue Details

IDProjectCategoryView StatusLast Update
0005426Composrcalendarpublic2024-07-25 18:09
ReporterPatrick SchmalstigAssigned To 
SeverityFeature-request 
Status non-assignedResolutionopen 
Product Version 
Fixed in Version 
Summary0005426: Do not use calendar system commands wherever possible
DescriptionThe Composr CMS scheduling system (via calendars) is one of the most unreliable I've seen in a CMS and presents too many points of failure for it to be considered "reliable".

More often than not, when I try to schedule something, it fails to work properly. This has caused significant problems especially considering clients use Composr and want articles to go live at times I cannot be awake.

Overview... the calendar system has several points of failure:
a) CRON not running or not configured properly (though this is easily a failure point for other systems... can easily be detected via staff checklist and health checks)
b) Improper time zone conversions (not unique to Composr but is an uncommon problem outside Composr, but because calendar events use the time zone of the user, I had an incident once where the time zone on my profile was not what I thought it was, thus the calendar did not run when it should have. Can NOT be easily detected.)
c) For system commands, wrong code typed in (Unique to Composr and VERY easy / common to happen. This is the biggest reason why the system is unreliable. Can NOT be easily detected.)

Solution:

a) Wherever Composr internally creates a "system command" calendar event... stop doing that. Instead, migrate those to a new CRON / scheduler hook. Example: publication date/time for news and blogs. See issue 0005425 . While moving this functionality to the unvalidated addon, perhaps instead of tying it to calendar, have a new table that tracks content type / ID to the date/time they should go live. And a CRON hook regularly runs and validates content set to go live (and then cleans them from the table).
b) Create a validation system for problem c; when the calendar type is "system command", upon saving, a validation should run to ensure the system commands contain no typos and will run as expected. If validation fails, it should error / prevent saving until fixed.
c) for problem b, state what the user's current time zone is in the help tooltips for the times on adding/editing a calendar event.
Additional InformationTo make solution b work, we need to consider several things:

1. Calendar system commands should migrate away from using raw PHP whenever possible and instead use commandr commands.
2. When we do use raw PHP, we might need to make our own PHP code validation tool because I believe PHP only validates on runtime. The PHP command line could possibly be used.
3. Commandr commands need new validation methods in their hooks which, just like running, take in all the passed in parameters and options, but instead of running, will return whether the command is valid or not (and if not, shows what's wrong). Ideally, these validation methods should easily tie into the actual run / actualiser so validation can run prior to execution as well.
TagsRoadmap: Over the horizon
Time estimation (hours)
Sponsorship open

Relationships

related to 0005425 resolvedPatrick Schmalstig Move publication date/time feature to unvalidated addon 
related to 0005445 non-assigned Option to defer post notifications until edit/delete time runs out 

Activities

Patrick Schmalstig

2023-11-04 07:08

administrator   ~0008007

Validation is probably not something that would make the first v11 release but rather an 11.x minor release follow-up.

Chris Graham

2024-07-23 16:07

administrator   ~0008892

Good points. This system seemed elegant when we first wrote it, but that was before we had proper Cron and task hooks.

Patrick Schmalstig

2024-07-23 16:46

administrator   ~0008895

Last edited: 2024-07-23 16:47

View 3 revisions

It worked well for what was available in the ocPortal era, but starting in v10 it became a bigger problem than benefit. As things evolve, so do the efficiencies of the systems in place. And now that v11 has a proper scheduled tasks system and Commandr commands are relatively stable / reliable, that would work much better than raw PHP.

Issue History

Date Modified Username Field Change
2023-10-31 18:05 Patrick Schmalstig New Issue
2023-10-31 18:06 Patrick Schmalstig Description Updated View Revisions
2023-11-04 07:07 Patrick Schmalstig Tag Attached: Roadmap: v11
2023-11-04 07:07 Patrick Schmalstig Tag Detached: Roadmap: v11
2023-11-04 07:07 Patrick Schmalstig Tag Attached: Roadmap: v11 partial implementation
2023-11-04 07:08 Patrick Schmalstig Note Added: 0008007
2024-03-30 14:01 Patrick Schmalstig Tag Detached: Roadmap: v11 partial implementation
2024-03-30 14:01 Patrick Schmalstig Tag Attached: Roadmap: Over the horizon
2024-03-30 14:03 Patrick Schmalstig Project Composr alpha bug reports => Composr
2024-03-30 14:30 Patrick Schmalstig Category General / Uncategorised => calendar
2024-07-23 16:07 Chris Graham Note Added: 0008892
2024-07-23 16:46 Patrick Schmalstig Note Added: 0008895
2024-07-23 16:46 Patrick Schmalstig Note Edited: 0008895 View Revisions
2024-07-23 16:46 Patrick Schmalstig Relationship added related to 0005425
2024-07-23 16:47 Patrick Schmalstig Note Edited: 0008895 View Revisions
2024-07-25 18:09 Chris Graham Relationship added related to 0005445