You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With MySQL strict mode (specifically, only_full_group_by) enabled, the following selector (where location_select is a multi-Page field) gives the resulting error:
Error: Exception: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'example._sort_page_location_select_title.data' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (in /examplepath/wire/core/PageFinder.php line 384)
If I understand it correctly, this is because the location_select page field returns multiple results, and MySQL doesn't know which one to use. It appears that there is no way in PW to specify location_select.first.title, location_select.last.title or location_select.eq[3].title to narrow down the sort to the specific page you wish to sort the PageArray by. This would be a very useful enhancement.
The text was updated successfully, but these errors were encountered:
With MySQL strict mode (specifically, only_full_group_by) enabled, the following selector (where location_select is a multi-Page field) gives the resulting error:
$this->pages->get('template=People')->children("sort=location_select.title, limit=30");
Error: Exception: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'example._sort_page_location_select_title.data' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (in /examplepath/wire/core/PageFinder.php line 384)
If I understand it correctly, this is because the location_select page field returns multiple results, and MySQL doesn't know which one to use. It appears that there is no way in PW to specify location_select.first.title, location_select.last.title or location_select.eq[3].title to narrow down the sort to the specific page you wish to sort the PageArray by. This would be a very useful enhancement.
The text was updated successfully, but these errors were encountered: