• Resolved jj2023

    (@jj2023)


    2023-12-21 10:54:29.713997 [NOTICE] [241410] [172.71.215.32:43320:HTTP2-1#xxx.com] [STDERR] PHP Fatal error:  Uncaught mysqli_sql_exception: Illegal mix of collations for operation 'in' in /home/xxx.com/public_html/wp-content/plugins/translatepress-multilingual/includes/trp-ajax.php:154
    Stack trace:
    #0 /home/xxx.com/public_html/wp-content/plugins/translatepress-multilingual/includes/trp-ajax.php(154): mysqli_query()
    #1 /home/xxx.com/public_html/wp-content/plugins/translatepress-multilingual/includes/trp-ajax.php(36): TRP_Ajax->output_translations()
    #2 /home/xxx.com/public_html/wp-content/plugins/translatepress-multilingual/includes/trp-ajax.php(182): TRP_Ajax->__construct()
    #3 {main}
      thrown in /home/xxx.com/public_html/wp-content/plugins/translatepress-multilingual/includes/trp-ajax.php on line 154

    Not sure what the business implications of this error are? It appears frequently in the logs.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Cristian Antohe

    (@sareiodata)

    Hello,
    A possibility could be the fact that your “trp_*” tables have different collations.
    Could you tell me what collation you have right now in your database? Try to access it and see if you can change it with utf8mb4_general_ci.

    Here are some tips: https://mediatemple.net/community/products/dv/204403914/default-mysql-character-set-and-collation.

    Thread Starter jj2023

    (@jj2023)

    trp_* related are all based on utf8mb4_unicode_520_ci, some plugins are utf8mb3_general_ci

    WX20231221-232004@2x.png

    Thread Starter jj2023

    (@jj2023)

    Is there any other way to solve the problem?

    Plugin Author Cristian Antohe

    (@sareiodata)

    Try and convert the trp_* tables to utf8mb4_general_ci instead. See if that makes a difference.

    Thread Starter jj2023

    (@jj2023)

    Have converted all trp_ tables to utf8mb4_general_ci, can’t fix the problem, still finding this error in the logs.

    [STDERR] PHP Fatal error: Uncaught mysqli_sql_exception: Illegal mix of collations for operation ‘in’ in /home/xxx.com/public_html/wp-content/plugins/translatepress-multilingual/includes/trp-ajax.php:154
    Stack trace: 0 /home/xxx.com/public_html/wp-content/plugins/translatepress-multilingual/includes/trp-ajax.php(154): mysqli_query() 1 /home/xxx.com/public_html/wp-content/plugins/translatepress-multilingual/includes/trp-ajax.php(36): TRP_Ajax->output_translations() 2 /home/xxx.com/public_html/wp-content/plugins/translatepress-multilingual/includes/trp-ajax.php(182): TRP_Ajax->__construct() 3 {main}

    thrown in /home/xxx.com/public_html/wp-content/plugins/translatepress-multilingual/includes/trp-ajax.php on line 154

    Plugin Author Cristian Antohe

    (@sareiodata)

    Hi,

    You can use this mini-plugin so it uses admin-ajax.php instead of trp-ajax.php from now on https://translatepress.com/download/1151690/?tmstv=1704358882

    The WordPress ajax should not receive the same error, at least that is what I’m expecting to happen. If this still trows the same error, we’ll investigate further.

    Innobyte

    (@cloudconnection)

    Hi @sareiodata, just saw that you released a new version of TP.

    2.7.0

    • Fixed issue with Exclude only certain paths advanced option on subfolder path installs
    • Improved Error Manager by outputting the entire failed query
    • Improved SQL error handling in trp-ajax calls

    Should that solve the issue too? We are still facing these errors on severals sites. We tried last year to solve it with Denis Sandu from your team, even rewriting the line 154 to support the right collations did not solved it so far.

    thx andreas

    Plugin Author Cristian Antohe

    (@sareiodata)

    Hi,
    You should not see that error in the logs any longer, however, it’s possible it will still happen, just won’t end up in the logs.

    The fallback to admin-ajax.php is still the correct solution in this case, but that happens automatically, even without the mini-addon.

    Best Regards!

    Innobyte

    (@cloudconnection)

    Thx @sareiodata for the fast response.

    These are good news! We will test this out.

    Best Regards

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Uncaught mysqli_sql_exception: Illegal mix of collations for operation’ is closed to new replies.