If helpful, this is from options on my dev site where this error happens:
[pum_ver] => 1.7.22
[_pum_installed_themes] => a:5:{i:0;s:8:"lightbox";i:1;s:15:"enterprise-blue";i:2;s:9:"hello-box";i:3;s:12:"cutting-edge";i:4;s:13:"framed-border";}
[pum_db_ver] => 8
[pum_total_open_count] => 381
[pum_ver_upgraded_from] => 1.7.21
[pum_reviews_installed_on] => 2017-03-10 16:54:51
[pum_initial_version] => 1.6.4
[pum_completed_upgrades] => a:2:{i:0;s:16:"core-v1_7-popups";i:1;s:18:"core-v1_7-settings";}
[pum_subscribers_db_version] => 2
[pum_version] => 1.7.21
I tweaked PUM_Abstract_Database::__construct() to test for the existence of the database table (not just stored version number), and it now attempts to create that table – which fails, revealing the underlying source of my problem with wp_pum_subscribers not being created:
WordPress database error: [Index column size too large. The maximum column size is 767 bytes.]
CREATE TABLE wp_pum_subscribers (
ID BIGINT(20) NOT NULL AUTO_INCREMENT,
email_hash VARCHAR(255) NOT NULL,
popup_id BIGINT(20) NOT NULL,
user_id BIGINT(20) NOT NULL,
email VARCHAR(255) NOT NULL,
name VARCHAR(255) NOT NULL,
fname VARCHAR(255) NOT NULL,
lname VARCHAR(255) NOT NULL,
values LONGTEXT NOT NULL,
uuid VARCHAR(255) NOT NULL,
consent VARCHAR(255) NOT NULL,
consent_args LONGTEXT NOT NULL,
created DATETIME NOT NULL,
PRIMARY KEY (ID),
KEY email (email),
KEY user_id (user_id),
KEY popup_id (popup_id),
KEY email_hash (email_hash)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
Mysql version is what comes on pantheon’s hosting, currently: mysqlnd 5.0.12-dev – 20150407
This same problem will happen not just for users of pantheon’s hosting, but a quick search indicates this will likely fail for everyone using utf8mb4 charset: https://stackoverflow.com/questions/42043205/how-to-fix-mysql-index-column-size-too-large-laravel-migrate#42043927
The test for table existence might be worth keeping, I’ll post my changes once I work through it all. Right now I’m getting more familiar with charset/collate issues, but it seems the correct solution might be to explicitly set utf8 for the email and email_hash columns.
-
This reply was modified 6 years, 10 months ago by
jnorell.
-
This reply was modified 6 years, 10 months ago by
jnorell.
-
This reply was modified 6 years, 10 months ago by
jnorell.
-
This reply was modified 6 years, 10 months ago by
jnorell.