Closed laryn closed 8 years ago
@laryn can you check your database and see if a SparkPost row was created in the table "civicrm_mailing_bounce_type" after you installed the extension?
@mark-rodgers The extension is not listed as installed when I go back to the extensions page after the crash/error, but it looks like it tried to create that row twice, without the name being entered (NB: I tried to install the extension twice):
@laryn Can you try executing this query manually using the SQL tab in PHPMyAdmin and seeing if you get an error?
EDIT: GitHub removed the backticks, so I linked a txt file with the query you want to run, you can try it with and without the backticks and see if either work. Also we're spinning up a VM with SQL 5.6 right now so we can test.
Same result with and without backticks.
@mark-rodgers
I was poking around in the structure of this table and found something strange. The 'name' column is listed as type="ENUM" and length/values as "'AOL','Away','DNS','Host','Inactive','Invalid','Loop','Quota','Relay','Spam','Syntax','Unknown'".
When I look at my other server/database that value is type="Varchar(24)"
Maybe this is just a strange error on this particular database, and not due to MySQL 5.6?
what version of civi?
@joseltorres It is 4.6.14, but has been upgraded for years from older versions. Perhaps there was a change to this table that failed somewhere along the way and never got picked up?
I see this particular value in older versions of Civi so that will be my assumption. I am going to try manually updating this field and see if it installs correctly.
@mark-rodgers @joseltorres
Bingo. Not sure when that was supposed to have changed to a varchar but I deleted all the attempted inserts, changed it to Varchar(24), and tried reinstalling through the GUI. Worked as expected.
Thanks so much for the help and sorry for the false trail on MySQL 4.6!
@laryn If I recall correctly in CiviCRM 4.5, this is when they changed it from an ENUM to a VARCHAR. Not sure why the field would be an enum on your 4.6.14 database, perhaps something failed along the way like you said.
issue: https://issues.civicrm.org/jira/browse/CRM-15558
solution: ALTER TABLE civicrm_mailing_bounce_type CHANGE name name VARCHAR( 24 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'Type of bounce';
EDIT: glad you got it cleared up
I just checked, and my system also still had the "enum" field type, and I'm also at Joomla 4.6.14. Don't know if it would be easy for your installation to automatically run this check/fix, but it might save some hassles for people when your extension starts to pick up momentum! Thanks for posting the SQL solution statement!
Thanks for the input. I will definitely add a check/fix for this soon.
Now checking for this issue and fixing in 1.2. https://github.com/proexchange/com.pesc.sparkpost/releases/tag/1.2
I tried installing on a server that had recently been updated to MySQL 5.6 and it crashes with the following in the log: