Support » Plugin: Transposh WordPress Translation » WordPress database error

  • Resolved mbeerli

    (@mbeerli)


    In my error.log file I notice a few of the following lines.

    [08-Oct-2019 13:07:28 UTC] WordPress database error Illegal mix of collations (utf8_bin,IMPLICIT) and (utf8mb4_unicode_520_ci,COERCIBLE) for operation ‘=’ for query SELECT translated, source FROM wp_translations WHERE original = ‘😉’ and lang = ‘nl’ made by shutdown_action_hook, do_action(‘shutdown’), WP_Hook->do_action, WP_Hook->apply_filters, wp_ob_end_flush_all, ob_end_flush, transposh_plugin->process_page, tp_parser->fix_html, transposh_database->fetch_translation

    Are these from the plugin?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Ofer Wald

    (@oferwald)

    Hi,

    I’d guess it is originating from the plugin, however, what are the implications of this error? (other than annoying log lines?)

    I first thought that it could be that someone is trying to shutdown the WP site. SQL injection or something. If it is an illegal mix, then I guess it can be fixed somehow with a cleanup function? I have the following languages enabled: (English, Deutsch, Espanol, Italiano, Francais and Nederlands) Is there further logging I can enable to help find the issue?

    Plugin Author Ofer Wald

    (@oferwald)

    Hi,

    I can only suggest that you check your current table collations and see what they are, I remember that the switch from utf8_bin to utf8mb4 cause some issues in the past but I don’t remember how I got over this (sorry, getting senile),

    If you’ll contact us through the form on our site I will be able to try to further help, I guess that I will need something similar to phpmyadmin access, and to the logging of your server, I am not really sure that its worth it, but can try

    So would a uninstall and a fresh install solve the problem?

    Ok, I switch via phpmyadmin – options the 2 tables
    wp_translations and wp_translations_log the Collation
    from utf8_bin to utf8mb4_unicode_520_ci

    Hope that does it.

    Plugin Author Ofer Wald

    (@oferwald)

    Fresh install seems like an overkill, did the change do the trick for you?

    mbeerli

    (@mbeerli)

    so far no new error.log file was created. (about 3 days)

    Plugin Author Ofer Wald

    (@oferwald)

    Great, thanks for the update

    mbeerli

    (@mbeerli)

    Error log appeared again.
    [22-Nov-2019 14:10:13 UTC] WordPress database error Illegal mix of collations (utf8_bin,IMPLICIT) and (utf8mb4_unicode_520_ci,COERCIBLE) for operation ‘=’ for query SELECT translated, source FROM wp_translations WHERE original = ‘😉’ and lang = ‘fr’ made by shutdown_action_hook, do_action(‘shutdown’), WP_Hook->do_action, WP_Hook->apply_filters, wp_ob_end_flush_all, ob_end_flush, transposh_plugin->process_page, tp_parser->fix_html, transposh_database->fetch_translation

    the 2 tables are switched to utf8mb4_unicode_520_ci.
    Since I can not restart the server, I switched php versions to 7.2 and back to 7.3 in order to flush the connection.

    Any other ideas?

    Plugin Author Ofer Wald

    (@oferwald)

    Hi,

    I think your problem is the very special character ‘😉’ try wrapping it with a no_translate class where it is used

    mbeerli

    (@mbeerli)

    I found another issue.
    when doing a select statement
    SELECT * FROM wp_translations WHERE original Like “%😉%”;
    I got the same error as above.
    Then I found the following: I switched the colation on the table but with phpmyadmin it did not switch the fields. So I edited the colation of the fields in the following 2 tables
    – wp_translations
    – wp_translations_log
    from wherever I had utf8_bin to utf8mb4_unicode_520_ci

    Now the select statement does not show the error anylonger, nor did it find any entries

    • This reply was modified 2 months ago by mbeerli.
Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.