Plugin activation gotcha…
-
UpdraftCentral version: 0.5.1
WP/4.7.3 PHP/7.0.16 MySQL/5.5.5 Curl/7.29.0
(MariaDB 10.1.21)Installed and activated UpdraftCentral Dashboard with no visible problems. Went to add a site and got:
Error: Table 'dbname.wp_updraftcentral_sites' doesn't exist
Checked apache error logs and found:
WordPress database error Index column size too large. The maximum column size is 767 bytes. for query CREATE TABLE wp_updraftcentral_sites
Quick duckduckgo search found:
MySQL error: The maximum column size is 767 bytes
(stackoverflow, yes, I know, but it had the answer…)So looking at updraftcentral/classes/activation.php(69) I found the table creation query. I suspect the issue is the index on the url field (based on what I see you have done with the sitemeta table below that).
So since I have the following set in my my.cnf.d includes:
innodb_file_format=Barracuda innodb_file_per_table=1 innodb_large_prefix=1 character_set_server=utf8mb4 collation_server=utf8mb4_unicode_ci
The quick-and-dirty solution for me was to manually create the table and specify the InnoDB Row Format as DYNAMIC. Though I suspect that limiting the url index size for the sites table as you have done for the sitemeta table would probably do the trick too.
So I just manually created the table for my environment like so:
CREATE TABLE wp_updraftcentral_sites ( site_id bigint(20) NOT NULL auto_increment, user_id bigint(20) NOT NULL, url varchar(300) NOT NULL, admin_url varchar(300), key_local_private blob, key_remote_public blob, key_name_indicator varchar(200) NOT NULL, description text, sequence_id bigint(20) DEFAULT 0, remote_user_id bigint(20) NOT NULL, remote_user_login varchar(60), remote_site_id bigint(20) DEFAULT 0, connection_method varchar(30), send_cors_headers tinyint(1) DEFAULT 1, PRIMARY KEY (site_id), KEY user_id (user_id), KEY url (url) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
P.S. Sorry about back in the fall, but things are going well for me in my own ventures so far. ??
- The topic ‘Plugin activation gotcha…’ is closed to new replies.