View Issue Details

IDProjectCategoryView StatusLast Update
5426Composrcalendarpublic2024-07-25 18:09
ReporterPDStig Assigned ToGuest  
PrioritynormalSeverityfeature 
Status newResolutionopen 
Summary5426: 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 5425 . 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
Attach Tags
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Relationships

related to 5425 ResolvedPDStig Move publication date/time feature to unvalidated addon 
related to 5445 Not AssignedGuest Option to defer post notifications until edit/delete time runs out 

Activities

PDStig

2023-11-04 07:08

administrator   ~8007

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   ~8892

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

PDStig

2024-07-23 16:46

administrator   ~8895

Last edited: 2024-07-23 16:47

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.

Add Note

View Status
Note
Upload Files
Maximum size: 32,768 KiB

Attach files by dragging & dropping, selecting or pasting them.
You are not logged in You are not logged in. This means you will not get any e-mail notifications. And if you reply, we will not know for sure you are the original poster of the issue.

Issue History

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