== Test plan == 1. Administration › MARC frameworks => new framework 2. Marc structure 3. Internal server error DBI Exception: DBD::mysql::st execute failed: 'koha_cover.biblio_framework.frameworktext' isn't in GROUP BY [for Statement "select count(*),marc_tag_structure.frameworkcode,frameworktext from marc_tag_structure,biblio_framework where biblio_framework.frameworkcode=marc_tag_structure.frameworkcode group by marc_tag_structure.frameworkcode"] at /usr/share/perl5/Plack/Component.pm line 50 Doesn't happen to everyone. But happens in PTFS-E's sandboxes for example. (MariaDB 10.1) On my koha also (MariaDB 10.5) == sql strict mode == Tried toggling sql strict mode but still crashed. sql_mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION and | Variable_name | Value | +---------------+-------+ | sql_mode | | Did a restart_all before retrying in case something weird kept the old mode for Koha.
To switch off strict sql modes you need to turn strict_sql_modes off in the koha config.
Created attachment 120167 [details] [review] Bug 28207: Fix biblio_framework.frameworktext isn't in GROUP BY When a new framework is created and "Marc structure" is opened, a SQL error happened if sql_strict_mode is on. Test plan: Create a 2 new biblio frameworks Click "Marc structure" for one of them => You see the list of all frameworks with an existing structure
Created attachment 120185 [details] [review] Bug 28207: Fix biblio_framework.frameworktext isn't in GROUP BY When a new framework is created and "Marc structure" is opened, a SQL error happened if sql_strict_mode is on. Test plan: Create a 2 new biblio frameworks Click "Marc structure" for one of them => You see the list of all frameworks with an existing structure Signed-off-by: David Nind <david@davidnind.com>
Created attachment 120186 [details] [review] Bug 28207: Fix biblio_framework.frameworktext isn't in GROUP BY When a new framework is created and "Marc structure" is opened, a SQL error happened if sql_strict_mode is on. Test plan: Create a 2 new biblio frameworks Click "Marc structure" for one of them => You see the list of all frameworks with an existing structure Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Thanks for the fix :D
Created attachment 120327 [details] [review] Bug 28207: Fix biblio_framework.frameworktext isn't in GROUP BY When a new framework is created and "Marc structure" is opened, a SQL error happened if sql_strict_mode is on. Test plan: Create a 2 new biblio frameworks Click "Marc structure" for one of them => You see the list of all frameworks with an existing structure Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.06
Pushed to 20.05.x for 20.05.12
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.