Support » Plugin: UpdraftCentral Dashboard » 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. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • Also, it appears that added site are specific/visible only to the single user that added them. Is that intended?

    Plugin Author David Anderson

    (@davidanderson)

    Hi,

    Thanks for the report. I’ve taken the index off the “URL” field when creating the table on new installs now, as I think that must be the one overflowing.

    Also, it appears that added site are specific/visible only to the single user that added them. Is that intended?

    Yes – each user can have their own list. We are also working on a solution for people who prefer to share them, as that has been requested a few times.

    David

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin activation gotcha…’ is closed to new replies.