• Resolved crispress

    (@crispress)


    What happend?
    – I used WF before, but had to deactivate it (see below), including removal of the WF-tables (I saved the settings under a token).
    – When I tried to re-activate I only get a fatal error message in the browser window, and it stays non-activated.

    In the logfile:
    PHP Fatal error: Uncaught mysqli_sql_exception: Table ‘xxx.wl_wfConfig’ doesn’t exist in /is/htdocs
    (…)
    wp-includes/wp-db.php(2056): mysqli_query(Object(mysqli), ‘SELECT name, va…’)
    (…)
    )/wp-admin/includes/plugin.php(2300): include(‘/is/htdocs/wp12…’)\n#11 /is/htdocs/
    (…)
    /wp-admin/plugins.php(191): plugin_sandbox_scrape(‘wordfence/wordf…’)\n#12 {main}\n thrown in /is/htdocs/
    (…)
    /wp-includes/wp-db.php on line 2056

    What I tried:
    – In the database there are two wf-tables left. I renamed them, so for WF everything should look completely blank.
    – I also renamed my wordfence-waf.php.
    – Several times I deleted WF and re-installed.
    – I moved all plugins out of the plugin folder, so WF was the only plugin.

    Nothing makes a difference. That fresh installed WF always seems to expect it’s wfConfig-Table, no matter what.
    I’m on WP 5.7.8.

    Why did I delete my settings? Because of the following fatal error ‘lastNotificationID’, which occured every time I updated a plugin:

    PHP Fatal error: Uncaught mysqli_sql_exception: Duplicate entry ‘lastNotificationID’ for key ‘PRIMARY’ in /is/htdocs/(…)/wp-includes/wp-db.php:2056\nStack trace:\n#0 /is/htdocs/(…)/wp-includes/wp-db.php(2056): mysqli_query(Object(mysqli), ‘INSERT INTO wl_…’)\n#1 /is/htdocs/(…)/wp-includes/wp-db.php(1945): wpdb-]_do_query(‘INSERT INTO wl_…’)\n#2 /is/htdocs/(…)/wp-content/plugins/wordfence/lib/wfConfig.php(446): wpdb-]query(‘INSERT INTO wl_…’)\n#3 /is/htdocs/(…)/wp-content/plugins/wordfence/lib/wfNotification.php(83): wfConfig::atomicInc(‘lastNotificatio…’)\n#4 /is/htdocs/(…)/wp-content/plugins/wordfence/lib/wordfenceClass.php(386): wfNotification-]__construct(NULL, 502, ‘[a href=”https:…’, ‘wfplugin_update…’)\n#5 /is/htdocs/(…)/wp-content/plugins/wordfence/lib/wordfenceClass.php(351): wordfence::_refreshUpdateNotification()\n#6 /is/htdocs/(…)/wp-includes/class-wp-hook.php(292): wordfence::_scheduleRefreshUpdateNotification(Object(Plugin_Upgrader), Array)\n#7 /is/htdocs/(…)/wp-includes/class-wp-hook.php(316): WP_Hook-]apply_filters(NULL, Array)\n#8 /is/htdocs/(…)/wp-includes/plugin.php(484): WP_Hook-]do_action(Array)\n#9 /is/htdocs/(…)/wp-admin/includes/class-plugin-upgrader.php(371): do_action(‘upgrader_proces…’, Object(Plugin_Upgrader), Array)\n#10 /is/htdocs/(…)/wp-admin/includes/ajax-actions.php(4460): Plugin_Upgrader-]bulk_upgrade(Array)\n#11 /is/htdocs/(…)/wp-includes/class-wp-hook.php(292): wp_ajax_update_plugin(”)\n#12 /is/htdocs/(…)/wp-includes/class-wp-hook.php(316): WP_Hook-]apply_filters(”, Array)\n#13 /is/htdocs/(…)/wp-includes/plugin.php(484): WP_Hook-]do_action(Array)\n#14 /is/htdocs/(…)/wp-admin/admin-ajax.php(187): do_action(‘wp_ajax_update-…’)\n#15 {main}\n thrown in /is/htdocs/(…)/wp-includes/wp-db.php on line 2056

    I’ve deleted the database entry, but that didn’t help, so I went the route of deactivation including settings-removal…

    Why did that “lastNotificationID”-error happen?
    Maybe because I had to update WP from version 4.9.x to 5.7.8 because of PHP 8 incompatibility. After that, WP greeted me which “Database update required” before I could do anything in the admin, so I did. That update went in a second, no idea what WP changed.

Viewing 1 replies (of 1 total)
  • Thread Starter crispress

    (@crispress)

    I tried a lot of things with the database, nothing helped.

    I think WordFence could not create it’s table, for whatever reason, and it then tries to access the table…

    But I got later a “hint” by activating another plugin which also got a “fatal error”, but with a rather meaningless error in the server log.

    I ended up updating to WordPress 6, and that cured the problem.

    I would say that this could be a problem of WP 5.7.x and PHP 8.x (my hoster forced all users to PHP 8), but on the other hand I have two other sites which run WP 5.7.x and PHP 8.x. Though, I haven’t tried to deactive/activate Plugins there, because for now I had enough troubleshooting…

    Maybe this is useful for others.

Viewing 1 replies (of 1 total)
  • The topic ‘Deactivated – Activated – Fatal Error’ is closed to new replies.