• Resolved WPBot

    (@wpbot)


    Hello,

    I just updated the plugin to version 2.0 and after going to Tools -> Debug Events I got the following error:

    Debug Events are Not Installed Correctly

    The database table was not installed correctly. Please contact plugin support to diagnose and fix the issue. Provide them the error message below:

    Unknown storage engine ‘InnoDB’

    My server has disabled InnoDB as a storage engine for performance reasons (a VPS with a low amount of RAM) and this was the main reason I moved from “WP Mail SMTP” to your plugin.

    I don’t particularly care about that debug events table but every page load in the admin area adds something like that in my php errors log and it drives me crazy (the other plugin had the same issue).

    [16-Feb-2023 06:21:15 UTC] WordPress database error Unknown storage engine 'InnoDB' for query CREATE TABLE IF NOT EXISTS wp_easywpsmtp_debug_events (
    		    id INT UNSIGNED NOT NULL AUTO_INCREMENT,
    		    content TEXT DEFAULT NULL,
    		    initiator TEXT DEFAULT NULL,
    		    event_type TINYINT UNSIGNED NOT NULL DEFAULT '0',
    		    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    		    PRIMARY KEY (id)
    		)
    		ENGINE='InnoDB'
    		DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; made by require_once('wp-admin/admin.php'), do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, EasyWPSMTP\Migrations\Migrations->init, EasyWPSMTP\Migrations\MigrationAbstract->init, EasyWPSMTP\Migrations\MigrationAbstract->validate_db, EasyWPSMTP\Migrations\MigrationAbstract->run, EasyWPSMTP\Admin\DebugEvents\Migration->migrate_to_1
    

    If this was just one site it would’ve been easy to just replace the plugin again and forget about it, but imagine how much of an annoyance that will be with tens of sites.

    I’m also pretty sure that I’m not the only one who doesn’t use InnoDB, so please figure out a way to fix this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Gregor Capuder

    (@capuderg)

    Hi @wpbot,

    thank you for reporting your issue.

    We use InnoDB, because that’s the default MySQL engine for MySQL versions newer than 5.5 (it was released 13 years ago).

    The easiest solution I could think of is to make a code change in our plugin. In this file src/Admin/DebugEvents/Migration.php, please change this line:

    ENGINE='InnoDB'

    To the engine that your DB supports and then reload the Easy WP SMTP plugin settings page. This should run the migration that is currently stuck because of the failing DB table creation. Once the table is created and the migration is done, you will no longer see the error and you will also be able to use the Debug Events feature.

    Any future plugin updates which will overwrite the code change, will not be important, since your site will already have that DB table and the migration has already ran.

    Debug Events logs email sending errors, so you’ll know if something is not working correctly on your site.

    Let me know if that resolves your issue.

    Have a nice day!

    Thread Starter WPBot

    (@wpbot)

    Hello,

    If changing that line is enough, then this means that there’s no specific reason for you to use InnoDB.
    And if there’s no specific reason to use it – please remove it from the plugin code, so MySQL can create the table with whatever engine is set as the default one just like most other plugins work (your plugin and “WP Mail SMTP” are the only ones I’ve ever had this issue with and over the years I’ve worked on hundreds of different WP installs where InnoDB is not available).

    As I’ve already mentioned – I have a lot of sites that use this plugin (most of which still haven’t been updated to 2.0) and editing them all is not exactly the most convenient solution, especially when this engine is not a requirement for the debug logs table to function.

    InnoDB might be the default engine but that doesn’t mean that everyone runs their server install with all the defaults. Even many shared hostings have it disabled in order to save RAM.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @wpbot,

    we use a specific DB engine, so that it’s consistent on each of our user’s site. Using different engines can cause certain issues or unexpected side-effects and we would like to avoid that.

    Thank you for your feedback and we’ll keep this in mind and try to come up with the best solution for future updates.

    Have a nice day!

    Thread Starter WPBot

    (@wpbot)

    Sorry, I’m not trying to be rude or anything, I know it’s a free plugin and I shouldn’t expect anything and I also can’t make you do anything, but you’re joking, right?

    If you were using InnoDB everywhere I wouldn’t have been able to install the plugin in the first place (I added it to a brand new site, I still have the pre-2.0 version everywhere else). I said in my first post that I updated to 2.0 only because I’ve been using it in many other sites and a new install and update from older version aren’t too different in this case (at least for me), so sorry for the slightly misleading information, but it still doesn’t change anything related to the problem.
    I just looked through src/Tasks/Meta.php and there was no mention of InnoDB in the create_table() function located there (and if there was my topic would’ve been completely different).

    What you’re also telling me is that you’re planning on making the plugin unavailable on many shared hosts for no particular reason (considering you’re not using any InnoDB specific code in the events table) and also that the authors of every other plugin out there are completely wrong for not specifying the table engine in their code (even though the engine doesn’t matter in 99% of the cases because they’re not using any engine specific queries)?

    Again, I’m not trying to be rude or anything, I’m just saying that not everyone out there has InnoDB enabled in their server config and you shouldn’t force it on people unless you actually use something specific to that engine.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem With Version 2.0’ is closed to new replies.