Support » Plugin: Events Manager » Import via phpMyAdmin — problems with dates/times

  • Resolved Alison

    (@zirafa)


    Hi there,

    I’m planning to switch my calendar from another plugin over to Events Manager — your plugin seems in almost every way to be superior. Thanks for building such a great tool. Unfortunately, I’ve run into problems with the import of my existing events. Here’s the basic process I’m trying to follow, via MySQL queries in phpMyAdmin:

    1. Update post_type in the main posts table to ‘event’ for all event posts.
    2. Insert data in to em_events table using INSERT query for post_id, event_slug, event_owner, event_status, event_name, event_timezone, post_content for data selected from the posts table
    3. Update the em_events with start/end dates/times extracted from postmeta where they were stored by the old plugin.

    This process did get all the events to show up in the EM section of the Dashboard, but there are two major problems:

    1. All the dates/times are screwy: the dates show up, but the times all display as 00:00, despite the fact that the correct times are there in the database. At first I didn’t realize that the event_start and event_end fields had to be stored in UTC time and therefore be offset from the event_start_time and event_end_time fields, but even after I fixed that on some sample rows, they don’t show up properly in the CMS or on the front end. If I do a search for two sample rows — one manually edited via the Dashboard to set dates/times and showing up correctly, one with dates/times set directly via the DB and not displaying properly — they look identical in phpMyAdmin so I can’t see anything to fix.
    2. Although the imported events show up in the events list on the front end, clicking on a link to view an individual event page yields a “Page Not Found” error. If I load the individual event in the CMS and click the “Update” button (event without making any changes) that fixes the problem, but since I’m dealing with an archive of > 20,000 events, I can’t very well repeat that procedure manually for every one.

    Summary of what I’ve tried, so far, to fix the “Page Not Found” errors:

    1. updating the permalink settings via EM > Settings > Pages > Permalink slugs —> no dice
    2. updating the event with some changes in the CMS —> this works, but as noted above, would be too time-consuming to do for every event in the archive
    3. updating the event with NO changes in the CMS —> work, but as above, too slow
    4. quick-edit update of event —> doesn’t work
    5. Working on trying programmatic update of events (via functions.php), but so far none of my experiments have succeeded.

    I will be so grateful for assistance — if I can’t get the imported events to display properly, then I can’t use this great plugin!

    Thanks,
    Alison

Viewing 1 replies (of 1 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    just to confirm, aside from MySQL tables with prefix em_* did you included wp_posts and wp_postmeta with post id is equivalent to wp_em_events post_id?

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.