• Resolved patrikx

    (@patrikx)


    Hello,

    after upgrading to version 1.8.0 I get:

    [Sat Feb 18 16:31:27.140890 2017] [:error] [pid 10323] [client 77.234.247.102:22971] WordPress database error Duplicate column name ‘error’ for query ALTER TABLE wp_wpml_mails ADD COLUMN error VARCHAR(400) NULL DEFAULT ” AFTER attachments; /* From [talentedteacherjobs.co.uk/wp-admin/admin-ajax.php] in [/nas/content/live/ttjobs/wp-content/plugins/wp-mail-logging/WPML_Plugin.php:124] */ made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), include_once(‘/plugins/wp-mail-logging/wp-mail-logging.php’), No3x\\WPML\\WPML_Init->init, No3x\\WPML\\WPML_Plugin->upgrade, referer:

Viewing 13 replies - 1 through 13 (of 13 total)
  • ngrudev

    (@ngrudev)

    I have the same issue

    No3x

    (@no3x)

    Hi,

    there are always installs this error occurs on updates. I have tested the upgrade on 3 WordPress installs with different plugin versions to 1.8.0 and everything worked fine. So I’m actually puzzled why this happens.

    Fortunately this is simple to fix:
    Quick fix: Deactivate then activate the plugin. (Make sure to enable cleanup in the settings). -> loss of logs
    Better fix: The schema looks fine but the plugin version was not updated to the actual version. Set the option WPML_installed_version to 1.8.0.
    Alternative fix: Drop the wpml table from the database.

    Closing due lack of feedback.

    Hi,

    I have updated the WP Mail Logging plugin to 1.8.1 but whatever I try I get the error in the Admin panel:

    There was at least one error while upgrading the database schema. Please report the following error: Duplicate column name ‘error’

    Also, on the Server the error I get in the log is:

    WordPress database error Duplicate column name ‘error’ for query ALTER TABLE wp_wpml_mails ADD COLUMN error VARCHAR(400) NULL DEFAULT ” AFTER attachments; made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), include_once(‘/plugins/wp-mail-logging/wp-mail-logging.php’), No3x\WPML\WPML_Init->init, No3x\WPML\WPML_Plugin->upgrade

    This error appears what looks like, every time a website page is loaded.

    Any suggestions on how to fix this?

    Hi @tecreasey

    just delete the error column with phpmyadmin. After this the upgrade should work.

    Thank you for getting back to me so quickly.

    I have done that. The column has been regenerated and the error is still there. Is there anything else you can suggest?

    Regards,

    Tom

    The simplest one is to delete the whole table. Is this acceptable to you?

    I have tried that and I have also tried removing all plugin files and uploading a fresh copy. The error still exists.

    Did you try to check the “cleanup” option in the plugin settings and then disable the plugin?

    Yes, I have tried that.

    The error just continues to return.

    Please make sure to delete all WPML_ prefixed options in the wp_options table. Before trying a “fresh install”.

    Okay, I tried that also but after a while, the error returned. It appears that in the database there is an option_name called ‘WPML_Plugin__version’ which keeps reverting back to an option_value of ‘1.4.2’.

    I have changed this manually, it fixes the issue, but then the error returns after a short period.

    Where would this version number come from?

    Do you have some kind of staging-WordPress or any other instance of WordPress using the the same database?

    Where would this version number come from?

    If you have changed this version number in the database manually it can only be set to 1.4.2 by a 1.4.2 version of the plugin.

    Please also check the version in the wp-mail-logging.php file. It should contain this highlighted version number like there: https://github.com/No3x/wp-mail-logging/blob/release/1.8.1/wp-mail-logging.php#L6

    • This reply was modified 7 years, 7 months ago by No3x.
    • This reply was modified 7 years, 7 months ago by No3x.
    • This reply was modified 7 years, 7 months ago by No3x.
    • This reply was modified 7 years, 7 months ago by No3x.
    • This reply was modified 7 years, 7 months ago by No3x.
    • This reply was modified 7 years, 7 months ago by No3x.
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘WordPress database error Duplicate column name ‘error’’ is closed to new replies.