[candidate_list] Fix GROUP BY in row provisioner #9580
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brief summary of changes
The candidate list module was not loading on my VM with the following error:
[Fri Feb 21 11:54:24.183216 2025] [php:error] [pid 41249] [client ::1:38026] PHP Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #6 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'cbeaudoin_dev.c.Entity_type' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in /var/www/loris/src/Database/Query.php:46\nStack trace:\n#0 /var/www/loris/src/Database/Query.php(46): PDOStatement->execute()\n#1 /var/www/loris/src/Data/Provisioners/DBRowProvisioner.php(90): LORIS\\Database\\Query->getIterator()\n#2 [internal function]: LORIS\\Data\\Provisioners\\DBRowProvisioner->getAllInstances()\n#3 [internal function]: FilterIterator->rewind()\n#4 /var/www/loris/src/Http/DataIteratorBinaryStream.php(239): FilterIterator->rewind()\n#5 [internal function]: LORIS\\Http\\DataIteratorBinaryStream->rowGenerator()\n#6 /var/www/loris/src/Http/DataIteratorBinaryStream.php(189): Generator->valid()\n#7 /var/www/loris/src/Http/GzipStream.php(160): LORIS\\Http\\DataIteratorBinaryStream->read()\n#8 /var/www/loris/htdocs/index.php(102): LORIS\\Http\\GzipStream->read()\n#9 {main}\n thrown in /var/www/loris/src/Database/Query.php on line 46, referer: http://localhost:8080/candidate_list/There were fields missing from the GROUP BY statement. This PR adds all missing fields
Testing instructions (if applicable)
Link(s) to related issue(s)