Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when installing #260

Closed
thienhaxanh2405 opened this issue Mar 22, 2016 · 37 comments
Closed

Error when installing #260

thienhaxanh2405 opened this issue Mar 22, 2016 · 37 comments
Assignees
Milestone

Comments

@thienhaxanh2405
Copy link

I've installed this on a site of my WPMU network, but catch a fatal error.
This's through message:

Fatal error: Uncaught exception 'Exception' with message 'DB table creation failure. Table: ig_32_comment_mail_queue_event_log. SQL: CREATE TABLE IF NOT EXISTSig_32_comment_mail_queue_event_log(IDbigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',queue_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.',dby_queue_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Digested by queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.',sub_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Subscription ID from the subs table; at the time of the event. The subscription may or may not still exist.',user_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'User ID from the wp_users table; at the time of the event, if applicable. The user may or may not still exist.',post_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Post in /....../wp-content/plugins/comment-mail-pro/includes/classes/installer.php on line 62

Please check out and guide me to install again.
Thank you.

@jaswrks
Copy link

jaswrks commented Mar 23, 2016

@thienhaxanh2405 Thanks for reporting. What version of PHP, MySQL, and WordPress are you running please. Thanks in advance for those necessary details! :-)

@thienhaxanh2405
Copy link
Author

@jaswsinc my server's runing:
nginx 1.6.3
PHP 5.4.15
MySQL 5.5.44
Wordpress 4.4.1

@jaswrks
Copy link

jaswrks commented Mar 24, 2016

Thanks! Those all look adequate. We have tested Comment Mail tables going back as far as MySQL 5.1, and your version of PHP and WordPress look good also.

Can you trying adding define( 'WP_DEBUG', true ); to your /wp-config.php file and test this again for me? I'm hoping that will give you more details about what is causing that DB table creation error on your installation specifically. See also: https://codex.wordpress.org/Debugging_in_WordPress

If running in debug mode doesn't give you any more information, please write me back and we can try sending you a slightly modified copy that will log some additional details for us to review with you.

@thienhaxanh2405
Copy link
Author

I've turned on debug mode, and, unfortunately, still exception message

Fatal error: Uncaught exception 'Exception' with message 'DB table creation failure. Table: ig_11_comment_mail_queue_event_log. SQL: CREATE TABLE IF NOT EXISTSig_11_comment_mail_queue_event_log(IDbigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',queue_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.',dby_queue_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Digested by queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.',sub_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Subscription ID from the subs table; at the time of the event. The subscription may or may not still exist.',user_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'User ID from the wp_users table; at the time of the event, if applicable. The user may or may not still exist.',post_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Post in /..../wp-content/plugins/comment-mail-pro/includes/classes/installer.php on line 62

@PanNovak
Copy link

Hi folks, I got the same error while trying to activate your premium plugin.

Comment Mail Pro 160213
MySQL Database Server Version: 5.6.21
MySQL Client Version: mysqlnd 5.0.11-dev - 20120503
PHP Version: 5.5.19-pl0-gentoo

Fatal error: Uncaught exception 'Exception' with message 'DB table creation failure. Table: wp_comment_mail_queue_event_log. SQL: CREATE TABLE IF NOT EXISTSwp_comment_mail_queue_event_log(IDbigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',queue_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.',dby_queue_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Digested by queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.',sub_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Subscription ID from the subs table; at the time of the event. The subscription may or may not still exist.',user_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'User ID from the wp_users table; at the time of the event, if applicable. The user may or may not still exist.',post_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Post ID fr in /mnt/data/accounts..../wp-content/plugins/comment-mail-pro/includes/classes/installer.php on line 56

Thanks :-)

I dont understand PHP and MySQL, but it makes me feel that it tries to write into .sql file in the file directory instead of writing into Wordpress database.

@jaswrks
Copy link

jaswrks commented Mar 24, 2016

@thienhaxanh2405 Here is a copy of the installer.php file that has been modified to print the specific MySQL error that occurs. If you can download the file and upload via FTP, letting this override your existing copy of comment-mail/includes/classes/installer.php, perhaps it will shed light.

https://gist.github.com/jaswsinc/761812edb592733bc3a9

@thienhaxanh2405
Copy link
Author

@jaswsinc sorry, no more information yet :(. I've tried, die after $this->plugin->utils_db->wp->print_error(); - line 62, but nothing prints out.
I think about plugins confliction, and Deactivate all, but your plugin still doesn't work.

@thienhaxanh2405
Copy link
Author

oh, sorry, I'm running Comment Mail Pro, version 160213. I forgot to mention you about my version.

@jaswrks
Copy link

jaswrks commented Mar 24, 2016

but nothing prints out.

I updated the Gist to include show_errors() as well.
https://gist.github.com/jaswsinc/761812edb592733bc3a9

If that still doesn't do the trick, you can try adding this line to your wp-config.php file also.

define( 'DIEONDBERROR', true );

@thienhaxanh2405
Copy link
Author

I updated installer.php. It doesn't do the trick :)
And, here it is, message after added define( 'DIEONDBERROR', true );

WordPress database error: [] CREATE TABLE IF NOT EXISTS ig_11_comment_mail_queue_event_log ( ID bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.', queue_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.', dby_queue_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Digested by queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.', sub_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Subscription ID from the subs table; at the time of the event. The subscription may or may not still exist.', user_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'User ID from the wp_users table; at the time of the event, if applicable. The user may or may not still exist.', post_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Post ID from the wp_posts table; at the time of the event. The post may or may not still exist.', comment_parent_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Comment parent ID from the wp_comments table; at the time of the event, if applicable. The comment may or may not still exist.', comment_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Comment ID from the wp_comments table; at the time of the event, if applicable. The comment may or may not still exist.', fname varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber first name; at the time of the event.', lname varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber last name; at the time of the event.', email varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber email address; at the time of the event.', ip varchar(39) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber IP address; at the time of the event.', region varchar(2) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Geographic region; at the time of the event.', country varchar(2) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Geographic country; at the time of the event.', status enum('','unconfirmed','subscribed','suspended','trashed') COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Subscription status; at the time of the event.', event enum('invalidated', 'notified') COLLATE utf8_unicode_ci NOT NULL COMMENT 'Event type.', note_code varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Optional note during processing.', time int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Event time. Unix timestamp.', PRIMARY KEY (ID), FULLTEXT KEY fulltext_search (fname,lname,email,ip) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

@jaswrks
Copy link

jaswrks commented Mar 24, 2016

@thienhaxanh2405 Thank you very much. Unfortunately, that doesn't tell us why the DB table creation failed; i.e., the output only shows the SQL that was attempted, which is working in our tests. So what I was looking for is why this is failing on your side exactly, so that we can try to work around a potential compatibility issue that may exist.

@PanNovak Is it possible for you to run the same experiment please?
See: #260 (comment)


It may also help to review your MySQL error log, if you have access to it.

@PanNovak
Copy link

@jaswsinc

I run the same experiment and got this:

WordPress database error: [Unknown storage engine 'InnoDB']
CREATE TABLE IF NOT EXISTS wp_comment_mail_queue_event_log ( ID bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.', queue_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.', dby_queue_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Digested by queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.', sub_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Subscription ID from the subs table; at the time of the event. The subscription may or may not still exist.', user_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'User ID from the wp_users table; at the time of the event, if applicable. The user may or may not still exist.', post_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Post ID from the wp_posts table; at the time of the event. The post may or may not still exist.', comment_parent_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Comment parent ID from the wp_comments table; at the time of the event, if applicable. The comment may or may not still exist.', comment_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Comment ID from the wp_comments table; at the time of the event, if applicable. The comment may or may not still exist.', fname varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber first name; at the time of the event.', lname varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber last name; at the time of the event.', email varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber email address; at the time of the event.', ip varchar(39) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber IP address; at the time of the event.', region varchar(2) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Geographic region; at the time of the event.', country varchar(2) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Geographic country; at the time of the event.', status enum('','unconfirmed','subscribed','suspended','trashed') COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Subscription status; at the time of the event.', event enum('invalidated', 'notified') COLLATE utf8_unicode_ci NOT NULL COMMENT 'Event type.', note_code varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Optional note during processing.', time int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Event time. Unix timestamp.', PRIMARY KEY (ID), FULLTEXT KEY fulltext_search (fname,lname,email,ip) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

WordPress database error: [Unknown storage engine 'InnoDB']
CREATE TABLE IF NOT EXISTS wp_comment_mail_queue_event_log ( ID bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.', queue_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.', dby_queue_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Digested by queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.', sub_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Subscription ID from the subs table; at the time of the event. The subscription may or may not still exist.', user_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'User ID from the wp_users table; at the time of the event, if applicable. The user may or may not still exist.', post_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Post ID from the wp_posts table; at the time of the event. The post may or may not still exist.', comment_parent_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Comment parent ID from the wp_comments table; at the time of the event, if applicable. The comment may or may not still exist.', comment_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Comment ID from the wp_comments table; at the time of the event, if applicable. The comment may or may not still exist.', fname varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber first name; at the time of the event.', lname varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber last name; at the time of the event.', email varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber email address; at the time of the event.', ip varchar(39) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber IP address; at the time of the event.', region varchar(2) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Geographic region; at the time of the event.', country varchar(2) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Geographic country; at the time of the event.', status enum('','unconfirmed','subscribed','suspended','trashed') COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Subscription status; at the time of the event.', event enum('invalidated', 'notified') COLLATE utf8_unicode_ci NOT NULL COMMENT 'Event type.', note_code varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Optional note during processing.', time int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Event time. Unix timestamp.', PRIMARY KEY (ID), FULLTEXT KEY fulltext_search (fname,lname,email,ip) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

Fatal error: Uncaught exception 'Exception' with message 'DB table creation failure. Table: wp_comment_mail_queue_event_log. SQL: CREATE TABLE IF NOT EXISTSwp_comment_mail_queue_event_log(IDbigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',queue_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.',dby_queue_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Digested by queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.',sub_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Subscription ID from the subs table; at the time of the event. The subscription may or may not still exist.',user_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'User ID from the wp_users table; at the time of the event, if applicable. The user may or may not still exist.',post_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Post ID fr in /mnt/data/accounts/p/mydomain.com/wp-content/plugins/comment-mail-pro/includes/classes/installer.php on line 65


Unknown storage engine 'InnoDB' -> this is weird, i don't use MySql5 InnoDB, I use just MySql5.

I can't find/access db logs now, we'll try to find them later. I've got to go now. :-)

@jaswrks
Copy link

jaswrks commented Mar 25, 2016

@PanNovak writes...

WordPress database error: [Unknown storage engine 'InnoDB']

Thank you. So it looks like you may have a problem with the MySQL installation on that server. The InnoDB storage engine for MySQL has been available since at least MySQL v5.1, and as of MySQL v5.5+, it became the default storage engine for MySQL installations, because it is better, which is also why Comment Mail uses the InnoDB storage engine.

My suggestion is that you contact your host to find out what is wrong with InnoDB storage engine on this server. Most likely there is an issue with the my.cnf file and they can probably correct this for you. WordPress itself will simply use the MyISAM storage engine, but many plugins (including Comment Mail) will prefer to use InnoDB if your version of MySQL supports it. Yours does, but it appears to be broken in some way.

If you find that your hosting company does not support InnoDB at all (that would be quite unusual), then please write back and we can provide you with instructions that will allow you to change the engine. You will sacrifice a little functionality in return for downgrading to an older storage engine, but we will get it working for you one way or the other.

@jaswrks
Copy link

jaswrks commented Mar 25, 2016

@thienhaxanh2405
Copy link
Author

@jaswsinc Look at my error message:

ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

Something wrong here? InnoDB is my default, every table was set InnoDB but yours, The table _comment_mail_queue_event_log did create (I have no idea why only this table's created) and it's set MyISAM

@jaswrks
Copy link

jaswrks commented Mar 25, 2016

@thienhaxanh2405 writes...

Something wrong here?

The issue that you're having seems to be a little bit different, and one reason for this is that your server is running MySQL 5.5.44, whereas @PanNovak is running 5.6.21. Whenever Comment Mail detects that you are running < 5.6, it must use the MyISAM engine instead, because Comment Mail DB tables use FULLTEXT indexes, which are not supported by the InnoDB engine until MySQL v5.6.

I haven't been able to pinpoint the exact problem on your server just yet. The last error report that you sent over just shows WordPress database error: []. It doesn't provide the underlying error message that may shed light on what is really going on.

If you have the ability to upgrade to MySQL 5.6 or higher, you might give that a shot. Otherwise, I'm afraid I'll need to see the underlying error message to know what steps to take next.

@jaswrks
Copy link

jaswrks commented Mar 25, 2016

@thienhaxanh2405 writes...

The table _comment_mail_queue_event_log did create (I have no idea why only this table's created) and it's set MyISAM

Hmm. That's interesting, and it correlates with the fact that no error message is produced at all; i.e, it suggests there is not an error, and yet WordPress is reporting that there was an error.

Would it be possible for you to send over a private Dashboard login for this site for me? If so, please submit that here and I will take a closer look for you and run diagnostics. http://bit.ly/1WNqron

@PanNovak
Copy link

Yee--haw! I fixed Innodb and it works now, thank you! :-)

@thienhaxanh2405
Copy link
Author

@jaswsinc how's your investigation?
On my local, running XAMPP v3.2.2

Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.14
Database client version: libmysql - mysqlnd 5.0.11-dev - 20120503
PHP extension: mysqli Documentation
PHP version: 5.6.14

Everything is okay. But a strange thing, the table comment_mail_queue is set InnoDB.
untitled

@jaswrks
Copy link

jaswrks commented Mar 27, 2016

Hmm. Well, InnoDB is better if your server supports it. There seems to be a conflict between what you're showing in that last output though (i.e., the MySQL version) and what WordPress is telling Comment Mail. In short, in order for Comment Mail to install InnoDB tables, you will need MySQL v5.6.4+.

See: https://github.com/websharks/comment-mail-pro/blob/000000-dev/src/includes/classes/UtilsDb.php#L157-L160

@thienhaxanh2405
Copy link
Author

@jaswsinc I've updated mysql to 5.6.28 and still catch this error. Please keep researching :(

@thienhaxanh2405
Copy link
Author

@jaswsinc @raamdev Are you still following this issue?

@jaswrks
Copy link

jaswrks commented Apr 20, 2016

@thienhaxanh2405 writes...

I've updated mysql to 5.6.28 and still catch this error

Cool. Can you paste the most recent error message you received after upgrading and share your general feeling about the problem as it exists now after the update? Happy to review.

@jaswrks jaswrks closed this as completed Apr 20, 2016
@jaswrks jaswrks reopened this Apr 20, 2016
@thienhaxanh2405
Copy link
Author

@jaswsinc

Fatal error: Uncaught exception 'Exception' with message 'DB table creation failure. Table: ig_82_comment_mail_queue_event_log. SQL: CREATE TABLE IF NOT EXISTSig_82_comment_mail_queue_event_log(IDbigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',queue_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.',dby_queue_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Digested by queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.',sub_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Subscription ID from the subs table; at the time of the event. The subscription may or may not still exist.',user_idbigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'User ID from the wp_users table; at the time of the event, if applicable. The user may or may not still exist.',post_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Post in /..../wp-content/plugins/comment-mail-pro/includes/classes/installer.php on line 63

Opp, I forgot to remind to you, I run 2 server.

  1. MySQL server:
    Ubuntu 14.04.3
    MySQL 5.6.28
  2. Web Server
    CentOS 7.2
    Nginx 1.6.3
    PHP 5.6.20

@jaswrks
Copy link

jaswrks commented Apr 20, 2016

@thienhaxanh2405 Thank you. Was that test run with this alternate file that includes the additional error/debugging info as well? https://gist.github.com/jaswsinc/761812edb592733bc3a9

I ask again, because for some reason I'm not seeing any MySQL-specific error information in your last report like I did when @PanNovak ran tests, so it is hard to know for sure what the underlying cause is by just looking at the Exception itself.

For instance, in the other report here we noticed that MySQL complained and said:

WordPress database error: [Unknown storage engine 'InnoDB']

If you can find a way to produce that additional error info it might help. This alternate file that I posted before did the trick for @PanNovak. See: https://gist.github.com/jaswsinc/761812edb592733bc3a9

@thienhaxanh2405
Copy link
Author

@jaswsinc I do run above file, and turn DIEONDBERROR on and this is the message

WordPress database error: [] CREATE TABLE IF NOT EXISTS ig_82_comment_mail_queue_event_log ( ID bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.', queue_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.', dby_queue_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Digested by queue entry ID from the queue table; at the time of the event. The entry may or may not still exist.', sub_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Subscription ID from the subs table; at the time of the event. The subscription may or may not still exist.', user_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'User ID from the wp_users table; at the time of the event, if applicable. The user may or may not still exist.', post_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Post ID from the wp_posts table; at the time of the event. The post may or may not still exist.', comment_parent_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Comment parent ID from the wp_comments table; at the time of the event, if applicable. The comment may or may not still exist.', comment_id bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Comment ID from the wp_comments table; at the time of the event, if applicable. The comment may or may not still exist.', fname varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber first name; at the time of the event.', lname varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber last name; at the time of the event.', email varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber email address; at the time of the event.', ip varchar(39) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Subscriber IP address; at the time of the event.', region varchar(2) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Geographic region; at the time of the event.', country varchar(2) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Geographic country; at the time of the event.', status enum('','unconfirmed','subscribed','suspended','trashed') COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Subscription status; at the time of the event.', event enum('invalidated', 'notified') COLLATE utf8_unicode_ci NOT NULL COMMENT 'Event type.', note_code varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Optional note during processing.', time int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Event time. Unix timestamp.', PRIMARY KEY (ID), FULLTEXT KEY fulltext_search (fname,lname,email,ip) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

@thienhaxanh2405
Copy link
Author

@jaswsinc have no idea why my system do not print out type of error. Do i miss a thing?
:(

@jaswrks
Copy link

jaswrks commented Apr 20, 2016

I see. Yes, strange. Can you please post a link that leads to a phpinfo(); output display for me? I'd like to see which MySQL extensions and library you're running with please.

Create this file somewhere on the site:

<?php
phpinfo();

Then link me to that; e.g., http://yoursite.com/phpinfo.php

@thienhaxanh2405
Copy link
Author

My php info, https://igroupblog.com/info.php
Please confirm that you read it, I gonna delete it immediately after you read :)

@jaswrks
Copy link

jaswrks commented Apr 22, 2016

@thienhaxanh2405 Got it. Thank you. I'm reviewing now.

@jaswrks
Copy link

jaswrks commented Apr 22, 2016

@thienhaxanh2405 writes...

I do run above file, and turn DIEONDBERROR on and this is the message
WordPress database error: []

I see. Yep, that's the same thing we saw before. It's an error, but MySQL reports nothing; i.e., []. I'm reviewing your PHP config now because I can't seem to reproduce this otherwise.

@jaswrks
Copy link

jaswrks commented Apr 22, 2016

@thienhaxanh2405 I think I may have found the issue. If you can try this patched copy of the file and report back that would be great :-) This copy excludes the debugging routines, and only tries to correct the problem that you reported.

@jaswrks
Copy link

jaswrks commented Apr 22, 2016

@kristineds Here is an outline of what I did, in case you'd like to work on a more formal PR and review process, we can merge this into the official copy of the software.

  • This line should be replaced with:

    if ($this->plugin->utils_db->wp->query($_sql) === false) { // Table creation failure?
    
  • We should also do a search for other instances like this that might need to be updated also; i.e., search for !$this->plugin->utils_db->wp->query and review those. In most cases, we should be looking for a false return value, because a 0 return value will be falsy too, and yet not actually a failure. We need to look for false (boolean) explicitly to avoid this sort of problem.

Referencing: https://developer.wordpress.org/reference/classes/wpdb/query/

@thienhaxanh2405
Copy link
Author

@jaswsinc Great, it wokrs, ha ha 👍
And one more thing, please update your source and I'll update your official.
Thank you.

@jaswrks
Copy link

jaswrks commented Apr 22, 2016

@thienhaxanh2405 Awesome! Will do.

@raamdev
Copy link
Contributor

raamdev commented Apr 26, 2016

Next Release Changelog:

@raamdev raamdev closed this as completed Apr 26, 2016
raamdev added a commit that referenced this issue Jun 18, 2016
- **Restructured Codebase**: The codebase has been completely restructured to improve performance, enhance flexibility, and make it easier to build in new features! Props @jaswsinc. See [Issue #150](#150).
- **Comment Mail Pro Upgrade Notice: Incompatible Advanced Templates.** This version of Comment Mail includes a rewritten and improved codebase. This rewrite, however, came with the unfortunate side effect of breaking backwards compatibility with Advanced Templates that were customized in a previous version of Comment Mail Pro.

     If you are currently using Comment Mail Pro and you've customized your Advanced Templates, all of your customized Advanced Templates will be backed up and the templates will then be reset to their new defaults. You will find the backup of your old customized template appended to the bottom of the new template, separated with a  <code>Legacy Template Backup</code> PHP comment. See [example screenshots](#238 (comment)).

     Note: This change has no effect on Simple templates—only Advanced Templates are affected. Advanced Templates are a Pro-only feature, so this notice only applies to Comment Mail Pro. See [Issue #238](#238).
- **Bug Fix**: Fixed a bug where `esc_html()` was being used where `esc_sql()` should've been used. Props @jaswsinc @kristineds. See [Issue #268](#268).
- **Bug Fix**: Fixed a bug that in some scenarios resulted in a "DB table creation failure" error when activating the plugin. Props @thienhaxanh2405, @PanNovak, @kristineds, and @jaswsinc. See [Issue #260](#260).
- **Bug Fix**: Fixed a bug where "New reply" notification emails were not being parsed properly by some Hotmail accounts and were showing up as blank. Props @kristineds. See [Issue #259](#259).
- **Bug Fix**: Fixed a bug that allowed spam comments to create subscriptions in Comment Mail when using Akismet. Props @IvanRF. See [Issue #250](#250).
- **Bug Fix** (Pro): When Chrome or Firefox Autofill Username/Password was enabled, the Comment Mail Pro Updater fields would incorrectly be autofilled by the browser with invalid credentials. This has been fixed. Props @renzms. [Issue #274](#274).
- **Bug Fix**: Fixed a bug where the cron job for the Queue Processor could get deleted and never recreated, which would result in notifications getting stuck in the Mail Queue and not being sent out. If you ever installed Comment Mail and then deleted it (without first disabling Data Safeguards), and then installed Comment Mail again, you were probably affected by this issue. This release fixes the issue and makes the cron setup more robust. Props @kristineds, @renzms, @jaswsinc, and @IvanRF for help testing. See [Issue #194](#194) and [Issue #173](#173).
- **Bug Fix:** Fixed a bug where a subscriber who selected Hourly Digest and who had never been notified before could, in some scenarios, have their subscription treated instead as a Weekly Digest. This bug was found and fixed during the codebase restructuring. Props @jaswsinc. See [Issue #150](#150) and additional discussion in [Issue #173](#173 (comment)).
- **Bug Fix:** Fixed a bug where in some scenarios Mail Queue entries for Digest Notifications that should have been held for sending later were not being held and were also not being sent. They also would not have shown up in the Mail Queue Event Log. This bug was found and fixed during the codebase restructuring. Props @jaswsinc. See [Issue #150](#150) and additional discussion in [Issue #173](#173 (comment)).
- **Enhancement**: Minor improvements to the Options Page menu links and positioning of the Pro Preview link. Props @renzms. See [Issue #227](#227).
- **Enhancement**: It's now possible to use the following shortcodes in the Email Footer Tag for Email Footer Templates: `[home_url]`, `[blog_name_clip]`, and `[current_host_path]`. Props @kristineds and @IvanRF. See [Issue #246](#246).
- **Enhancement**: Improved the Subscriptions meta box that appears on the Post Edit screen. For each subscription, the meta box now lists the full name and email address, the date the subscription was created, and a view link that allows you to view/edit the subscription. Props @kristineds. See [Issue #231](#231).
- **UX Enhancement (Pro)**: Improved the Dashboard notice that appears when you try to enable the Pro version of Comment Mail when the Lite version is currently enabled. Props @kristineds @jaswsinc. See [Issue #230](#230).
- **UX Enhancement**: When Subscribing Without Commenting, the Add New Subscription form now pre-populates the Name and Email address fields whenever possible. Props @kristineds. See [Issue #204](#204).
- **UI Enhancement**: Dashboard notices generated by Comment Mail now use the WordPress-style dismiss button to keep things consistent. Props @kristineds. See [Issue #193](#193).
@raamdev
Copy link
Contributor

raamdev commented Jun 19, 2016

Comment Mail v160618 has been released and includes changes from this GitHub Issue. See the v160618 announcement for further details.


This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#260).

@wpsharks wpsharks locked and limited conversation to collaborators Jun 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants