This issue can happen if you update the theme from a version older than 2.9
Initial steps to fix the problem:
- Go to wp-admin > theme tools > performance > data updates > click “Migrate locations” and “Migrate work hours”
- Go to wp-admin > theme tools > performance > regenerate preview card cache
This should solve the issue in most cases. However in certain cases you may get this error:
Error: Could not find locations table.
Solving the issue using a snippet
First, I would recommend saving a backup before following the steps below.
- Add this snippet to your child theme
add_action( 'init', function() {
if ( current_user_can( 'administrator' ) && isset( $_GET['dbupdate'] ) ) {
global $wpdb;
$wpdb->query( "ALTER TABLE {$wpdb->posts} ENGINE = InnoDB;" );
delete_option( 'mylisting_locations_table_version' );
delete_option( 'mylisting_work_hours_table_version' );
}
} );
- Go to yoursite.com/wp-admin?dbupdate
to execute the snippet
- Remove the snippet from child theme
- Go to wp-admin > theme tools > performance > data updates > click “Migrate locations”
- Go to wp-admin > theme tools > performance > regenerate preview card cache
(Alternate method) Solving the issue manually
- Login to phpMyAdmin Click on the database you’re using for your website
- Open the wp_posts table > Operations > Table Options > Storage engine > change this to InnoDb
- Open the wp_options table > delete “mylisting_locations_table_version” and “mylisting_work_hours_table_version”
- Go to the backend of your website and refresh it once
- Wp admin > performance > data update > click Run Again for “Migrate Listing Location” and “Migrate Work Hours”
- Wp admin > performance > Preview cards > regenerate cache if you have it enabled