This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 7 replies, has 2 voices.

Last updated by Shekhar Bhandari 4 weeks ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
September 5, 2019 at 7:51 pm #4521919

ahmadA-44

Hello

My website has been updated to WordPress 5.2.3 and now I'm getting the below error in my Nginx logs

2019/09/05 19:26:03 [error] 9670#9670: *139056 FastCGI sent in stderr: "PHP message: WordPress database error Expression #10 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'kwebsite.lt.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by for query
SELECT
l.code,
l.id,
english_name,
nt.name AS native_name,
major,
active,
default_locale,
encode_url,
tag,
lt.name AS display_name
FROM wp_icl_languages l
JOIN wp_icl_languages_translations nt
ON ( nt.language_code = l.code AND nt.display_language_code = l.code )
LEFT OUTER JOIN wp_icl_languages_translations lt ON l.code=lt.language_code
WHERE
( lt.display_language_code = 'en'
OR (lt.display_language_code = 'en'
AND NOT EXISTS ( SELECT *
FROM wp_icl_languages_translations ls
WHERE ls.language_code = l.code
...

I'm using php 7.2 with Mysql 8

btw: my database is managed, so I don't have the root account

September 6, 2019 at 5:30 am #4523357

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thanks for writing in! I’m happy to help out.

It looks like the issue is happening as you are using MYSQL 8 and the ONLY_FULL_GROUP_BY is enabled by default, I will raise this issue to our 2nd tier supporters and will respond to you soon with more feedback.

In the moment, I would also like to know, if you are able to see any problems due to this errors or it's just the error log where it's being shown.

Thanks

September 6, 2019 at 5:31 am #4523359

ahmadA-44

Hi

Yes I see a problem, the admin portal is down because of this error

September 6, 2019 at 8:04 am #4523923

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

The issue is now escalated to our 2nd tier supporters for further debug.

Our 2nd tier supporter will take a look at this issue. Once they provide any feedback, I will get back to you with those feedback here.

Thank you so much for your patience. 🙂

September 8, 2019 at 7:25 pm #4532441

ahmadA-44

Dears,

Kindly any update?

Thanks

September 9, 2019 at 4:04 am #4533513

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Our 2nd tier tried to reproduce the issue but couldn't reproduce it in a fresh install, so to further debug this issue, we would need a backup of your site.

Could you please provide us a backup of your site so we can replicate your site on my localhost and perform further debugging. Also, provide the steps that you are following to replicate the issue.

To send a backup file you can use backups plugins, or use hosting services back up and send it using google drive, dropbox, etc to us. If you can, I request you to remove the uploads folder from the backup as it will be easy to download due to the size.

I have enabled the private reply so you can send those links in the private reply. If you use some backup plugins installed and you created the packages, you can just provide login details and mention us, we can download it from the site itself.
hidden link

Look forward to your reply.

Thanks

September 13, 2019 at 5:41 am #4565731

ahmadA-44

Hi

I can upload a copy of the website to you, but frankly, I don't think the issue is with the website data (basic website and no plugins), I suspect the issue related to how is MySQL configured.

I'm using managed MySQL 8 from DigitalOcean, the only way I managed to fix the issue is by adding this line

mysqli_query( $this->dbh, "SET SESSION sql_mode=''");

To function set_sql_mode( $modes = array() ) in wp-db.php

the default sql_mode is

mysql> SELECT @@SQL_MODE;
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| @@SQL_MODE |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY,ANSI,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

mysql> SELECT @@GLOBAL.SQL_MODE;
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| @@GLOBAL.SQL_MODE |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY,ANSI,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

What do you think?

September 16, 2019 at 12:28 am #4575537

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I think that's the issue, but our 2nd tier tried to replicate the problem and they was unable to reproduce it, so if possible please provide the duplicator package, they will try to see if it's just the MYSQL 8 issue or any other issues to help you further.

Look forward to your reply.

Thanks

The topic ‘[Closed] SQL error after automatic update to WordPress 5.2.3’ is closed to new replies.