Bug 21714

Summary: Unable to view vendor with strict_sql_modes enabled
Product: Koha Reporter: Andrew Isherwood <bugzilla>
Component: AcquisitionsAssignee: Martin Renvoize <martin.renvoize>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: jonathan.druart, katrin.fischer, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 21385    
Bug Blocks: 17258    

Description Andrew Isherwood 2018-10-29 14:39:33 UTC
With strict_sql_modes enabled it is not possible to view a vendor detail page, instead the following error is displayed:

Can't use an undefined value as an ARRAY reference at /usr/lib/x86_64-linux-gnu/perl5/5.24/DBI.pm line 2088.

After some digging around, the error seems to be being generated when this query is run:

https://github.com/PTFS-Europe/koha/blob/master/C4/Acquisition.pm#L719
Comment 1 Katrin Fischer 2018-10-29 21:20:17 UTC
Searching for vendors is broken as well (same reason I think)
Comment 2 Jonathan Druart 2018-10-29 21:32:43 UTC
I do not recreate that one, should have been fixed by
  commit 2e35da4f6b0e2c25ca1e6acb3e80f8b9d65cb658
  Bug 20144: [sql_modes] Fix GROUP BY clause in GetBasketsInfosByBookseller


Which SQL error do you get? If it does not print in the log, can you warn it?
Comment 3 Jonathan Druart 2018-10-29 22:01:49 UTC
Jenkins is currently failing because of this, the SQL error is:
"Non-grouping field 'expected_items' is used in HAVING clause"
Comment 4 Nick Clemens 2018-10-30 14:52:58 UTC

*** This bug has been marked as a duplicate of bug 21725 ***