Forums › Forums › Search & Filter Pro › Can't create tables
- This topic has 5 replies, 3 voices, and was last updated 6 years, 4 months ago by Trevor.
-
Anonymous(Private) November 13, 2017 at 7:15 pm #141708
I can’t seem to create the tables. This is the error I’m getting:
WordPress databasefout: [Index column size too large. The maximum column size is 767 bytes.] CREATE TABLE wp_search_filter_cache ( id bigint(20) NOT NULL AUTO_INCREMENT, post_id bigint(20) NOT NULL, post_parent_id bigint(20) NOT NULL, field_name varchar(255) NOT NULL, field_value varchar(255) NOT NULL, field_value_num bigint(20) NULL, field_parent_num bigint(20) NULL, term_parent_id bigint(20) NULL, PRIMARY KEY (id), KEY field_name_index (field_name), KEY field_value_index (field_value), KEY field_value_num_index (field_value_num) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci WordPress databasefout: [Index column size too large. The maximum column size is 767 bytes.] CREATE TABLE wp_search_filter_term_results ( id bigint(20) NOT NULL AUTO_INCREMENT, field_name varchar(255) NOT NULL, field_value varchar(255) NOT NULL, field_value_num bigint(20) NULL, result_ids text NOT NULL, PRIMARY KEY (id), KEY field_name_index (field_name), KEY field_value_index (field_value), KEY field_value_num_index (field_value) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
Trevor(Private) November 14, 2017 at 11:52 am #141841Hi
At what point did this happen for you? When you installed the plugin, or …
This thread might be an indicator of the issue (and maybe the suggestions might help fix it):
https://stackoverflow.com/questions/30761867/mysql-error-the-maximum-column-size-is-767-bytes
It seems like a database configuration issue, which might mean you need to talk with your host.
Anonymous(Private) August 21, 2018 at 1:58 pm #186104I ran into this same issue with Pantheon as my host. Of course they are absolutely not going to change their database settings for one site so I had to seek a different solution.
The only way I could solve this was to change how those two tables are created by adjusting the size of the
VARCHAR
in theCREATE TABLE
from255
to191
. The odds that the data in those fields is that big are pretty slim.Of course it is not ideal to edit the plugin’s code so I am wondering if there is a better way to resolve this?
The lines where that change was made are:
/search-filter/admin/class-search-filter-admin.php
lines 1069-1070, 1092-1093
/search-filter/includes/class-search-filter-activator.php
lines 83-84, 106-107 -
AuthorPosts