• Resolved Ambyomoron

    (@josiah-s-carberry)


    Using ver. 2.2.1 of plugin.

    In the course of enabling maintenance mode a series of errors were logged in the web server error log. As I saw no errors in the backend itself I do not know exactly what triggered it. However, this is what I do:
    1. Under Modules | Start date I click on Now, then Done
    2. I set the countdown to 1 minute
    3. I click on Save settings
    4. Under General | Status I click on Activated
    5. I click on Save settings
    6. About 1 minute later Under General | Status I click on Deactivated
    7. I click on Save settings

    By the IP address in the errors, it is clear that they are related to the above actions.

    10:47:14.771491
    stderr: PHP message: WordPress database error Cannot add foreign key constraint for query , referer: https://mysite.com/wp-admin/options-general.php?page=wp-maintenance-mode

    10:47:14.771599
    stderr: \t\t\t\t\tALTER TABLE cccwp_wc_download_log, referer: https://mysite.com/wp-admin/options-general.php?page=wp-maintenance-mode

    10:47:14.771604
    stderr: \t\t\t\t\tADD CONSTRAINT fk_wc_download_log_permission_id, referer: https://mysite.com/wp-admin/options-general.php?page=wp-maintenance-mode

    10:47:14.771609
    stderr: \t\t\t\t\tREFERENCES cccwp_woocommerce_downloadable_product_permissions (permission_id) ON DELETE CASCADE;, referer: https://mysite.com/wp-admin/options-general.php?page=wp-maintenance-mode

    10:47:14.771612
    stderr: \t\t\t\t made by require_once(‘wp-admin/admin.php’), require_once(‘wp-load.php’), require_once(‘blahblah/wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Install::check_version, WC_Install::install, WC_Install::create_tables, referer: https://mysite.com/wp-admin/options-general.php?page=wp-maintenance-mode

    I note further the following two entries in the web server access log, that may or may not be related:

    From the web server:
    POST /wp-admin/admin-ajax.php?action=wp_1_wc_privacy_cleanup&nonce=925520a95c HTTP/1.1

    From the admin client (same as the errors above):
    POST /?wc-ajax=get_refreshed_fragments HTTP/2.0

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Cannot add foreign key constraint database errors’ is closed to new replies.