wp-media / imagify-plugin

Speed up your website with lighter images without losing quality.
https://imagify.io
71 stars 25 forks source link

Missing`wp_imagify_folders` database table #688

Open jmslbam opened 2 years ago

jmslbam commented 2 years ago

Before submitting an issue please check that you’ve completed the following steps: Using version 2.0. Yes, have search on the table name with and without wp_ prefix.

Describe the bug There is a database table missing and can't seem to get it fixed

WordPress databasefout: [Table 'local.wp_imagify_folders' doesn't exist]
SELECT folder_id FROM wp_imagify_folders LIMIT 1;

WordPress databasefout: [Table 'local.wp_imagify_files' doesn't exist]
SELECT COUNT( file_id ) FROM wp_imagify_files

WordPress databasefout: [Table 'local.wp_imagify_files' doesn't exist]
SELECT COUNT( file_id ) FROM wp_imagify_files WHERE status IS NULL

WordPress databasefout: [Table 'local.wp_imagify_files' doesn't exist]
SELECT COUNT( file_id ) FROM wp_imagify_files WHERE status IN ('success','already_optimized')

WordPress databasefout: [Table 'local.wp_imagify_files' doesn't exist]
SELECT COUNT( file_id ) FROM wp_imagify_files WHERE status = 'error'

WordPress databasefout: [Table 'local.wp_imagify_files' doesn't exist]
SELECT COUNT( file_id ) FROM wp_imagify_files WHERE status = 'success'

WordPress databasefout: [Table 'local.wp_imagify_files' doesn't exist]
SELECT SUM( original_size ) FROM wp_imagify_files WHERE status = 'success'

WordPress databasefout: [Table 'local.wp_imagify_files' doesn't exist]
SELECT SUM( optimized_size ) FROM wp_imagify_files WHERE status = 'success'

To Reproduce Steps to reproduce the behavior:

  1. Go to Bulk Optimizer screen http://wordpress.local/wp-admin/upload.php?page=imagify-bulk-optimization
  2. View debug info in to op screen.
  3. See error

Expected behavior No errors.

Step to try and fix it Deactivate and activate plugin - Still not working Run bulk optimizer in hope it updates DB table - Still not working

I don't know when this error occured, but it's there and no option to fix it..

Backlog Grooming (for WP Media dev team use only)

jmslbam commented 2 years ago

Oh btw, it also prevent me from updates plugins etc because this error is shown. I know, disabling wp_debug or disabling the plugin helps. Just wanted to let you know.

Simpel solution can be by checking if tables exists on "activating" the plugin, right?

Ciao!

Tabrisrp commented 2 years ago

Can you check in your options table if you have options named like imagify_files_db_version? If yes, delete it, and on the next reload the table should be re-created.