Tried deleting uninstall.php from core plugin, in order to save my events. Uninstalled and reinstalled and problem persisted. Then I compared DB entries of working install vs non working and discovered some entries that needed to be cleaned up in the non-working install.
My solution was to keep and use uninstall.php, but I edited it to remove lines pertaining to removing post and drop tables, and removed a line a little further down regarding cleaning up tables:
uninstall.php @ Line 77: remove
/**
* Deletes posts and drop tables
*/
function ai1ec_clean_up_tables() {
global $wpdb;
// Delete events
$table_name = $wpdb->prefix . 'ai1ec_events';
$query = 'SELECT DISTINCT <code>ID</code> FROM
‘ . $wpdb->posts .
‘WHERE
post_type` = \’ai1ec_event\”;
foreach ( $wpdb->get_col( $query ) as $postid ) {
wp_delete_post( (int) $postid, true );
}
// Delete table events
ai1ec_delete_table_and_backup( $table_name );
// Delete table event instances
$table_name = $wpdb->prefix . ‘ai1ec_event_instances’;
ai1ec_delete_table_and_backup( $table_name );
// Delete table event feeds
$table_name = $wpdb->prefix . ‘ai1ec_event_feeds’;
ai1ec_delete_table_and_backup( $table_name );
// Delete table category colors
$table_name = $wpdb->prefix . ‘ai1ec_event_category_meta’;
ai1ec_delete_table_and_backup( $table_name );
// Delete legacy logging table
$table_name = $wpdb->prefix . ‘ai1ec_logging’;
ai1ec_delete_table_and_backup( $table_name );
}
Then find and edit
function ai1ec_clean_up_site() {
// Delete event categories taxonomy
ai1ec_remove_taxonomy( ‘events_categories’ );
// Delete event tags taxonomy
ai1ec_remove_taxonomy( ‘events_tags’ );
// Delete custom user roles and capabilities
ai1ec_remove_custom_user_roles_capabilities();
// Delete custom user meta
ai1ec_remove_custom_user_meta();
ai1ec_uninstall_crons();
ai1ec_uninstall_options();
ai1ec_clean_up_tables(); <— delete this line
}`
to:
function ai1ec_clean_up_site() {
// Delete event categories taxonomy
ai1ec_remove_taxonomy( 'events_categories' );
// Delete event tags taxonomy
ai1ec_remove_taxonomy( 'events_tags' );
// Delete custom user roles and capabilities
ai1ec_remove_custom_user_roles_capabilities();
// Delete custom user meta
ai1ec_remove_custom_user_meta();
ai1ec_uninstall_crons();
ai1ec_uninstall_options();
}
This will preserve your events and remove everything else.