This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Pat Och
Pat Och

hi there,

i have a strange issue in my local environment :

wamp64

mysql 5.7.14

OctoberCMS 382

this encountered in several plugins, For example, this one that attempts to display a list of slides in the backend

Syntax error or access violation: 1055 Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'dbname.flosch_slideshow_slides.sort_order' which is not functionally dependent on columns in GROUP BY clause;

this is incompatible with sql_mode=only_full_group_by

(SQL:

select flosch_slideshow_slides.slideshow_id, count(*) as count

from flosch_slideshow_slides

where flosch_slideshow_slides.slideshow_id in (2, 1)

group by flosch_slideshow_slides.slideshow_id

order by sort_order asc

)

other example slightly different. this one that attempts to display a list of products on the frontend

SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #51 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'dbname.jiri_jkshop_products_categories.category_id' which is not functionally dependent on columns in GROUP BY clause;

this is incompatible with sql_mode=only_full_group_by

(SQL:

select * from jiri_jkshop_products inner join

jiri_jkshop_products_categories on id = jiri_jkshop_products_categories.product_id

where active = 1 and category_id in (8) and visibility = 1

group by id

order by title asc

)

Those requests are triggered here :

Backend\Behaviors\ListController->listRender()

so i don't have the hand on it

I specify that it works perfectly on remote server and on my mate's local environment

Another interesting point is that appends since I applied the latest updates for the system (from version 365 to 382) and all the plugins installed.

But, to test, I did the same on the remote server and it still works

As i work mainly locally, this is very very annoying

have you some ideas to fix it ? ideally without modify mysql/sql_mode

thanks & regards, Patrick

Pat Och
Pat Och
Pat Och

So plugin authors need to fix queries that are not compatible with the new standart introduced by mysql 5.7 with sql_mode = only_full_group_by

danielschweiger
danielschweiger

Is this an issue plugin devs should fix or should this be fixed by octobercms? I run into the same problem. I just used relation manager, nothing special.

Pat Och
Pat Och

anywhere wrong queries are

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.