Home › Forums › Calendar Products › Event Aggregator › Can not import events again (after deleting them)
- This topic has 3 replies, 2 voices, and was last updated 8 years, 6 months ago by Brian.
-
AuthorPosts
-
November 10, 2015 at 6:39 am #1023687AndreasParticipant
Hello!
I imported events from a public Google Calendar and noticed a 2 hours difference for all events.
So I deleted the wrong imported events, changed some timezone settings and wanted to try it again. But now I always get “Your search returned no results. Please adjust your search.”The Google Calendar is:
https://calendar.google.com/calendar/[email protected]&ctz=Europe/BerlinI would appreciate any help to get the import work again – and hope I can solve the time issue afterwards..
Thanks in advance!
(I’m afraid I cannot easily deactivate all other plugins and switch to the default theme, because the site is an online shop, which needs to be accessible without interruptions.)
November 10, 2015 at 8:35 am #1023779BrianKeymasterHi,
I can help out here.
This is by design. So that if you deleted an event it would not reimport on you.
To do this we actually keep the deleted event in the database to check for it.
This plugin can completely remove trashed events in the database:
It does not do it by default, but there is a setting to Delete Trashed Items.
Before using that plugin it would be a good idea to backup your database just in case something goes wrong.
For the future you can add this snippet:
/*
* Prevents iCal importer from saving a copy of "deleted" events
* This means when you rerun an import, it will reimport any events you previously deleted
*/
function tribe_ical_dont_save_deleted () {
$ical_importer = Tribe__Events__Ical_Importer__Main::instance();
remove_action( 'before_delete_post', array( $ical_importer, 'deletedEventSave' ) );
}
add_action( 'wp_loaded', 'tribe_ical_dont_save_deleted' );And that will not save a copy of the deleted event so you can reimport it.
Let me know how that works out.
Thanks
November 11, 2015 at 4:17 am #1024125AndreasParticipantThank you, this worked perfectly!
November 11, 2015 at 7:33 am #1024205BrianKeymasterGreat, glad it helps, I am going to go ahead and close this ticket, but if you need help on this or something else please post a new ticket.
Thanks!
-
AuthorPosts
- The topic ‘Can not import events again (after deleting them)’ is closed to new replies.