Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Can't create tables

Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Naomi van Dorst
    #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 Moderator
    #141841

    Hi

    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.

    Gabriel S Smith
    #186104

    I 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 the CREATE TABLE from 255 to 191. 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

    Trevor Moderator
    #186114

    Are they using MySQL or MariaDB? If they are running MySQL, do they offer the option of running MariaDB (which is what I always use)?

    Gabriel S Smith
    #186116

    They are running MariaDB for all of their hosted sites and we cannot change it. They do not allow changing the configurations of the databases.

    Trevor Moderator
    #186122

    Odd, but it is what it is. Thanks for letting us know.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Can't create tables’ is closed to new replies.