Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

count is incompatible with sql_mode only_full_group_by #1423

Closed
magicsepp opened this issue Sep 1, 2020 · 4 comments
Closed

count is incompatible with sql_mode only_full_group_by #1423

magicsepp opened this issue Sep 1, 2020 · 4 comments
Assignees
Labels
bug A bug! A bug! Fast, squish it!
Milestone

Comments

@magicsepp
Copy link

magicsepp commented Sep 1, 2020

Checklist before I submit this issue report

I confirm that:

My environment is:

(Please fill in the actual values from your environment - check Contao Manager or use composer show)

Key Value Comments
PHP version: PHP Version 7.2.19
Contao version: 4.4.51
MetaModels version: 2.1.[1-9]
Installed MetaModels packages: core 2.1.9 MM2.1
DCG version: 2.1.8

Issue description

after update core to 2.1.10 the BE tables are not accessable by error
f.e.

An exception occurred while executing 
'SELECT sauna, COUNT(sauna) as mm_count FROM mm_sauna WHERE id IN (?, ?) GROUP BY sauna ORDER BY FIELD(id, ?, ?) ASC'
 with params ["160", "29", "160", "29"]:
SQLSTATE[42000]: Syntax error or access violation:
1055 Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column
'cto44.mm_sauna.id' which is not functionally dependent on columns in GROUP BY clause;
this is incompatible with sql_mode=only_full_group_by

Steps to reproduce

  1. update core to 2.1.10
  2. klick a mm_table
  3. internal error see above

Describe the behaviour of the application

(Tell us what happens)

Describe the expected behaviour of the application

a list of data as defined

Screenshots

(Add some visual love or even a video if you can)
I guess there is no need ;)

@zonky2 zonky2 added the bug A bug! A bug! Fast, squish it! label Sep 1, 2020
@zonky2 zonky2 added this to the 2.1.10 milestone Sep 1, 2020
@zonky2
Copy link
Contributor

zonky2 commented Sep 1, 2020

@discordier related with #1419

@zonky2 zonky2 modified the milestones: 2.1.10, Future Nov 18, 2020
@magicsepp
Copy link
Author

same result with core 2.1.10,

@zonky2
Copy link
Contributor

zonky2 commented Nov 21, 2020

same result with core 2.1.10,

please note the indicated milestone

@discordier discordier changed the title #1412 count is incompatible with sql_mode only_full_group_by Nov 24, 2020
@zonky2 zonky2 modified the milestones: Future, 2.2.0 Apr 23, 2021
@zonky2
Copy link
Contributor

zonky2 commented Apr 23, 2021

fixed in MM 2.2

@zonky2 zonky2 closed this as completed Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug! A bug! Fast, squish it!
Projects
None yet
Development

No branches or pull requests

3 participants