https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37711
David Cook <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187848|0 |1 is obsolete| | --- Comment #63 from David Cook <[email protected]> --- Created attachment 188619 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188619&action=edit Bug 37711: (follow-up) Fix AuthClient plugin database upgrade handling The AuthClient template plugin was causing 500 errors during database upgrades when the identity_providers schema was out of sync. The plugin tried to query the new 'auto_register_opac' column before the database schema was updated, creating a chicken-egg problem. This patch wraps the database query in Try::Tiny to handle schema mismatches gracefully during upgrades, allowing the upgrade process to continue without crashing the authentication interface. Test plan: 1. On main, apply all bug 37711 patches BUT THIS ONE 2. Simulate an upgrade by: * Edit Koha.pm so it points to the next version * Move the atomicupdate file to the right number in db_revs 3. Restart everything: $ ktd --shell k$ restart_all 4. Access http://kohadev-intra.localhost => FAIL: You get a 500! With a stack trace! 5. Apply this patch 6. Repeat 3 and 4 => SUCCESS: No 500 error, redirects to installer 7. Proceed with the upgrade: => SUCCESS: It works as it should 8. Run tests: k$ prove -v t/db_dependent/Template/Plugin/AuthClient.t => SUCCESS: All tests pass 9. Sign off :-D Signed-off-by: Tomás Cohen Arazi <[email protected]> Signed-off-by: David Cook <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
