# Broken Gallery plugin after updating server to MYSQL 5.7

**URL:** <https://community.modx.com/t/broken-gallery-plugin-after-updating-server-to-mysql-5-7/3586>\
**Category:** Support\
**Created:** [February 2, 2021, 11:48am UTC](https://community.modx.com/t/broken-gallery-plugin-after-updating-server-to-mysql-5-7/3586 "2021-02-02T11:48:53Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [February 2, 2021, 8:41pm UTC](https://community.modx.com/t/broken-gallery-plugin-after-updating-server-to-mysql-5-7/3586/3 "2021-02-02T20:41:18Z")

</div>

At least for the given specific example (the images not showing), the reason it fails is sql-mode “ONLY\_FULL\_GROUP\_BY” in combination with this query.

> <https://github.com/modxcms/Gallery/blob/4e14230c591b69bc9b1e3938f70390478849a03d/core/components/gallery/processors/mgr/item/getlist.class.php#L58>

Error: “contains nonaggregated column ‘AlbumItems.rank’ which is not functionally dependent on columns in GROUP BY clause”

Possible solution: Changing the line `'AlbumItems.rank',` to this.

```auto
'rank' => 'MAX(AlbumItems.rank)',

```

---

_[View the full topic](https://community.modx.com/t/broken-gallery-plugin-after-updating-server-to-mysql-5-7/3586)._
