Import via phpMyAdmin — problems with dates/times
-
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:
- Update post_type in the main
posts
table to ‘event’ for all event posts. - Insert data in to
em_events
table using INSERT query forpost_id
,event_slug
,event_owner
,event_status
,event_name
,event_timezone
,post_content
for data selected from theposts
table - Update the
em_events
with start/end dates/times extracted frompostmeta
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:
- 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
andevent_end
fields had to be stored in UTC time and therefore be offset from theevent_start_time
andevent_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. - 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:
- updating the permalink settings via EM > Settings > Pages > Permalink slugs —> no dice
- 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
- updating the event with NO changes in the CMS —> work, but as above, too slow
- quick-edit update of event —> doesn’t work
- 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 - Update post_type in the main
- The topic ‘Import via phpMyAdmin — problems with dates/times’ is closed to new replies.