Page 1 of 1

Imports on CGCalendar

Posted: Wed Dec 13, 2017 5:41 pm
by scotch33
In the latest CGCalendar my client regularly imports. The imports all come through as draft and it's a hassle for them to manually set them to published.

in the admin of the module, new events are set to come in as 'published' but this applies to manually created new events as far as I can see. I need to work out a way to set imports to come in as published. has anyone else had this particular battle?

Re: Imports on CGCalendar

Posted: Wed Dec 13, 2017 6:26 pm
by Rolf
Settings page under Site Admin
Default status for new events

Re: Imports on CGCalendar

Posted: Wed Dec 13, 2017 6:27 pm
by scotch33
Thanks pal - in the CGCalendar settings? If so, as mentioned, already set to 'published'.

Re: Imports on CGCalendar

Posted: Sun Dec 17, 2017 1:16 am
by velden
Quickly checked the code and - sorry to say - it seems very unlikely to me imported events are set to draft:

Code: Select all

 // now begin importing.
  $errors = array();
  $imported = 0;
  while( !feof($handle) ) {
      $event_status = 'P'; // exported events are only published events.
You might want to check the database after importing for the cgcal event table event_status column. It should read 'P' for the imported events.