• Thanks for your plugin Peter. I really appreciate it.

    After a recent update, I started getting this error. Thoughts?

    [01-Apr-2022 17:30:03 UTC] WordPress database error Invalid default value for 'log_message' for query ALTER TABLEevonet_avatar_privacyCHARSET utf8mb4 COLLATE utf8mb4_unicode_ci, MODIFYemailvarchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL , MODIFYlog_messagevarchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'NULL\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'' made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('plugins_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, Avatar_Privacy\Components\Setup->update_check, Avatar_Privacy\Data_Storage\Database\Comment_Author_Table->setup, Avatar_Privacy\Data_Storage\Database\Table->setup, Avatar_Privacy\Data_Storage\Database\Table->maybe_create_table, Avatar_Privacy\Data_Storage\Database\Table->maybe_upgrade_charset_and_collation

Viewing 8 replies - 16 through 23 (of 23 total)
  • Plugin Author pepe

    (@pputzer)

    That looks like changing the default did not take. Depending on your database settings, you may need to add a COMMIT; after the ALTER TABLE. Please try again and also run

    SELECT column_name AS 'name', character_set_name AS 'charset', collation_name AS 'collate', column_type AS 'type', is_nullable AS 'nullable', column_default AS 'default' FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'evonet_avatar_privacy' AND column_name = 'log_message';

    again afterwards to check if the default was actually changed.

    Thread Starter ev0net

    (@ev0net)

    Thank you. Implemented. And still same error

    [03-Apr-2022 15:30:04 UTC] WordPress database error Invalid default value for 'log_message' for query ALTER TABLEevonet_avatar_privacyCHARSET utf8mb4 COLLATE utf8mb4_unicode_ci, MODIFYemailvarchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL , MODIFYlog_messagevarchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'NULL\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'' made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('plugins_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, Avatar_Privacy\Components\Setup->update_check, Avatar_Privacy\Data_Storage\Database\Comment_Author_Table->setup, Avatar_Privacy\Data_Storage\Database\Table->setup, Avatar_Privacy\Data_Storage\Database\Table->maybe_create_table, Avatar_Privacy\Data_Storage\Database\Table->maybe_upgrade_charset_and_collation

    FYI: The error log this time clearly shows this is happening at cron runs, which on my system is once an hour at the 30 minute mark. This first error happened at [03-Apr-2022 03:30:04 UTC] which was about 6 hours after I made the changes you recommended

    Plugin Author pepe

    (@pputzer)

    Can you post (or send me via mail, if you prefer) a log of your SQL queries and the actual results?

    Are you running anything special during those cron checks? If you really fixed the incorrect schema, something is re-corrupting it. Could you enable query logging somehow to see where that comes from?

    Thread Starter ev0net

    (@ev0net)

    Yes. I can do that, but I’m not sure how. Can you point me in the direction of instructions of how to get you what you need? I did your suggestions via phpmyadmin, including commit and it was successful. And I have wp_crontrol active. But I’d imagine you need more info.

    Plugin Author pepe

    (@pputzer)

    I’d start by installing the Query Monitor plugin. It might not help if this corruption only happens during the cron handling, but it’s easy to review all queries on interactive requests and you might simply trigger wp-cron.php from the browser.

    Thread Starter ev0net

    (@ev0net)

    I haven’t been able to get query monitor to work properly on the frontend in the past after a couple hours of trying, and have given up for now. Which I’d imagine I’ll need for wp-cron.php run. Can I write query monitor stuff to a log file?

    It sounds like I’m the only one that’s had this problem, which means it’s likely something on my end. It started when I reconfigured my usernames server wide (doing wp-cli search and replace on any entries that referenced directory with username) AND updated wp/other plugins about 3 weeks ago. Do you think it would work to uninstall ap and completely strip out any db remnants and then reinstall? If so, how do I strip out db remnants?

    Plugin Author pepe

    (@pputzer)

    It should be enough to look at the Query Monitor results on the backend. The function in question is triggered whenever the plugin is loaded, that’s also happening on the backend.

    While I haven’t heard of this error before, you might just be triggering a corner case. Trying things in isolation is the preferred way to debug stuff, but you would lose all the stored avatar data, so I’d only try that as the last resort. Also, unless you slowly re-enable all plugins one by one, it would probably only help in that the collation update function would not be triggered anymore, but that’s not the root cause.

    Thread Starter ev0net

    (@ev0net)

    Thanks. Just sent an email to your (code at) email with queries copied and pasted. If you don’t receive it, please let me know.

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Recent database error’ is closed to new replies.