Foliovision › Forums › FV Player › Bug Reports › 7.3.9.727: Table ‘wordpress.wp_fv_player_videos’ doesn’t exist
-
-
Ah, indeed, forgot the traceback.
[05-Feb-2019 16:35:06 UTC] WordPress database error Table 'wordpress.wp_fv_player_videos' doesn't exist for query SELECT id, src FROM `wp_fv_player_videos` as v left join ( select id_video from wp_fv_player_videomet a WHERE meta_key = 'duration' ) as m ON v.id = m.id_video where m.id_video IS NULL ORDER BY id DESC made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php'), WP _CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->_run_command_and_exit, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI \Dispatcher\{closure}, call_user_func, Cron_Event_Command->run, Cron_Event_Command::run_event, do_action_ref_array('fv_flowplayer_checker_event'), WP_Hook->do_action, WP_Hook->apply_filters, FV_Player_Checker->checker_cron
Admin has been visited by users all the time, but tables were never generated.
Also, you shouldn’t be doing table checking on every request, only on plugin activation.
Hello Leho,
thank you for posting these details.
I agree that the table checking shouldn’t be happen too often, not even in wp-admin. The plugin activation hook in WordPress doesn’t run on plugin updates though, so we will have to find a better way. We do store the database version numbers, so we can use that I guess.
Thanks,
Martin> The plugin activation hook in WordPress doesn’t run on plugin updates though, so we will have to find a better way.
Indeed, but many many plugins are doing db migrations during updates. There has to be a best practice mechanism? I just haven’t built a plugin myself with that requirement (yet), so I can’t offer experience-based advice right away.
Hello Leho,
please check Settings -> FV Player Pro -> Tools -> System Info. You should be able to see the values of these option keys:
[video_model_db_checked] => 7.3.12.727 [video_meta_model_db_checked] => 7.3.12.727 [player_model_db_checked] => 7.3.12.727 [player_meta_model_db_checked] => 7.3.12.727
Thanks,
MartinHi Martin,
I’ve the same problem and in System Info I’ve no this option keys. In my error log I’ve a lot of db query error:
WordPress errore sul database Table 'wp_fv_player_playermeta' doesn't exist per la query SELECT vm.meta_value FROM wp_fv_player_playermeta AS pm JOIN wp_fv_player_players AS p ON p.id = pm.id_player JOIN wp_fv_player_videos AS v ON FIND_IN_SET(v.id, p.videos) > 0 JOIN wp_fv_player_videometa AS vm ON v.id = vm.id_video WHERE pm.meta_key = 'post_id' AND pm.meta_value = 153052 AND vm.meta_key = 'duration' ORDER BY CAST(vm.meta_value AS UNSIGNED) DESC LIMIT 1
How I can resolve this. If I disable and renable plugin, table will be recreated or I need to create table manually?
Thanks
DavidHello David,
please try visiting wp-admin -> FV Player, perhaps that will help creating that table. You can check Settings -> FV Player Pro -> Tools -> System Info. You should be able to see the values of these option keys:
[video_model_db_checked] => 7.3.12.727 [video_meta_model_db_checked] => 7.3.12.727 [player_model_db_checked] => 7.3.12.727 [player_meta_model_db_checked] => 7.3.12.727
We also fixed the code which was causing that SQL query which you reported to only run if these tables were initialized. It will be part of the next plugin version.
Thanks,
MartinHi Martin,
I had already taken this step wp-admin -> FV Player but table was not created and in Settings -> FV Player Pro -> Tools -> System Info I can’t find this option keys:
[video_model_db_checked] => 7.3.12.727 [video_meta_model_db_checked] => 7.3.12.727 [player_model_db_checked] => 7.3.12.727 [player_meta_model_db_checked] => 7.3.12.727
I have also disabled and re-enabled the plugin but nothing: table was not created.
I think that the best solution is to create this table manually. What do you think?
Thanks
DavidHello David,
you can reinstall FV Player from here and you will get the fixed version before it’s released: https://github.com/foliovision/fv-wordpress-flowplayer/archive/master.zip
Thanks,
Martin