The Events Calendar Venue Issue

I’m a big fan of Events Calendar Pro. It makes all sorts of date related things in WordPress very pleasant. The free plugin also does a great job.

I did run into a bit of an issue this afternoon as I tried to take events I created in one site and get them into another. Since the events are a custom post type you use the normal WordPress Tools>Export to get them out.

The WordPress export screen showing Events as the designated export option selected.

That worked fine and I was able to import the events into the new site. The issue came with venues. I’d defined some Venues so I wouldn’t have to keep entering the same addresses again and again. I was able to export/import them in the same way I’d exported the events and they showed up fine as content.

Unfortunately, it seems like plugin references the venues via post1 IDs. My imported venues ended up with different IDs and the IDs reference by the events ended up being random WordPress posts (in the traditional sense). This led to venues with names like ‘untitled 4’ or ‘a moment of calm in online teaching.’ Trying to change them on the backend to the venues I’d imported led to weird duplications and the prior information displayed no matter what I did.

I didn’t have a huge number of events, maybe 13. Really just enough that I wasn’t willing to give up without a fight.

I took a quick scan of my export XML and searched for venue. I found two main chunks.

<wp:postmeta>
			<wp:meta_key><![CDATA[_EventVenueID]]></wp:meta_key>
			<wp:meta_value><![CDATA[621]]></wp:meta_value>
</wp:postmeta>
<wp:meta_value><![CDATA[a:22:{s:12:"_EventOrigin";d:1503392591;s:10:"_edit_last";d:1503392603;s:10:"post_title";d:1503392603;s:11:"post_status";d:1503392714;s:12:"post_content";d:1503392677;s:16:"tribe_events_cat";i:1503407114;s:16:"_EventRecurrence";d:1503392714;s:17:"_EventShowMapLink";d:1503392714;s:13:"_EventShowMap";d:1503392714;s:13:"_EventVenueID";d:1503392714;s:17:"_EventOrganizerID";d:1503392714;s:15:"_EventStartDate";d:1503392714;s:13:"_EventEndDate";d:1503392714;s:18:"_EventStartDateUTC";d:1503392714;s:16:"_EventEndDateUTC";d:1503392714;s:14:"_EventDuration";d:1503392714;s:20:"_EventCurrencySymbol";d:1503392714;s:22:"_EventCurrencyPosition";d:1503392714;s:10:"_EventCost";d:1503392714;s:9:"_EventURL";d:1503392714;s:14:"_EventTimezone";d:1503392714;s:18:"_EventTimezoneAbbr";d:1503392714;}]]></wp:meta_value>

I opted to just remove the first piece and then try to re-import things. That did the trick.

It’s like that I could have set the 621 data in the example above to the ID of my new venue and I’d have gotten that to work rather than just unsetting the venue. I opted not to bother because I needed people to verify the rooms anyway.

Another small example of how you don’t actually need to know exactly what you’re doing to get things to (mostly) work.


1 All custom posts are posts even if you call them events or venues.

Comments on this post

No comments.

Leave a Reply

Trackbacks and Pingbacks on this post

No trackbacks.

TrackBack URL