• I have two sites. Both are identical in all ways that I can find. However, on one site when Contact Form DB is enabled, the following errors are displayed on every page:

    WordPress database error: [Duplicate key name 'submit_time_idx']
    ALTER TABLE wp_cf7dbplugin_submits ADD INDEX submit_time_idx ( submit_time )
    
    WordPress database error: [Duplicate key name 'form_name_idx']
    ALTER TABLE wp_cf7dbplugin_submits ADD INDEX form_name_idx ( form_name )
    
    WordPress database error: [Duplicate key name 'field_name_idx']
    ALTER TABLE wp_cf7dbplugin_submits ADD INDEX field_name_idx ( field_name )

    I have tried deactivating and reactivating the plugin as well as uninstalling and reinstalling to no avail.

    Any other suggestions?

    https://ww.wp.xz.cn/plugins/contact-form-7-to-database-extension/

Viewing 1 replies (of 1 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    This looks like a case where the plugin thinks it needs to upgrade from a very old version to the current version. The plugin stores the last version installed so that when a new version is activated, it looks at the difference in versions and runs upgrade actions.

    Solution 1:
    If you do NOT have any form data that you want to save, then you can uninstall CFDB in a way that wipes out all of its data, tables, settings, etc. By default it does not. To do that, go to the CFDB Options page, find the last item on the page, “Drop this plugin’s Database table on uninstall”. Set that to “true”. Save. Then uninstall and reinstall.

    Solution 2:
    If you have data that you don’t want to loose, this is a little trickier. You have to manually advance the CFDB version so it don’t try to upgrade. From the Plugins page, take the link to edit the plugin. Edit the file “CF7DBPlugin.php”
    Find line 51:
    //'_version' => array('Installed Version'), // For testing upgrades
    remove the leading //
    '_version' => array('Installed Version'), // For testing upgrades
    Go to the CFDB Option page. The first option is “Installed Version”. Set that to the actual version that you installed. Presumably the value there is incorrect or non-existent. Save.

Viewing 1 replies (of 1 total)

The topic ‘WordPress database error displaying on site’ is closed to new replies.