samuelblackstone

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • samuelblackstone
    Participant

    Hey Nico,

    Thanks for the information. This did help get me down the right path.

    There were, however, a few issues with the documentation.

    I didn’t see anywhere where it specifies the expected format for dates when they’re being added via EventStartDate. (note to everyone else: it appears to be PHP’s Y-m-d format).

    Also, adding just the date wasn’t enough. I did have to go and specify:

    EventStartHour
    EventEndMinute
    EventStartHour
    EventEndMinute

    Otherwise, I get an error when the import runs, on lines 220/221 of the API.php file where it builds these variables:

    $start_date_string = "{$data['EventStartDate']} {$data['EventStartHour']}:{$data['EventStartMinute']}:00";
    $end_date_string = "{$data['EventEndDate']} {$data['EventEndHour']}:{$data['EventEndMinute']}:00";

    The plugin: I could post the actual file, as it is open source. But there are more dependencies in its code, so that would seem perhaps more confusing than anything else.

    Overall, I have items importing, but not in a totally perfect way yet (time stamps are wrong), but progress continues.

    samuelblackstone
    Participant

    I can share some code, but first let me ask about this:

    I guess some metadata is not present when you save the event, and it’s generated when you manually update the event in the back-end

    Are you saying that the absence of some metadata will cause the event to not update correctly? If so, that’s a surprise, since the same events do import and show as posts when imported as normal posts (and note events). The events do show date and time info as well. Is there any specific metadata that, if missing, would cause the data to not post?

    I tried this two different ways: first, as a test function in our functions.php file. The second way was by using: http://feedwordpress.radgeek.com to import an RSS feed. I did a quick hack as a test and replaced their use of wp_insert_post with tribe_create_event. This got me to where I am now.

    I can post the code, but it would be a lot. Let me know how you would like to proceed.

    Thanks!

Viewing 2 posts - 1 through 2 (of 2 total)