[Bug 44120] New: admin/auth_tag_structure.pl fails with ONLY_FULL_GROUP_BY when creating the structure of an authority type
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44120 Bug ID: 44120 Summary: admin/auth_tag_structure.pl fails with ONLY_FULL_GROUP_BY when creating the structure of an authority type Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: MARC Authority data support Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org Target Milestone: --- Creating the MARC structure of an authority type that has none yet (Administration > Authority types > MARC structure) fails with: DBI Exception: DBD::mysql::st execute failed: 'koha_kohadev.auth_types.authtypetext' isn't in GROUP BY The page lists the existing structures to copy from, with this query in admin/auth_tag_structure.pl (op authtype_create): select count(*),auth_tag_structure.authtypecode,authtypetext from auth_tag_structure,auth_types where auth_types.authtypecode=auth_tag_structure.authtypecode group by auth_tag_structure.authtypecode It selects authtypetext but only groups by authtypecode, which is rejected when the SQL mode includes ONLY_FULL_GROUP_BY. That is the case with strict_sql_modes set to 1 in koha-conf.xml, the default of KTD. To reproduce: 1. Use an instance with strict_sql_modes = 1 2. Add an authority type in Administration > Authority types 3. Click on its MARC structure Found while testing bug 40883 (see comment 5). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44120 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 211675 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211675&action=edit Bug 44120: Fix the GROUP BY of the query listing the authority frameworks to copy Creating the MARC structure of an authority type that has none yet lists the existing structures to copy from. The query selected auth_types.authtypetext but only grouped by the authtypecode, which fails with "'auth_types.authtypetext' isn't in GROUP BY" when the SQL mode includes ONLY_FULL_GROUP_BY, which is the case with strict_sql_modes. Group by the authtypetext too. To test: 1. Make sure strict_sql_modes is 1 in koha-conf.xml (the KTD default) 2. Add an authority type in Administration > Authority types 3. Click on its MARC structure: without the patch the page fails with "'auth_types.authtypetext' isn't in GROUP BY", with it you can choose the structure to copy 4. cypress run --spec t/cypress/integration/Admin/AuthTagStructure_spec.ts -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44120 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44120 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40883 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org