Error on Advanced AJAX Product Filters + Digitalocean MySQL v8
-
Hello
I use Digitalocean MySQL(Version 8) for installing wordpress and everything work fine. But after installing “Advanced AJAX Product Filters” I get the error:
[Unable to create or change a table without a primary key, when the system variable sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting.] CREATE TABLE wp_berocket_termmeta ( meta_id bigint(20) NOT NULL AUTO_INCREMENT, berocket_term_id bigint(20) NOT NULL default 0, meta_key varchar(255) DEFAULT NULL, meta_value longtext DEFAULT NULL, UNIQUE KEY meta_id (meta_id) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci
So for that error I change the “UNIQUE KEY” to “PRIMARY KEY” and run the query manually and create the table.
Now when I want to add filter by “Product Category” I get a new error:
[Table 'defaultdb.wp_braapf_term_taxonomy_hierarchical' doesn't exist] SELECT COUNT( DISTINCT wp_posts.ID ) as term_count, MAX(term_relationships.term_taxonomy_id) as term_count_id FROM wp_posts INNER JOIN (SELECT object_id,term_taxonomy.term_taxonomy_id as term_taxonomy_id, term_order FROM wp_term_relationships JOIN wp_braapf_term_taxonomy_hierarchical as term_taxonomy ON wp_term_relationships.term_taxonomy_id = term_taxonomy.term_taxonomy_child_id ) as term_relationships ON wp_posts.ID = term_relationships.object_id WHERE wp_posts.post_type IN ( 'product' ) AND wp_posts.post_status = 'publish' AND ( wp_posts.ID NOT IN ( SELECT object_id FROM wp_term_relationships WHERE term_taxonomy_id IN (12) ) ) AND term_relationships.term_taxonomy_id IN (27) GROUP BY term_relationships.term_taxonomy_id
So I check the plugin errors from “Account Key” menu and it’s look like some other tables doesn’t exists.
Errors list:Additional tables generation:
[query] => CREATE TABLE wp_braapf_variation_attributes ( post_id bigint(20) NOT NULL, taxonomy varchar(32) NOT NULL, INDEX post_id (post_id), INDEX taxonomy (taxonomy), UNIQUE uniqueid (post_id, taxonomy) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; [error] => Array ( [wp_braapf_variation_attributes] => Created table wp_braapf_variation_attributes ) [cron] => ENABLED
Additional tables generation:
[query] => CREATE TABLE wp_braapf_product_variation_attributes ( post_id bigint(20) NOT NULL, parent_id bigint(20) NOT NULL, meta_key varchar(32) NOT NULL, meta_value_id bigint(20) NOT NULL, INDEX post_id (post_id), INDEX meta_key (meta_key), INDEX meta_value_id (meta_value_id), UNIQUE uniqueid (post_id, meta_key, meta_value_id) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; [error] => Array ( [wp_braapf_product_variation_attributes] => Created table wp_braapf_product_variation_attributes ) [cron] => ENABLED
Additional tables generation:
[query] => SELECT MIN(wp_wc_product_meta_lookup.product_id) as min, MAX(wp_wc_product_meta_lookup.product_id) as max FROM wp_wc_product_meta_lookup [error] => stdClass Object ( [min] => 39 [max] => 39 ) [cron] => ENABLED
Additional tables generation:
[query] => CREATE TABLE wp_braapf_product_stock_status_parent ( post_id bigint(20) NOT NULL, parent_id bigint(20) NOT NULL, stock_status tinyint(2), PRIMARY KEY (post_id), INDEX stock_status (stock_status) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; [error] => Array ( [wp_braapf_product_stock_status_parent] => Created table wp_braapf_product_stock_status_parent ) [cron] => ENABLED
Additional tables generation:
[query] => CREATE TABLE wp_braapf_term_taxonomy_hierarchical ( term_taxonomy_id bigint(20) NOT NULL, term_id bigint(20) NOT NULL, term_taxonomy_child_id bigint(20) NOT NULL, term_child_id bigint(20) NOT NULL, taxonomy varchar(32) NOT NULL, INDEX term_taxonomy_id (term_taxonomy_id), INDEX term_taxonomy_child_id (term_taxonomy_child_id), INDEX child_parent_id (term_taxonomy_id, term_taxonomy_child_id), UNIQUE uniqueid (term_taxonomy_id, term_id, term_taxonomy_child_id, term_child_id) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; [error] => Array ( [wp_braapf_term_taxonomy_hierarchical] => Created table wp_braapf_term_taxonomy_hierarchical ) [cron] => ENABLED
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Error on Advanced AJAX Product Filters + Digitalocean MySQL v8’ is closed to new replies.