Okay
  Public Ticket #3493717
CSV Import
Closed

Comments

  •  3
    elvisfrog started the conversation

    What are the required headers for the CSV file? Do they all need to be listed even if blank? Also, when I do a test import I see errors reported from the CSV Import on the backend for Events but wonder where I could see these errors.

  •  877
    Zhivko replied

    Hi,

    Here's CSV file with an event with minimum requirements.

    Attached files:  Minimum.csv


    Stachethemes Developer

  •  3
    elvisfrog replied

    I am getting lost on trying to get this import to work properly, I am working with this test import csv file:

    Title,"Start date","End date","All day",Description,"Short Description",Address,City,Calendar,Categories,"External Link","External Link Text"
    "Test Event 2","10/5/2023 18:00","10/7/2023 23:30",0,"Test event desription, event" and stuff.",,"Some Event Studio, 1234 West drive St",Denton,"[""Events""]","[""Tester""]","https://voiceofdenton.com","View Event"

    It shows it gets imported but does not show in the event list, but when you go to the main page of STEC it shows that I have 22 events, but when you click on events it only shows 16 events and when I look at the database files I see 6 additional previous imports which said success on import, with a post type of "stec_event" but they don't show anywhere on the backend or frontend.

    I am going to include my csv file as well in case of weird formatting. The code I am writing creates the csv file and I will use the following headers Title, start date, end date, description, short description, address, city, Calendar (and do I use only the formating "[""calendar name""]" or can I just use the id), Categories (same question), External link and external link text. 

    Do the headers need to be formatted with quotes "" as I saw you earlier "Notting Hill Carnival" example has no quotes around Start Date and in this minimum example it shows quotes "Start date". Feel like I am playing whack-a-mole. Also I when I get a failed import it will say errors and would really like to see what those errors are as this might help me diagnose the issue.

    Thanks for any guidance on this.


    Attached files:  single-tester.csv

  •  877
    Zhivko replied

    Hi,

    Here's the corrected file.

    1. Date format by default should be YYYY-MM-DDTHH:MM. Example: 2023-10-05T18:00
      1060362807.png
    2. Timezone column was missing. Defaults to "stec_cal_default" if the event is using the calendar timezone.
      4570315405.png
    3. External link is an object with url and text: {"url":"https://voiceofdenton.com","text":"View Event"}
      2828799651.png
    4. Address should be changed to Locations. Even though an event can have only one location, the field expects an array with the location name: ["Some Event Studio, 1234 West Drive St"]
      7271221835.png
    5. Thumbnail column was missing and is currently required. Expects an object: {"type":"icon","icon":"fa-solid fa-calendar","image":[]}
      5620503830.png

      You can change "fa-solid fa-calendar" to any other FontAwesome 6 icon.

    Attached files:  single-tester-fixed.csv


    Stachethemes Developer

  •  3
    elvisfrog replied

    Thanks that helps a lot. 

  •  1
    denizutku35 replied

    Hello,

    I tried to import the Csv file you shared, but I failed. Exporting my own events and I had edit and import them again. But, i wasnt import anything. Is there a setting I should check?

    Thanks