pressidium / pressidium-cookie-consent

🍪 Lightweight, user-friendly and customizable cookie consent banner to help you comply with the EU GDPR cookie law and CCPA regulations.
https://wordpress.org/plugins/pressidium-cookie-consent/
GNU General Public License v2.0
45 stars 2 forks source link

Custom table cannot be created on specific setups #84

Closed over-engineer closed 1 month ago

over-engineer commented 1 month ago

Initially reported by @radovand on the WordPress.org support forum.

In a particular configuration, consent records were not being stored at all.

it does not register “Consent records” at all

@radovand provided the following logs:

[03-Aug-2024 04:30:00 UTC] PHP Warning: Trying to access array offset on value of type bool in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Database/Database_Manager.php on line 116
[03-Aug-2024 04:30:00 UTC] WordPress database error Specified key was too long; max key length is 1000 bytes for query CREATE TABLE wpd8_pressidium_cookie_consents (
id VARCHAR(255) NOT NULL PRIMARY KEY ,
consent_date DATETIME NOT NULL ,
url VARCHAR(255) NOT NULL ,
geo_location VARCHAR(255) ,
ip_address VARCHAR(255) NOT NULL ,
user_agent VARCHAR(255) NOT NULL ,
necessary_consent TINYINT(1) DEFAULT 0 NOT NULL ,
analytics_consent TINYINT(1) DEFAULT 0 NOT NULL ,
targeting_consent TINYINT(1) DEFAULT 0 NOT NULL ,
preferences_consent TINYINT(1) DEFAULT 0 NOT NULL ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL ,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL ON UPDATE CURRENT_TIMESTAMP
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci made by require('wp-blog-header.php'), 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, Pressidium\WP\CookieConsent\init_plugin, Pressidium\WP\CookieConsent\Plugin->init, Pressidium\WP\CookieConsent\Plugin->register_tables, Pressidium\WP\CookieConsent\Database\Database_Manager->maybe_upgrade_tables, Pressidium\WP\CookieConsent\Database\Table->create, dbDelta
[03-Aug-2024 04:30:25 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SELECT COUNT() FROM wpd8_pressidium_cookie_consents WHERE id = '5d44b069-fcad-49c4-a942-54835b34c097' made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->has_consent_record [03-Aug-2024 04:30:25 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SHOW FULL COLUMNS FROM wpd8_pressidium_cookie_consents made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->insert_consent_record, Pressidium\WP\CookieConsent\Database\Table->insert [03-Aug-2024 04:30:45 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SELECT COUNT() FROM wpd8_pressidium_cookie_consents made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->get_consent_records, Pressidium\WP\CookieConsent\Database\Table->get_total_number_of_rows
[03-Aug-2024 04:30:45 UTC] PHP Fatal error: Uncaught TypeError: Pressidium\WP\CookieConsent\Database\Table::get_total_number_of_rows(): Return value must be of type int, null returned in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Database/Table.php:218
Stack trace: 0 /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Admin/Settings/Settings_API.php(1067): Pressidium\WP\CookieConsent\Database\Table->get_total_number_of_rows() 1 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(1230): Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->get_consent_records() 2 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(1063): WP_REST_Server->respond_to_request() 3 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch() 4 /home/horecamasters/public_html/wp-includes/rest-api.php(420): WP_REST_Server->serve_request() 5 /home/horecamasters/public_html/wp-includes/class-wp-hook.php(324): rest_api_loaded() 6 /home/horecamasters/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 7 /home/horecamasters/public_html/wp-includes/plugin.php(565): WP_Hook->do_action() 8 /home/horecamasters/public_html/wp-includes/class-wp.php(418): do_action_ref_array() 9 /home/horecamasters/public_html/wp-includes/class-wp.php(813): WP->parse_request() 10 /home/horecamasters/public_html/wp-includes/functions.php(1336): WP->main() 11 /home/horecamasters/public_html/wp-blog-header.php(16): wp() 12 /home/horecamasters/public_html/index.php(17): require('/home/horecamas…') 13 {main}

thrown in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Database/Table.php on line 218
[03-Aug-2024 04:30:52 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SELECT COUNT() FROM wpd8_pressidium_cookie_consents WHERE id = '5d44b069-fcad-49c4-a942-54835b34c097' made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->has_consent_record [03-Aug-2024 04:30:52 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SHOW FULL COLUMNS FROM wpd8_pressidium_cookie_consents made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->insert_consent_record, Pressidium\WP\CookieConsent\Database\Table->insert [03-Aug-2024 04:31:20 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SELECT COUNT() FROM wpd8_pressidium_cookie_consents made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->get_consent_records, Pressidium\WP\CookieConsent\Database\Table->get_total_number_of_rows
[03-Aug-2024 04:31:20 UTC] PHP Fatal error: Uncaught TypeError: Pressidium\WP\CookieConsent\Database\Table::get_total_number_of_rows(): Return value must be of type int, null returned in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Database/Table.php:218
Stack trace: 0 /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Admin/Settings/Settings_API.php(1067): Pressidium\WP\CookieConsent\Database\Table->get_total_number_of_rows() 1 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(1230): Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->get_consent_records() 2 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(1063): WP_REST_Server->respond_to_request() 3 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch() 4 /home/horecamasters/public_html/wp-includes/rest-api.php(420): WP_REST_Server->serve_request() 5 /home/horecamasters/public_html/wp-includes/class-wp-hook.php(324): rest_api_loaded() 6 /home/horecamasters/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 7 /home/horecamasters/public_html/wp-includes/plugin.php(565): WP_Hook->do_action() 8 /home/horecamasters/public_html/wp-includes/class-wp.php(418): do_action_ref_array() 9 /home/horecamasters/public_html/wp-includes/class-wp.php(813): WP->parse_request() 10 /home/horecamasters/public_html/wp-includes/functions.php(1336): WP->main() 11 /home/horecamasters/public_html/wp-blog-header.php(16): wp() 12 /home/horecamasters/public_html/index.php(17): require('/home/horecamas…') 13 {main}

thrown in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Database/Table.php on line 218
[03-Aug-2024 04:32:03 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SELECT COUNT() FROM wpd8_pressidium_cookie_consents WHERE id = '006a819b-60c2-4b1f-a027-3df29eb4cef4' made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->has_consent_record [03-Aug-2024 04:32:03 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SHOW FULL COLUMNS FROM wpd8_pressidium_cookie_consents made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->insert_consent_record, Pressidium\WP\CookieConsent\Database\Table->insert [03-Aug-2024 04:32:48 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SELECT COUNT() FROM wpd8_pressidium_cookie_consents WHERE id = '006a819b-60c2-4b1f-a027-3df29eb4cef4' made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->has_consent_record
[03-Aug-2024 04:32:48 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SHOW FULL COLUMNS FROM wpd8_pressidium_cookie_consents made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->insert_consent_record, Pressidium\WP\CookieConsent\Database\Table->insert
[03-Aug-2024 04:33:20 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SELECT COUNT(*) FROM wpd8_pressidium_cookie_consents made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->get_consent_records, Pressidium\WP\CookieConsent\Database\Table->get_total_number_of_rows
[03-Aug-2024 04:33:20 UTC] PHP Fatal error: Uncaught TypeError: Pressidium\WP\CookieConsent\Database\Table::get_total_number_of_rows(): Return value must be of type int, null returned in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Database/Table.php:218
Stack trace: 0 /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Admin/Settings/Settings_API.php(1067): Pressidium\WP\CookieConsent\Database\Table->get_total_number_of_rows() 1 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(1230): Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->get_consent_records() 2 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(1063): WP_REST_Server->respond_to_request() 3 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch() 4 /home/horecamasters/public_html/wp-includes/rest-api.php(420): WP_REST_Server->serve_request() 5 /home/horecamasters/public_html/wp-includes/class-wp-hook.php(324): rest_api_loaded() 6 /home/horecamasters/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 7 /home/horecamasters/public_html/wp-includes/plugin.php(565): WP_Hook->do_action() 8 /home/horecamasters/public_html/wp-includes/class-wp.php(418): do_action_ref_array() 9 /home/horecamasters/public_html/wp-includes/class-wp.php(813): WP->parse_request() 10 /home/horecamasters/public_html/wp-includes/functions.php(1336): WP->main() 11 /home/horecamasters/public_html/wp-blog-header.php(16): wp() 12 /home/horecamasters/public_html/index.php(17): require('/home/horecamas…') 13 {main}

thrown in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Database/Table.php on line 218
[03-Aug-2024 04:33:22 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SELECT COUNT() FROM wpd8_pressidium_cookie_consents WHERE id = 'ad1a1554-4790-4c9a-9db2-0587c6a79654' made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->has_consent_record [03-Aug-2024 04:33:22 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SHOW FULL COLUMNS FROM wpd8_pressidium_cookie_consents made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->insert_consent_record, Pressidium\WP\CookieConsent\Database\Table->insert [03-Aug-2024 04:35:11 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SELECT COUNT() FROM wpd8_pressidium_cookie_consents made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->get_consent_records, Pressidium\WP\CookieConsent\Database\Table->get_total_number_of_rows
[03-Aug-2024 04:35:11 UTC] PHP Fatal error: Uncaught TypeError: Pressidium\WP\CookieConsent\Database\Table::get_total_number_of_rows(): Return value must be of type int, null returned in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Database/Table.php:218
Stack trace: 0 /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Admin/Settings/Settings_API.php(1067): Pressidium\WP\CookieConsent\Database\Table->get_total_number_of_rows() 1 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(1230): Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->get_consent_records() 2 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(1063): WP_REST_Server->respond_to_request() 3 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch() 4 /home/horecamasters/public_html/wp-includes/rest-api.php(420): WP_REST_Server->serve_request() 5 /home/horecamasters/public_html/wp-includes/class-wp-hook.php(324): rest_api_loaded() 6 /home/horecamasters/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 7 /home/horecamasters/public_html/wp-includes/plugin.php(565): WP_Hook->do_action() 8 /home/horecamasters/public_html/wp-includes/class-wp.php(418): do_action_ref_array() 9 /home/horecamasters/public_html/wp-includes/class-wp.php(813): WP->parse_request() 10 /home/horecamasters/public_html/wp-includes/functions.php(1336): WP->main() 11 /home/horecamasters/public_html/wp-blog-header.php(16): wp() 12 /home/horecamasters/public_html/index.php(17): require('/home/horecamas…') 13 {main}

thrown in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Database/Table.php on line 218
[03-Aug-2024 04:35:22 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SELECT COUNT(*) FROM wpd8_pressidium_cookie_consents made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->get_consent_records, Pressidium\WP\CookieConsent\Database\Table->get_total_number_of_rows
[03-Aug-2024 04:35:22 UTC] PHP Fatal error: Uncaught TypeError: Pressidium\WP\CookieConsent\Database\Table::get_total_number_of_rows(): Return value must be of type int, null returned in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Database/Table.php:218
Stack trace: 0 /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Admin/Settings/Settings_API.php(1067): Pressidium\WP\CookieConsent\Database\Table->get_total_number_of_rows() 1 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(1230): Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->get_consent_records() 2 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(1063): WP_REST_Server->respond_to_request() 3 /home/horecamasters/public_html/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch() 4 /home/horecamasters/public_html/wp-includes/rest-api.php(420): WP_REST_Server->serve_request() 5 /home/horecamasters/public_html/wp-includes/class-wp-hook.php(324): rest_api_loaded() 6 /home/horecamasters/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 7 /home/horecamasters/public_html/wp-includes/plugin.php(565): WP_Hook->do_action() 8 /home/horecamasters/public_html/wp-includes/class-wp.php(418): do_action_ref_array() 9 /home/horecamasters/public_html/wp-includes/class-wp.php(813): WP->parse_request() 10 /home/horecamasters/public_html/wp-includes/functions.php(1336): WP->main() 11 /home/horecamasters/public_html/wp-blog-header.php(16): wp() 12 /home/horecamasters/public_html/index.php(17): require('/home/horecamas…') 13 {main}

thrown in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Database/Table.php on line 218
[03-Aug-2024 04:35:28 UTC] PHP Warning: Undefined array key "slug" in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Client/Cookie_Consent.php on line 201
[03-Aug-2024 04:35:28 UTC] PHP Warning: Undefined array key "family" in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Client/Cookie_Consent.php on line 202
[03-Aug-2024 04:35:32 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SELECT COUNT() FROM wpd8_pressidium_cookie_consents WHERE id = 'ad1a1554-4790-4c9a-9db2-0587c6a79654' made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->has_consent_record [03-Aug-2024 04:35:32 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SHOW FULL COLUMNS FROM wpd8_pressidium_cookie_consents made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->insert_consent_record, Pressidium\WP\CookieConsent\Database\Table->insert [03-Aug-2024 04:35:41 UTC] PHP Warning: Undefined array key "slug" in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Client/Cookie_Consent.php on line 201 [03-Aug-2024 04:35:41 UTC] PHP Warning: Undefined array key "family" in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Client/Cookie_Consent.php on line 202 [03-Aug-2024 04:36:10 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SELECT COUNT() FROM wpd8_pressidium_cookie_consents WHERE id = 'edac1231-e762-4961-83c9-34bdd6c833ef' made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->has_consent_record
[03-Aug-2024 04:36:10 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SHOW FULL COLUMNS FROM wpd8_pressidium_cookie_consents made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->insert_consent_record, Pressidium\WP\CookieConsent\Database\Table->insert
[03-Aug-2024 04:36:39 UTC] PHP Warning: Undefined array key "slug" in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Client/Cookie_Consent.php on line 201
[03-Aug-2024 04:36:39 UTC] PHP Warning: Undefined array key "family" in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Client/Cookie_Consent.php on line 202
[03-Aug-2024 04:36:42 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SELECT COUNT(*) FROM wpd8_pressidium_cookie_consents WHERE id = 'edac1231-e762-4961-83c9-34bdd6c833ef' made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->has_consent_record
[03-Aug-2024 04:36:42 UTC] WordPress database error Table 'horecamasters_w488.wpd8_pressidium_cookie_consents' doesn't exist for query SHOW FULL COLUMNS FROM wpd8_pressidium_cookie_consents made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Pressidium\WP\CookieConsent\Admin\Settings\Settings_API->update_consent, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->set_consent_record, Pressidium\WP\CookieConsent\Database\Tables\Consents_Table->insert_consent_record, Pressidium\WP\CookieConsent\Database\Table->insert
[03-Aug-2024 04:36:53 UTC] PHP Warning: Undefined array key "slug" in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Client/Cookie_Consent.php on line 201
[03-Aug-2024 04:36:53 UTC] PHP Warning: Undefined array key "family" in /home/horecamasters/public_html/wp-content/plugins/pressidium-cookie-consent/includes/Client/Cookie_Consent.php on line 202

The key point is:

WordPress database error Specified key was too long; max key length is 1000 bytes for query CREATE TABLE wpd8_pressidium_cookie_consents

So, our custom pressidium_cookie_consents table was not created at all.

MyISAM tables have a maximum key length of 1000 bytes, which suggests that this configuration might be using the MyISAM storage engine instead of InnoDB.

We’ll most likely be able to fix that by adjusting our VARCHAR columns to use more sensible values, instead of blindly using VARCHAR(255)

Adding database-specific information in the “Logs” tab could also be helpful.

over-engineer commented 1 month ago
Specified key was too long; max key length is 1000 bytes

I managed to reproduce this issue by using MariaDB 10.3.39 with the MyISAM storage engine.

It appears that updating the CREATE TABLE query to use more sensible values for its VARCHAR columns has fixed the issue.

Column Previous value New value
id 255 40
geo_location 255 8
ip_address 255 40

We’ve included this fix in the recent 1.5.1 release.

Closing as resolved.