Page 1 of 1

Khronos issues

Posted: Thu Apr 11, 2024 9:36 pm
by 10010110
So, I’m trying to switch from CGCalendar to Khronos and if I import CGCalendar data it shows up in the backend but if I load the front end calendar view, an alert comes up saying “Oops... something happened when we were talking to the server, please try again”. The browser’s error console tells me that there is an error 500 loading http://localhost/index.php?mact=Khronos,cntnt01,ajax_fetchevents,0&cntnt01detailpage=16&cntnt01returnid=16&cntnt01showchildren=1&cntnt01detailpage=16&cntnt01eventtemplate=&cntnt01editpage=&cntnt01editeventtemplate=&start=2024-04-01&end=2024-05-13&_=1712871139977

Also, all past events are there in the backend but if I’m adding a new one, this error comes up:
FATAL ERROR:
QUERY = INSERT INTO cms_module_khronos_events (event_id, event_title, event_summary, event_details, event_date_start, event_date_end, event_parent_id, event_recur_period, event_date_recur_end, event_created_by, event_recur_nevents, event_recur_interval, event_recur_weekdays, event_recur_monthdays, event_allows_overlap,event_all_day,event_status, event_create_date, event_modified_date) VALUES (59,'Test','','','2024-04-18 12:00:00',NULL,-1,'none',NULL,-101,-1,-1,'','',1,0,'D',NOW(),NOW())
ERROR = Unknown column 'event_status' in 'field list'
So, apparently something goes wrong with the import from CGCalendar.

Re: Khronos issues

Posted: Thu Apr 11, 2024 11:38 pm
by DIGI3
Looks quite similar to this known issue: http://dev.cmsmadesimple.org/bug/view/12678

Re: Khronos issues

Posted: Fri Apr 12, 2024 9:18 am
by 10010110
OK, thanks, looks like it. All imported events are unpublished, apparently.
Also, I loaded the page at http://localhost/index.php?mact=Khronos,cntnt01,ajax_fetchevents,0&cntnt01detailpage=16&cntnt01returnid=16&cntnt01showchildren=1&cntnt01detailpage=16&cntnt01eventtemplate=&cntnt01editpage=&cntnt01editeventtemplate=&start=2024-04-01&end=2024-05-13&_=1712871139977 directly in the browser and the error log gives me this:

Code: Select all

PHP Fatal error:  Uncaught Error: Call to a member function MoveNext() on null in ~/modules/Khronos/action.ajax_fetchevents.php:166
Stack trace:
#0 ~/modules/CMSMSExt/lib/class.XTModule.php(874): include()
#1 ~/lib/classes/class.CMSModule.php(1483): CMSMSExt\\XTModule->DoAction('ajax_fetchevent...', 'cntnt01', Array, '16')
#2 ~/lib/page.functions.php(550): CMSModule->DoActionBase('ajax_fetchevent...', 'cntnt01', Array, '16', Object(Smarty_CMS))
#3 ~/index.php(156): preprocess_mact('16')
#4 {main}
  thrown in ~/modules/Khronos/action.ajax_fetchevents.php on line 166
Also, just for the records: in admin, whenever it loads the events, this comes up in the error log:
PHP Warning: Undefined array key "event_status" in ~/modules/Khronos/action.admin_ajax_fetchevents.php on line 162

Re: Khronos issues

Posted: Fri May 10, 2024 12:34 pm
by 10010110
I’m upgrading an old site from version 1.12.1 on PHP 5.4 – the hosting company has sent a message that they are going to charge serious money if they are to continue to support PHP 5, so this is kind of urgent and I’m stuck with my project because of this Khronos issue. :( Everything else is working. Is there a quick fix for this?

Re: Khronos issues

Posted: Sun May 12, 2024 10:40 pm
by 10010110
OK, I looked at the database and apparently (as the error message says) there is no event_status column, so as a nasty workaround I went ahead and added one manually with this SQL query:

Code: Select all

ALTER TABLE cms_module_khronos_events
ADD COLUMN event_status CHAR(1);
It seems to work for the time being. I can set the status on the past events and they even show up in list view.

Apparently the CGCalendar importer script is completely overwriting the events table in the database and deleting the event_status column in that process (since this doesn’t exist in CGCalendar). I guess this needs to be set in /modules/Khronos/action.admin_import_cgcal.php where the function

Code: Select all

$result = $importer->set_tables($tables)
is executed.