News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

2.0.15 database error - "Expression #1 of ORDER BY clause is not in GROUP BY

Started by arcadecontrols, March 19, 2019, 07:53:49 AM

Previous topic - Next topic

arcadecontrols

I'm getting reports from one user (only, so far) about a database error when trying to view their sent private messages.

It appears to be the same or similar to:


---------------------------------

The error:

Quote
http://forum.arcadecontrols.com/index.php?action=pm;f=sent [nofollow]

Database Error: Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'forum.pm.id_pm' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

SELECT MAX(pm.id_pm) AS id_pm, pm.id [nofollow]_pm_head
FROM byoac_personal_messages AS pm
WHERE pm.id [nofollow]_member_from = 3160
AND pm.deleted_by_sender = 0
GROUP BY pm.id [nofollow]_pm_head
ORDER BY pm.id [nofollow]_pm DESC
LIMIT 0, 40

File: /www/html/forum.arcadecontrols.com/Sources/PersonalMessage.php
Line: 700

-----------------------------------------

Forum: 2.0.15. Did a clean install of 2.0.15, then imported and upgraded the database from my earlier 2.0.11 forum.

OS: Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-43-generic x86_64)
PHP: 7.1.27-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Mar  7 2019 20:02:25)
MySQL:  Ver 14.14 Distrib 5.7.24, for Linux (x86_64) using  EditLine wrapper


I do not believe I have any mods affecting the PM system, but my complete list of mods is:

Bookmarks
SP Last Login
Last Active on Memberlist
Sphinx for SMF
Global Headers Footers
Simple Audio Video Embedder
AdSense Mod (downloaded but not installed so presumably irrelevant)
Tapatalk SMF 2.0 Plugin
SMF Trader System
Bot Buster
Inline Hover Spoiler
Sperate the sticky topics
Like Posts (downloaded but not installed so presumably irrelevant)

=============================================

I saw the suggested fix to


Solution 2: Remove ONLY_FULL_GROUP_BY from phpmyadmin

    Open phpmyadmin & select localhost
    Click on menu Variables & scroll down for sql mode
    Click on edit button to change the values & remove ONLY_FULL_GROUP_BY & click on save


but on the stackoverflow page where it was listed, it also suggested that it only would work for MySQL 5.7.11 and not later versions, and I'm on 5.7.24, so I was hesitant to proceed.

Looking for any suggestions/advice. Thanks!

Advertisement: