• Resolved dylanjameswagner

    (@dylanjameswagner)


    WordPress database error Table doesn’t exist in engine for query…

    I am getting 100s of lines very similar to the following error in the WordPress /wp-content/debug.log:

    [26-Sep-2018 21:49:21 UTC] WordPress database error Table ‘databasename.wp_wfConfig’ doesn’t exist in engine for query SELECT name, val, autoload FROM wp_wfConfig WHERE name = ‘apiKey’ made by activate_plugin, include_once(‘/plugins/wordfence/wordfence.php’), wordfence::install_actions, wordfence::getLog, wfLog::shared, wfConfig::get

    I have tested this with the default theme twentyseventeen and NO other plugins activated. I have tried deleting all code based configs and all database tables. The errors re-appears on every page load.

    I have tested using older version of the plugin back to version 7.1.0 and I still get these entries in the debug.log.

    I am running this on NGINX via Docker locally and on NGINX via Azure remotely.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @dylanjameswagner,

    It does sounds like there is still a problem with the table even though you have tried removing it. With innoDB it will occasionally happen that tables can crash in a bad way leaving orphaned .idb files in /var/lib/mysql. I would recommend you check that to make sure this isn’t the problem.

    Thread Starter dylanjameswagner

    (@dylanjameswagner)

    It appears as the the Wordfence plugin has had troubles creating SOME of the tables it needs. And there seems like table name capitalization may perhaps be part of the issue.

    I have been able to get it running as expected but it is not clear which steps of activating/deactivating the plugin, and/or saving settings has sidestepped the issue and allowed the tables to be created.

    Hi again,
    I’m afraid I can’t tell you that either. Normally clearing out all tables and then reactivating the plugin will fix any issues with the tables because it allows them to be recreated (with the exception of the scenario I mentioned previously with orphaned database files).

    We recently changed the tables to not be capitalized (because that was causing issues with some other softwares). Installing a fresh version of the recent release you shouldn’t have any tables with capitalization.

    Thread Starter dylanjameswagner

    (@dylanjameswagner)

    I definitely had tables with capitalization. Perhaps from an earlier version before a recent update. The “Delete Wordfence tables and data on deactivation” feature definitely didn’t work when there were tables with capitalization because of the same error described in my original post. Eventually I found the right combination of deactivating/activating the plugin and manually deleting the “wf” tables.

    Thanks for the update. It sounds like this may have been caused by a combination of issues occurring at the same time then namely a crashed table and the plugin attempting to change to lowercase table names at the same time, possibly in combination with some specific config or circumstance on the server. We haven’t seen other reports of this as far as I know and it’s definitely not something we’ve seen in testing or that is occurring consistently.

    Hopefully you won’t see this happening again but if you do, you are of course welcome to get back in touch.

    stabilimenta

    (@stabilimenta)

    I was having similar issues with Version 7.1.17. I have a site where the db was getting really large. I set WF’s preference to delete its tables on disabling the plugin. I then disabled the plugin, and I couldn’t access the admin anymore (500 server errors). I figured out that the wordfence-waf.php was being left behind, and that was causing it. I tried using the WordFence Assistant to clean the data and files out, but it wasn’t working either. It just wasn’t removing them. I followed the instructions for doing it here:
    https://www.wordfence.com/help/advanced/remove-or-reset/
    and this list of tables wasn’t exactly what was in my db, but I removed everything prefixed with wp_wf*.
    I thought, ok, clean slate, now reinstall WordFence… but then I get this in the header of the admin pages:

    WordPress database error: [Table 'mywpdatabase_db.wp_wfConfig' doesn't exist]SELECT name, val, autoload FROM wp_wfConfig WHERE name = 'debugOn'
    Warning:  Cannot modify header information - headers already sent by (output started at /home/crawei3/architecturalwoodcraft.com/archwood/wp-includes/wp-db.php:1399) in /home/crawei3/architecturalwoodcraft.com/archwood/wp-admin/includes/misc.php on line 1126
    

    I look in my database, and it’s there, only lowercase: wp_wfconfig
    I turned off debugging in my wp-config.php, and the error goes away, but something is screwy with all of this.

    wfasa

    (@wfasa)

    Hi @stabilimenta,
    We’ve recently released an update to the Wordfence assistant to fix an issue where it wouldn’t delete some old tables.

    All tables should be lower case in newer versions of Wordfence. If your site is looking for tables with mixed case at this point, it could be an issue with some server side cache.

    This is exactly what is my issue is. I check in database the table name is wp_wfconfig, but they looking for wp_wfConfig.

    You mentioned its related to server side cache, Do you have any solution, how i can fix this issue ?

    Hi @shojibur,
    First check to make sure you’re using the most recent version of Wordfence. If you are, check if you have any cache plugins installed and try clearing cache in those. If that doesn’t help I’d recommend reaching out to your web host and explain that database queries appear to be cached and inquire about any cache they may be implementing on your site.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WordPress database error Table doesn’t exist in engine for query…’ is closed to new replies.