I just installed and activated my copy of the calendar plugin and I seem to be missing the Import Event menu.
Was it moved somewhere else?
According to other support tickets, it should be under STEC -> Import Events, but as you can see in the attached image, there is nothing like that in the menu.
I added some debug statements to see what is happening and it looks like for some obscure reason, the Title column is ignored in the parsing of the file.
Here is the output for the first row of the sample file I attached in my previous message:
Hi
I just installed and activated my copy of the calendar plugin and I seem to be missing the Import Event menu.
Was it moved somewhere else?
According to other support tickets, it should be under STEC -> Import Events, but as you can see in the attached image, there is nothing like that in the menu.
I figured it out ... there is no Import Event until a first calendar has been created, which makes sense.
You can mark this as closed. The plugin looks great so far!
Is there a way to tell why a CSV import is failing? a log somewhere or a debug statement to add to php?
I have tried various combinations of dates, and other parameters but CSV keeps returning 0 import.
I even tried exporting a sample event to CSV and re-importing it with the 'overwrite events' ON and it is still failing.
Hi,
Could you send me your csv file to check it out? Perhaps the CSV Settings are misconfigured.
Stachethemes Developer
Here is a sample file.
I used 'm/d/Y g:i' as the date time format.
If that can help... I enabled error logging on Wordpress after seeing calls to Admin_Helper::debug_log in the class.import file.
The strange thing is that no error are reported at all. The import seems to go well except 0 events are imported.
[23-Apr-2021 12:28:38 UTC] STEC LOG :: Import job importing D:\path\to\php\tmp\php26B3.tmp to calendar 6806
[23-Apr-2021 12:28:38 UTC] STEC LOG :: Import job imported
I also verified the php\tmp folder is writeable. I can see the temp file being created and deleted during the import process.
I added some debug statements to see what is happening and it looks like for some obscure reason, the Title column is ignored in the parsing of the file.
Here is the output for the first row of the sample file I attached in my previous message:
All keys are matched except the title.
I figured it out... the clue was when I tracked down how the file was parsed and found out it didn't detect the Title column.
I even compared the strings in two ways and got the same result - 'Title' is not 'Title.
That pointed me to the direction of an invisible character at the start of the file (CSV wit hBOM).
Here's an article about how to get rid of it in PHP: https://medium.com/@choco14t/handle-csv-of-utf-8-with-bom-in-php-40df930de7b1
Once I removed that character from my CSV file, events were imported into the Calendar.
Thank you for the info. I'll take a look at this.
Stachethemes Developer